0
$\begingroup$

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.41556849973290244and 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?

$\endgroup$
4
  • $\begingroup$ Possible duplicate: (109772); also related: (1118249) $\endgroup$
    – Michael E2
    Feb 28, 2018 at 14:10
  • 1
    $\begingroup$ I generally do not trust results obtained when I get NIntegrate::eincr. The error suggests that NIntegrate 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 between 0.000018 ± 10^-4. $\endgroup$
    – Michael E2
    Feb 28, 2018 at 14:17
  • $\begingroup$ I have tried other method of integration, MonteCarloMethod, but also the greatest accuracy that I can achieve without warning messages is 4, i got 0.0000202727. I need to have a higher accuracy at least 8...I have already tried to increase the precision, but nothing works! $\endgroup$
    – rafa
    Mar 1, 2018 at 14:12
  • $\begingroup$ fyi one of the integrals can be done analytically: 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 for NIntegrate. ( I made all the constants exact btw ) $\endgroup$
    – george2079
    Mar 1, 2018 at 18:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.