I have the following piece of code where I try to compute the triple integral.

 wzeq = 2.5021
 Omeg = 1.5
 GG = 2.1
 alpha = 3.9478
 sigma = Sqrt[0.3]
 nu = Sqrt[sigma^2 Abs[Omeg^2 - 0.25 GG^2]]
 sigmaR = Sqrt[0.1]
 A0 = 0.0032
 mu = -sigmaR^2/2
 h0 = 0.001
 NIntegrate[z/(h0^2 x^2 Sqrt[Log[A0 x/h0]]) Exp[-wzeq^2/(4 sigma^2) Log[
  A0 x/h0] -  1/2 ((Log[x] + sigmaR^2/2)/sigmaR)^2] Exp[-1/(2 alpha) (y/(sigmaR x))^2 - wzeq^2 (z/h0 - y/x)^2/(16 nu^2 Log[A0 x/h0])], {z, 0, ,Infinity}, {x, h0/A0, h0/A0, Infinity}, {y, -Infinity, Infinity}]

However, I keep getting warning messages.

NIntegrate::slwcon: Numerical integration converging too slowly; suspect one of the following: singularity, value of the integration is 0, highly oscillatory integrand, or WorkingPrecision too small.

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.011684038916126538 and 2.9472154143362325*^-8 for the integral and error estimates.

Is there a way to fix this issue as I suspect that the value of the integral is not correct.

  • 2
    $\begingroup$ What is the intermediate point in the z-range? It is missing. The numerical integration computation converges, but it seems you will get different results using, say, these options MinRecursion -> 20, MaxRecursion -> 100, PrecisionGoal -> 8, Method -> {"GlobalAdaptive", "MaxErrorIncreases" -> 20000}. $\endgroup$ – Anton Antonov Mar 14 '18 at 15:58
  • $\begingroup$ What do you mean by the intermediate point in the z-range? $\endgroup$ – Jeremy Mar 15 '18 at 5:58
                 wzeq = 2.5021; Omeg = 1.5; GG = 2.1; alpha = 3.9478;
         sigma = Sqrt[0.3]; nu = 
        Sqrt[sigma^2*Abs[(Omeg^2 - 0.25*GG^2)]]; sigmaR = 
       Sqrt[0.1]; A0 = 0.0032; mu = (sigmaR^2)/2; h0 = 0.001;
      z/(h0^2*x^2 Sqrt[Log[A0*x/h0]])*
      Exp[-((wzeq^2*Log[A0 x/h0])/(4 sigma^2)) - 
      1/2*((Log[x] - mu)/sigmaR)^2]*
       Exp[-1/(2 alpha) (y/(sigmaR*x))^2 - (
      wzeq^2*(z/.004206515 - y/x)^2)/(16 nu^2 *Log[A0 x/h0])], {z, 0, 
     Infinity}, {x, h0/A0, Infinity}, {y, -Infinity, Infinity}, 
      AccuracyGoal -> 10, Method -> "GlobalAdaptive"]]                      (*outputs*) 
| improve this answer | |
  • $\begingroup$ I have an idea on the value of the result, it should be around 0.032 with the parameters mentioned in my post. I don't understand how you got this very small value. Also, I think "Quiet" will stop the messages from being displayed but it won't solve them. $\endgroup$ – Jeremy Mar 13 '18 at 10:41
  • $\begingroup$ In your code there is typo in limit of x, and you can not use "I as you have used" because it is assigne for imaginary number. You can find this result without using "Quiet" , $\endgroup$ – Gopal Verma Mar 13 '18 at 11:14
  • $\begingroup$ To which line you are referring to? this one {x, h0/A0, Infinity}? $\endgroup$ – Jeremy Mar 13 '18 at 11:18
  • $\begingroup$ yes, check your uploded code $\endgroup$ – Gopal Verma Mar 13 '18 at 11:41
  • $\begingroup$ Actually, I did that on purpose since I suspect that $h0/A0$ is a singularity point. According to the Mathematica documentation, it should give more accurate result when you precise the singularity. You were talking about imaginary number. Could you kindly edit your post with your solution, it is easier to understand in this case. Thanks. $\endgroup$ – Jeremy Mar 13 '18 at 12:12

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.