Sci.Quad: Quadrature Algorithms

This module implements algorithms for the numerical integration of real valued functions. For scalar functions the goal is to numerically evaluate the integral $$ I(f, a, b) = \int_{a}^{b}f(t)dt $$ where the integration interval is allowed to be unbounded.

API

v, err = quad.dblexp(f, a, b, stop = 1e-6)

Implements the double exponential quadrature algorithm described in Bailey06. Takes as input the scalar integrand function f, the integration interval (a, b) and a positive value stop. The integration stops when the maximum number of integration points has been used or when doubling the number of integration points results in an absolute change in the numerical evaluation of the integral which is smaller than stop. The function returns the numerical evaluation of the integral and the last absolute change in such evaluation (which corresponds to the last doubling of the integration points).

The quadratic order of convergence in the number of integration points used requires f to be analytic over the integration interval and f is allowed to be unbounded on the extremes of integration. The double exponential method has been shown in Bailey05 to be competitive with other numerical quadrature methods for most integrand functions.