Gaussian quadrature
From Wikipedia, the free encyclopedia
In numerical analysis, a quadrature rule is an approximation of the definite integral of a function, usually stated as a weighted sum of function values at specified points within the domain of integration. (See numerical integration for more on quadrature rules.) An n-point Gaussian quadrature rule, named after Carl Friedrich Gauss, is a quadrature rule constructed to yield an exact result for polynomials of degree 2n − 1 or less by a suitable choice of the points xi and weights wi for i = 1,...,n. The domain of integration for such a rule is conventionally taken as [−1, 1], so the rule is stated as
Gaussian quadrature as above will only produce accurate results if the function f(x) is well approximated by a polynomial function within the range [-1,1]. The method is, for example, not suitable for functions with singularities. However, if the integrated function can be written as
, where g(x) is approximately polynomial, and W(x) is known, then there are alternative weights wi such that
Common weighting functions include
(Gauss-Chebyshev) and
(Gauss-Hermite).
It can be shown (see Press, et al., or Stoer and Bulirsch) that the evaluation points are just the roots of a polynomial belonging to a class of orthogonal polynomials.
Contents |
[edit] Rules for the basic problem
For the integration problem stated above, the associated polynomials are Legendre polynomials, Pn(x). With the nth polynomial normalized to give Pn(1) = 1, the ith Gauss node, xi, is the ith root of Pn; its weight is given by (Abramowitz & Stegun 1972, p. 887)
Some low-order rules for solving the integration problem are listed below.
| Number of points, n | Points, xi | Weights, wi |
|---|---|---|
| 1 | 0 | 2 |
| 2 | ![]() |
1 |
| 3 | 0 | 8⁄9 |
![]() |
5⁄9 | |
| 4 | ![]() |
![]() |
![]() |
![]() |
|
| 5 | 0 | 128⁄225 |
![]() |
![]() |
|
![]() |
![]() |
[edit] Change of interval for Gaussian quadrature
An integral over [a, b] must be changed into an integral over [−1, 1] before applying the Gaussian quadrature rule. This change of interval can be done in the following way:
After applying the Gaussian quadrature rule, the following approximation is obtained:
[edit] Other forms of Gaussian quadrature
The integration problem can be expressed in a slightly more general way by introducing a positive weight function ω into the integrand, and allowing an interval other than [−1, 1]. That is, the problem is to calculate
for some choices of a, b, and ω. For a = −1, b = 1, and ω(x) = 1, the problem is the same as that considered above. Other choices lead to other integration rules. Some of these are tabulated below. Equation numbers are given for Abramowitz and Stegun (A & S).
| Interval | ω(x) | Orthogonal polynomials | A & S | For more information, see … |
|---|---|---|---|---|
| [−1, 1] | ![]() |
Legendre polynomials | 25.4.29 | Section Rules for the basic problem, above |
| (−1, 1) | ![]() |
Jacobi polynomials | 25.4.33 (β = 0) | |
| (−1, 1) | ![]() |
Chebyshev polynomials (first kind) | 25.4.38 | Chebyshev–Gauss quadrature |
| [−1, 1] | ![]() |
Chebyshev polynomials (second kind) | 25.4.40 | Chebyshev–Gauss quadrature |
| [0, ∞) | ![]() |
Laguerre polynomials | 25.4.45 | Gauss–Laguerre quadrature |
| (−∞, ∞) | ![]() |
Hermite polynomials | 25.4.46 | Gauss–Hermite quadrature |
[edit] Fundamental theorem
Let pn be a nontrivial polynomial of degree n such that
If we pick the nodes to be the zeros of pn, then there exist weights wi which make the computed integral exact for all polynomials of degree 2n − 1 or less. Furthermore, all these nodes will lie in the open interval (a, b) (Stoer & Bulirsch 2002, pp. 172–175).
The polynomial pn is said to be an orthogonal polynomial of degree n associated to the weight function ω(x). It is unique up to a constant normalization factor.
[edit] Computation of Gaussian quadrature rules
For computing the nodes xi and weights wi of Gaussian quadrature rules, the fundamental tool is the three-term recurrence relation satisfied by the set of orthogonal polynomials associated to the corresponding weight function.
If, for instance, pn is the monic orthogonal polynomial of degree n (the orthogonal polynomial of degree n with the highest degree coefficient equal to one), one can show that such orthogonal polynomials are related through the recurrence relation
From this, nodes and weights can be computed from the eigenvalues and eigenvectors of an associated linear algebra problem. This is usually named as the Golub–Welsch algorithm (Gil, Segura & Temme 2007).
The starting idea comes from the observation that, if xi is a root of the orthogonal polynomial pn then, using the previous recurrence formula for
and because pn(xj) = 0, we have

where ![\tilde{P}=[p_0 (x_j),p_1 (x_j),...,p_{n-1}(x_j)]^{T}](http://upload.wikimedia.org/math/e/4/0/e40d7fca88274e88ea1ca5ff6dac2d2e.png)
and J is the so-called Jacobi matrix:

The nodes of gaussian quadrature can therefore be computed as the eigenvalues of a tridiagonal matrix.
For computing the weights and nodes, it is preferable to consider the symmetric tridiagonal matrix
with elements
,
and
.
and
are equivalent and therefore have the same eigenvalues (the nodes). The weights can be computed from the matrix J. If φ(j) is a normalized eigenvector (i.e., an eigenvector with euclidean norm equal to one) associated to the eigenvalue xj, the corresponding weight can be computed from the first component of this eigenvector, namely:

where μ0 is the integral of the weight function

See, for instance, (Gil, Segura & Temme 2007) for further details.
[edit] Error estimates
The error of a Gaussian quadrature rule can be stated as follows (Stoer & Bulirsch 2002, Thm 3.6.24). For an integrand which has 2n continuous derivatives,
for some ξ in (a, b), where pn is the orthogonal polynomial of order n and where
In the important special case of ω(x) = 1, we have the error estimate (Kahaner, Moler & Nash 1989, §5.2)
Stoer and Bulirsch remark that this error estimate is inconvenient in practice, since it may be difficult to estimate the order 2n derivative, and furthermore the actual error may be much less than a bound established by the derivative. Another approach is to use two Gaussian quadrature rules of different orders, and to estimate the error as the difference between the two results. For this purpose, Gauss–Kronrod quadrature rules can be useful.
[edit] Gauss–Kronrod rules
If the interval [a, b] is subdivided, the Gauss evaluation points of the new subintervals never coincide with the previous evaluation points (except at zero for odd numbers), and thus the integrand must be evaluated at every point. Gauss–Kronrod rules are extensions of Gauss quadrature rules generated by adding n + 1 points to an n-point rule in such a way that the resulting rule is of order 3n + 1. This allows for computing higher-order estimates while re-using the function values of a lower-order estimate. The difference between a Gauss quadrature rule and its Kronrod extension are often used as an estimate of the approximation error.
[edit] References
- Abramowitz, Milton; Stegun, Irene A., eds. (1972), "§25.4, Integration", Handbook of Mathematical Functions (with Formulas, Graphs, and Mathematical Tables), Dover, ISBN 978-0-486-61272-0
- Gil, Amparo; Segura, Javier; Temme, Nico M. (2007), "§5.3: Gauss quadrature", Numerical Methods for Special Functions, SIAM, ISBN 978-0-898716-34-4
- Kahaner, David; Moler, Cleve; Nash, Stephen (1989), Numerical Methods and Software, Prentice-Hall, ISBN 978-0-13-627258-8
- Press, William H.; Flannery, Brian P.; Teukolsky, Saul A.; Vetterling, William T. (1988), "§4.5: Gaussian Quadratures and Orthogonal Polynomials", Numerical Recipes in C (2nd ed.), Cambridge University Press, ISBN 978-0-521-43108-8
- Stoer, Josef; Bulirsch, Roland (2002), Introduction to Numerical Analysis (3rd ed.), Springer, ISBN 978-0-387-95452-3.
- Kaw, Autar; Kalu, Egwu (2008), Numerical Methods with Applications (1st ed.), www.autarkaw.com.
[edit] External links
- ALGLIB contains a collection of algorithms for numerical integration (in C# / C++ / Delphi / Visual Basic / etc.)
- GNU Scientific Library - includes C version of QUADPACK algorithms (see also GNU Scientific Library)
- Gaussian Quadrature Rule of Integration - Notes, PPT, Matlab, Mathematica, Maple, Mathcad at Holistic Numerical Methods Institute
- Gaussian Quadrature table at sitmo.com
- Legendre-Gauss Quadrature at MathWorld
- Gaussian Quadrature by Chris Maes and Anton Antonov, Wolfram Demonstrations Project.
- High-precision abscissas and weights for Gaussian Quadrature for n = 2, ..., 20, 32, 64, 100, 128, 256, 512, 1024 also contains C language source code under LGPL license.


























![\frac{(b-a)^{2n+1} (n!)^4}{(2n+1)[(2n)!]^3} f^{(2n)} (\xi) , \qquad a < \xi < b . \,\!](http://upload.wikimedia.org/math/4/9/1/491af0702cc44d4ad5bef4992a40370f.png)

