Overview: Quadrature

This section introduces some of the mathematical concepts used in the IDL Advanced Math and Stats integration routines.

Univariate and Bivariate Quadrature

The first function in this chapter, IMSL_INTFCN, is designed to compute approximations to integrals of the following form:

Overview_Quadrature-06.jpg

or:

Overview_Quadrature-07.jpg

The weight function w is used to incorporate known singularities (either algebraic or logarithmic) or to incorporate oscillations. The default action of this function assumes univariate quadrature, a weight function w(x) = 1, and the existence of endpoint singularities. Even if no endpoint singularities exist, the default method is still effective for general-purpose integration. If more efficiency is desired, then a more specialized method can be specified through the use of specific parameter and keyword combinations. The available methods can be summarized as follows, where the description refers to subsections of the documentation for the IMSL_INTFCN function:

The IMSL_INTFCN function returns an estimated answer R and provides keywords to specify a requested absolute error ε, the requested relative error ρ, and a named variable in which to return an estimate of the error E. These numbers are related in the equation:

Overview_Quadrature-09.jpg

One situation that arises in univariate quadrature concerns the approximation of integrals when only tabular data is given. The functions above do not directly address this question. However, the standard method for handling this problem is to interpolate the data then integrate the interpolant. This can be accomplished by using the IDL Advanced Math and Stats spline interpolation functions with the spline integration function, IMSL_SPINTEG.

Multivariate Quadrature

Two functions, IMSL_INTFCN and IMSL_INTFCNHYPER, have been included in this chapter that can be used to approximate certain multivariate integrals.

IMSL_INTFCN can be called with additional parameters and keywords to return an approximation to a two-dimensional iterated integral of the form:

Overview_Quadrature-10.jpg

The IMSL_INTFCNHYPER function returns an approximation to the integral of a function of n variables over a hyper-rectangle as shown in the equation:

Overview_Quadrature-11.jpg

When working with two-dimensional, tensor-product tabular data, use the IDL Advanced Math and Stats spline interpolation the IMSL_BSINTERP function, followed by the spline integration the IMSL_SPINTEG function.

Gauss Quadrature

For a fixed number of nodes, N, the Gauss quadrature rule is the unique rule that integrates polynomials of degree less than 2N. These quadrature rules can be easily computed using the IMSL_GQUAD procedure, which produces the points {xi} and weights {wi} for i = 1, ..., N that satisfy:

Overview_Quadrature-12.jpg

for all functions f that are polynomials of degree less than 2N. The weight functions w can be selected from Table 7-1:

Table 7-1: Weight Functions

w(x)
Interval
Name
1
(–1, 1)

Legendre

Overview_Quadrature-01.jpg
(–1, 1)

Chebyshev 1st kind

Overview_Quadrature-02.jpg
(–1, 1)

Chebyshev 2nd kind

Overview_Quadrature-03.jpg
(–infinity, infinity)

Hermite

Overview_Quadrature-04.jpg
(–1, 1)

Jacobi

Overview_Quadrature-05.jpg
(0, infinity)

Generalized Laguerre

1/cosh(x)
(–infinity, infinity)

Hyperbolic cosine

Where permissible, IMSL_GQUAD also computes Gauss-Radau and Gauss-Lobatto quadrature rules.