Skip to main content
added 49 characters in body; edited title
Source Link

Stategies to avoid NIntegrate::slwcon error from NIntegrate

I am trying to numerically evaluate an integral whose integrand depends on two parameters, say $(a,b)$ and when $b>>1$$b\gg 1$ I suspect (although it's not guaranteed) that the integrand is very small. Thus when $b>>1$$b\gg 1$ and I try to evaluate the integral MathematicaMathematica throws up ::slwconNIntegrate::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 ~10^-6.$\approx 10^{-6}$?

Some info on integrand 
theThe integrand looks like $\exp{(-ix)} W(x)$$\exp(-ix)\,W(x)$, where x$x$ is the integration variable. $W(x)$ is a function that I only know numerically. I compute it by using NDSolveNDSolve to solve a second order ODE (specifically the radial part of the Klein Gordon-Gordon equation in Schwarzschild as given by eq (4) of http://arxiv.org/abs/1106.2709this paper) to get modes $u_i$ (which are oscillatory waves), then I roughly I 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.

Stategies to avoid ::slwcon error from NIntegrate

I am trying to numerically evaluate an integral whose integrand depends on two parameters, say $(a,b)$ and when $b>>1$ I suspect (although it's not guaranteed) that the integrand is very small. Thus when $b>>1$ and I try to evaluate the integral Mathematica throws up ::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 ~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 http://arxiv.org/abs/1106.2709) to get modes $u_i$ (which are oscillatory waves), then roughly I 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.

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.

added 550 characters in body
Source Link
fpghost
  • 2.1k
  • 2
  • 21
  • 25

I am trying to numerically evaluate an integral whose integrand depends on two parameters, say $(a,b)$ and when $b>>1$ I suspect (although it's not guaranteed) that the integrand is very small. Thus when $b>>1$ and I try to evaluate the integral Mathematica throws up ::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 ~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 http://arxiv.org/abs/1106.2709) to get modes $u_i$ (which are oscillatory waves), then roughly I 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.

I am trying to numerically evaluate an integral whose integrand depends on two parameters, say $(a,b)$ and when $b>>1$ I suspect (although it's not guaranteed) that the integrand is very small. Thus when $b>>1$ and I try to evaluate the integral Mathematica throws up ::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 ~10^-6.

I am trying to numerically evaluate an integral whose integrand depends on two parameters, say $(a,b)$ and when $b>>1$ I suspect (although it's not guaranteed) that the integrand is very small. Thus when $b>>1$ and I try to evaluate the integral Mathematica throws up ::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 ~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 http://arxiv.org/abs/1106.2709) to get modes $u_i$ (which are oscillatory waves), then roughly I 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.

Source Link
fpghost
  • 2.1k
  • 2
  • 21
  • 25

Stategies to avoid ::slwcon error from NIntegrate

I am trying to numerically evaluate an integral whose integrand depends on two parameters, say $(a,b)$ and when $b>>1$ I suspect (although it's not guaranteed) that the integrand is very small. Thus when $b>>1$ and I try to evaluate the integral Mathematica throws up ::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 ~10^-6.