I am calculating a numerical integral, but I am very surprise about the result that I get when I choose a different accuracy goal
My integral is:
NIntegrate[
(u/(u^2 + v^2))*r*x*Exp[-6.6*Sqrt[r^2 + z^2]]*Exp[-2.48*Sqrt[x^2 + y^2]]*
((1 - (2.2*Sqrt[x^2 + y^2]))^2)*BesselJ[0, u*r]*BesselJ[0, u*x]*Cos[v*z]*
Cos[y*v]*(Cos[Pi*z/0.1]*Cos[Pi*y/0.1])^2,
{u, 0,Infinity}, {v, 0, Infinity}, {r, 0, Infinity}, {x, 0, Infinity},
{z,0, 0.05}, {y, 0, 0.05},
AccuracyGoal -> 4]
When I put a low accuracy goal (for example 4), I don't get warning messages and the result is
0.0000186452
but, when I put a higher accuracy goal, for example 8, I get warning messages and this result:
5.85387*10^-6
NIntegrate::eincr: The global error of the strategy GlobalAdaptive has increased more than 2000 times. The global error is expected to decrease monotonically after a number of integrand evaluations. Suspect one of the following: the working precision is insufficient for the specified precision goal; the integrand is highly oscillatory or it is not a (piecewise) smooth function; or the true value of the integral is 0. Increasing the value of the GlobalAdaptive option MaxErrorIncreases might lead to a convergent numerical integration. NIntegrate obtained 0.41556849973290244
and 1.9178217141492217
*^-6 for the integral and error estimates.
I am wondering about the difference in the results, and I would like to know in which result may I trust?
NIntegrate::eincr
. The error suggests thatNIntegrate
is still in the pre-convergent phase of the recursive refinement. You can probably trust the first 4 decimal places (i.e. the zeros, where 4 = AG) of the first result -- that is, the true value is probably between0.000018 ± 10^-4
. $\endgroup$Integrate[integrand, {v, 0, Infinity}, Assumptions -> {u > 0, z > 0, y > 0}]
You might get better results if you use that to reduce the dimension of the space forNIntegrate
. ( I made all the constants exact btw ) $\endgroup$