Re: Definite integral with huge variations in magnitude



Mmm, this one is a bit wilder. Mathematica NIntegrate with target
precision of 6 fails with warning

NIntegrate::"ncvb": NIntegrate failed to converge to prescribed
accuracy after 7 recursive bisections in z near z = 0.00009765625

Code used is

R = Sqrt[a^2 + (q-z)^2];
P = 0.005 / (0.17708 * 8 Pi^2 R^5);
d1 = k*R * (3*a^2 - 2*R^2);
d2 = 2*R^2 + a^2 * (k^2 * R^2 - 3);
f = P * Cos[600 Pi z] * (d2*Cos[k*R] - d1*Sin[k*R]);
data={k->400.*N[Pi]/3,a->3.75*10^(-6),q->0.0000875,z1->-0.0025,z2->0.0025};
fint=NIntegrate[f/.data,{z,z1/.data,z2/.data},PrecisionGoal->6];
Print [fint];

The returned value is -8.18038 * 10^6, which is way off.

My Gauss Legendre gives -12190.6 to 6 places. I wonder if Maple can
confirm that value.

.



Relevant Pages