- Gaussian quadrature
In
numerical analysis , a quadrature rule is an approximation of the definite integral of a function, usually stated as aweighted sum of function values at specified points within the domain of integration.(Seenumerical integration for more on quadrature rules.)An "n"-point Gaussian quadrature rule, named afterCarl Friedrich Gauss , is a quadrature rule constructed to yield an exact result forpolynomial s of degree 2"n" − 1 or less by a suitable choice of the points "x""i" and weights "w""i" 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 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 oforthogonal polynomials .Rules for the basic problem
For the integration problem stated above,the associated polynomials are
Legendre polynomials , "P""n"("x"). With the "n"th polynomial normalized to give "P""n"(1) = 1, the "i"th Gauss node, "x""i", is the "i"th root of "P""n"; its weight is given by Harv|Abramowitz|Stegun|1972|loc=p. 887:Some low-order rules for solving the integration problem are listed below.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:
:
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).Fundamental theorem
Let be a nontrivial polynomial of degree "n" such that
:
If we pick the nodes to be the zeros of , then there exist weights "w""i" which make the computed integral exact for all polynomials of degree 2"n" − 1 or less. Furthermore, all these nodes will lie in the open interval ("a", "b") harv|Stoer|Bulirsch|2002|pp=172–175.
The polynomial is said to be an orthogonal polynomial of degree "n" associated to the weight function . It is unique up to a constant normalization factor.
Computation of Gaussian quadrature rules
For computing the nodes and weights 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, 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 harv|Gil|Segura|Temme|2007.
The starting idea comes from the observation that, if is a root of the orthogonal polynomial then, using the previous recurrence formula for and because , we have
where
and 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 . If is a normalized eigenvector (i.e., an eigenvector with euclidean norm equal to one) associated to the eigenvalue , the corresponding weight can be computed fromthe first component of this eigenvector, namely:
where is the integral of the weight function
See, for instance, harv|Gil|Segura|Temme|2007 for further details.
Error estimates
The error of a Gaussian quadrature rule can be stated as follows harv|Stoer|Bulirsch|2002|loc=Thm 3.6.24.For an integrand which has 2"n" continuous derivatives,
:
for some ξ in ("a", "b"), where "p""n" is the orthogonal polynomial of order "n" and where
:
In the important special case of ω("x") = 1, we have the error estimate Harv|Kahaner|Moler|Nash|1989|loc=§5.2
:
Stoer and Bulirsch remark that this error estimate is inconvenient in practice,since it may be difficult to estimate the order 2"n" 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.
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 points to an -point rule in such a way that the resulting rule is of order .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.
References
*
*
*
*
*.External links
* [http://www.alglib.net/integral/gq/ ALGLIB] contains a collection of algorithms for numerical integration (in C# / C++ / Delphi / Visual Basic / etc.)
* [http://www.gnu.org/software/gsl/ GNU Scientific Library] - includes C version of QUADPACK algorithms (see alsoGNU Scientific Library )
* [http://numericalmethods.eng.usf.edu/topics/gauss_quadrature.html Gaussian Quadrature Rule of Integration - Notes, PPT, Matlab, Mathematica, Maple, Mathcad] at "Holistic Numerical Methods Institute"
* [http://www.sitmo.com/eqcat/13 Gaussian Quadrature table] at sitmo.com
* [http://mathworld.wolfram.com/Legendre-GaussQuadrature.html Legendre-Gauss Quadrature at MathWorld]
* [http://demonstrations.wolfram.com/GaussianQuadrature/ Gaussian Quadrature] by Chris Maes and Anton Antonov,The Wolfram Demonstrations Project .
Wikimedia Foundation. 2010.