Gaussian quadrature is a numerical integration rule that chooses abscissas and weights
to integrate polynomials of the highest possible polynomial degree exactly. The fundamental
theorem of Gaussian quadrature states that the optimal abscissas
of the -point
Gaussian quadrature formulas are precisely the roots
of the orthogonal polynomials of polynomial
degree
for the same interval and weighting
function. For a nonnegative weighting
function with finite moments of all orders and positive integral against
the square of every nonzero polynomial,
Gaussian quadrature fits all polynomials up to polynomial degree
exactly. On a finite interval,
prescribing one endpoint gives Radau
quadrature, with exactness through polynomial
degree
for
. Prescribing both endpoints
gives Lobatto quadrature, with exactness through
polynomial degree
for
.
The weighting function specifies the weighted integral
approximated by the rule,
|
(1)
|
For a chosen rule, the interval and are fixed while
varies. The weighting function
is distinct from the discrete weights
multiplying
.
| interval | ||
| 1 | ||
To determine the weights corresponding to the Gaussian abscissas , compute a Lagrange
interpolating polynomial for
by letting
|
(2)
|
(where Chandrasekhar 1967 uses instead of
), so
|
(3)
|
Then fitting a Lagrange interpolating polynomial through the points gives
|
(4)
|
for arbitrary points . We are therefore looking for a set
of points
and weights
such that for a weighting function
,
|
(5)
| |||
|
(6)
|
with weight
|
(7)
|
The weights are sometimes also called the Christoffel
numbers (Chandrasekhar 1967). For the member
of polynomial degree
in a family of orthogonal
polynomials, set
above. Then
|
(8)
|
where
is its leading coefficient. The weights
are given by
|
(9)
| |||
|
(10)
|
(Hildebrand 1956, p. 322), where
|
(11)
|
Using the relationship
|
(12)
|
(Hildebrand 1956, p. 323) gives
|
(13)
|
(Note that Press et al. 1992 omit the factor .) In Gaussian quadrature, the weights
are all positive. The error
is given by
|
(14)
| |||
|
(15)
|
where
(Hildebrand 1956, pp. 320-321).
Other curious identities are
|
(16)
|
and
|
(17)
| |||
|
(18)
|
(Hildebrand 1956, p. 323).
In the notation of Szegö (1975), let be an ordered set
of points in
, and let
, ...,
be a set of real
numbers. If
is an arbitrary function on the closed
interval
, write the Gaussian quadrature as
|
(19)
|
Here
are the abscissas and
are the Cotes numbers.
The nodes and weights can also be obtained from the leading
block
of the Jacobi matrix for the normalized orthogonal
polynomials. Its eigenvalues are the nodes
. If
is a real unit eigenvector
for
and
, then
|
(20)
|
This is the Golub-Welsch algorithm (Golub and Welsch 1969). Equivalently, the Christoffel
function gives .
For example, the three-point Legendre-Gauss quadrature rule has
|
(21)
|
Its nodes are , 0, and
, with corresponding weights
,
, and
. The rule is exact through polynomial
degree 5.
The rule's higher-degree exactness is illustrated above by the quartic polynomial and its quadratic Lagrange
interpolating polynomial
,
|
(22)
| |||
|
(23)
|
Their values agree at the three nodes. The blue and orange shaded regions lie where
is positive and negative,
respectively. Their signed integrals cancel. Consequently,
|
(24)
|
The numbers beneath the nodes are the corresponding weights.
Numerical checks of computed nodes and weights require attention to conditioning. Small errors in reproduced moments need not imply comparably small errors in the nodes and weights, because the map from moments to a quadrature rule can be severely ill-conditioned. Checks comparing the coefficients of the reconstructed three-term recurrence relation with independently determined values, or testing the sum of the nodes, can therefore be more informative than checking moments alone (Gautschi 1983).
The modified Chebyshev algorithm supplies the required recurrence coefficients from modified moments (Gautschi 1982).