Skip to main content
3 of 3
added 49 characters in body; edited title

Stategies to avoid NIntegrate::slwcon error

I am trying to numerically evaluate an integral whose integrand depends on two parameters, say $(a,b)$ and when $b\gg 1$ I suspect (although it's not guaranteed) that the integrand is very small. Thus when $b\gg 1$ and I try to evaluate the integral Mathematica throws up NIntegrate::slwcon errors suggesting it's either zero, rapidly oscillating or I need to increase precision. How can I get around this error to produce an actual result, even if it's $\approx 10^{-6}$?

Some info on integrand
The integrand looks like $\exp(-ix)\,W(x)$, where $x$ is the integration variable. $W(x)$ is a function that I only know numerically. I compute it by using NDSolve to solve a second order ODE (specifically the radial part of the Klein-Gordon equation in Schwarzschild as given by eq (4) of this paper) to get modes $u_i$ (which are oscillatory waves), then I roughly hit them with their cc $u_i u_i^*$ and sum them up to get $W$.

I did some plots of the integrand and it is indeed oscillatory. Especially at large $b$ where it is super oscillatory.

fpghost
  • 2.1k
  • 2
  • 21
  • 25