I'm trying to integrate the product of a Gaussian and a lower incomplete Gamma function over all of 3D space. This is an extremely slow integral, even using NIntegrate when called as follows:

NIntegrate[Exp[-(x^2+y^2+z^2)/(2b^2)]*Gamma[3/2, 0., Exp[-(x^2+y^2+z^2)/(2*c^2)],{x,-x0,x0},{y,-y0,y0},{z,-z0,z0}]

Is there anything I can do to make it run faster? Both functions fall off to zero quite quickly, so I imagine I don't need to integrate over all space but rather just out to a few times their widths... but are there other options at my availability?

  • 1
    $\begingroup$ (1) There's a bracket missing in the integrand. (2) Sometimes it's faster to integrate from -Infinity and Infinity because of special methods used. $\endgroup$ – Michael E2 Aug 12 '17 at 14:53
  • $\begingroup$ How fast do you want? How slow is it? (What are b and c, at least roughly?) $\endgroup$ – Michael E2 Aug 12 '17 at 14:54
  • 5
    $\begingroup$ Changing to spherical coordinates reduces it to a 1D integral, which are much easier to compute. $\endgroup$ – Michael E2 Aug 12 '17 at 15:01

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.