Convergence problems with numerical integration

105 Views Asked by At

I am trying to do numerical integration of a function that I know converges over a specified interval. (It is everywhere twice differentiable and strictly positive, with a long near-exponential tail that converges to zero). But every numerical integration routine I have tried reports convergence failure for values in excess of 10 to the 10th, or thereabouts. I am looking for transforms or other techniques that will enable to achieve convergence and still back out the value of the integral of the original function.

For example, while just re-scaling the integral does not help, the log of the function integrates without difficulty. If there is a way to recover the integral of the original function from the integral of the log of the function, that would be a solution.

1

There are 1 best solutions below

0
On

Are you trying to integrate over a semi-infinite interval, i.e. you want $\int_0^\infty f(x) dx$? Just making the interval really large (e.g. you mention $10^{10}$) is a probably bad idea, because the quadrature routine will start with too few points over that huge interval and have trouble refine.

Instead, one approach is to do a coordinate transformation that maps the infinite integration domain to a finite interval, e.g. $\int_0^\infty f(x)dx = \int_0^1 f\left(\frac{t}{1-t}\right) \frac{1}{(1-t)^2} dt$ is one possible transformation, and there are others such as tanh–sinh quadrature.

Another possibility, is to use a quadrature scheme designed for infinite intervals. For example, if you know the asymptotic exponential decay rate (or can bound it), you can factor this out of your integrand and use a Gauss–Laguerre quadrature rule.

Since you don't actually write down the integral you want to compute, it's hard to give you more advice.