 #jsDisabledContent { display:none; } My Account |  Register |  Help Flag as Inappropriate This article will be permanently flagged as inappropriate and made unaccessible to everyone. Are you certain this article is inappropriate?          Excessive Violence          Sexual Content          Political / Social Email this Article Email Address:

Article Id: WHEBN0016866924
Reproduction Date:

 Title: Gauss quadrature Author: World Heritage Encyclopedia Language: English Subject: Collection: Publisher: World Heritage Encyclopedia Publication Date:

"Gaussian integration" redirects here. For the integral of a Gaussian function, see Gaussian integral.

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

$\int_\left\{-1\right\}^1 f\left(x\right)\,dx \approx \sum_\left\{i=1\right\}^n w_i f\left(x_i\right).$

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 not, for example, suitable for functions with singularities. However, if the integrated function can be written as $f\left(x\right) = \omega\left(x\right) g\left(x\right)\,$, where g(x) is approximately polynomial, and ω(x) is known, then there are alternative weights $w_i\text{'}$ such that

$\int_\left\{-1\right\}^1 f\left(x\right)\,dx = \int_\left\{-1\right\}^1 \omega\left(x\right) g\left(x\right)\,dx \approx \sum_\left\{i=1\right\}^n w_i\text{'} g\left(x_i\right).$

Common weighting functions include $\omega\left(x\right)=\left(1-x^2\right)^\left\{-1/2\right\}\,$ (Chebyshev–Gauss) and $\omega\left(x\right)=e^\left\{-x^2\right\}$ (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.

For the simplest integration problem stated above, i.e. with $\omega\left(x\right)=1$, the associated polynomials are Legendre polynomials, Pn(x), and the method is usually known as Gauss–Legendre quadrature. 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)

$w_i = \frac\left\{2\right\}\left\{\left\left( 1-x_i^2 \right\right) \left[P\text{'}_n\left(x_i\right)\right]^2\right\}. \,\!$

Some low-order rules for solving the integration problem are listed below.

Number of points, n Points, xi Weights, wi
1 0 2
2 $\pm \sqrt\left\{3\right\}/3$ 1
3 0 89
$\pm\sqrt\left\{3/5\right\}$ 59
4 $\pm\sqrt\left\{\Big\left( 3 - 2\sqrt\left\{6/5\right\} \Big\right)/7\right\}$ $\tfrac\left\{18+\sqrt\left\{30\right\}\right\}\left\{36\right\}$
$\pm\sqrt\left\{\Big\left( 3 + 2\sqrt\left\{6/5\right\} \Big\right)/7\right\}$ $\tfrac\left\{18-\sqrt\left\{30\right\}\right\}\left\{36\right\}$
5 0 128225
$\pm\tfrac13\sqrt\left\{5-2\sqrt\left\{10/7\right\}\right\}$ $\tfrac\left\{322+13\sqrt\left\{70\right\}\right\}\left\{900\right\}$
$\pm\tfrac13\sqrt\left\{5+2\sqrt\left\{10/7\right\}\right\}$ $\tfrac\left\{322-13\sqrt\left\{70\right\}\right\}\left\{900\right\}$

## Change of interval

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:



\int_a^b f(x)\,dx = \frac{b-a}{2} \int_{-1}^1 f\left(\frac{b-a}{2}z + \frac{a+b}{2}\right)\,dz.

After applying the Gaussian quadrature rule, the following approximation is:



\int_a^b f(x)\,dx \approx \frac{b-a}{2} \sum_{i=1}^n w_i f\left(\frac{b-a}{2}z_i + \frac{a+b}{2}\right).

## Other forms

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

$\int_a^b \omega\left(x\right)\,f\left(x\right)\,dx$

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] $1\,$ Legendre polynomials 25.4.29 Section Gauss–Legendre quadrature, above
(−1, 1) $\left(1-x\right)^\alpha \left(1+x\right)^\beta,\quad \alpha, \beta > -1\,$ Jacobi polynomials 25.4.33 ($\beta=0$) Gauss–Jacobi quadrature
(−1, 1) $\frac\left\{1\right\}\left\{\sqrt\left\{1 - x^2\right\}\right\}$ Chebyshev polynomials (first kind) 25.4.38 Chebyshev–Gauss quadrature
[−1, 1] $\sqrt\left\{1 - x^2\right\}$ Chebyshev polynomials (second kind) 25.4.40 Chebyshev–Gauss quadrature
[0, ∞) $e^\left\{-x\right\}\,$ Laguerre polynomials 25.4.45 Gauss–Laguerre quadrature
[0, ∞) $x^\alpha e^\left\{-x\right\}\,$ Generalized Laguerre polynomials Gauss–Laguerre quadrature
(−∞, ∞) $e^\left\{-x^2\right\}$ Hermite polynomials 25.4.46 Gauss–Hermite quadrature

### Fundamental theorem

Let $p_n$ be a nontrivial polynomial of degree n such that



\int_a^b \omega(x) \, x^k p_n(x) \, dx = 0, \quad \text{for all }k=0,1,\ldots,n-1.

If we pick the n nodes xi to be the zeros of pn, then there exist n weights wi which make the Gauss-quadrature computed integral exact for all polynomials $h\left(x\right)$ of degree 2n − 1 or less. Furthermore, all these nodes xi will lie in the open interval (a, b) (Stoer & Bulirsch 2002, pp. 172–175).

The polynomial $p_n$ is said to be an orthogonal polynomial of degree n associated to the weight function $\omega \left(x\right)$. It is unique up to a constant normalization factor. The idea underlying the proof is that, because of its sufficiently low degree, $h\left(x\right)$ can be divided by $p_n\left(x\right)$ to produce a quotient $q\left(x\right)$ of degree strictly lower than n, and a remainder $r\left(x\right)$ of still lower degree, so that both will be orthogonal to $p_n\left(x\right)$, by the defining property of $p_n\left(x\right)$. Thus

$\int_a^b \omega\left(x\right)\,h\left(x\right)\,dx = \int_a^b \omega\left(x\right)\,r\left(x\right)\,dx.$

Because of the choice of nodes xi, the corresponding relation

$\sum_\left\{i=1\right\}^n w_i h\left(x_i\right) = \sum_\left\{i=1\right\}^n w_i r\left(x_i\right)$

holds also. The exactness of the computed integral for $h\left(x\right)$ then follows from corresponding exactness for polynomials of degree only n or less (as is $r\left(x\right)$).

#### General formula for the weights

The weights can be expressed as

$w_\left\{i\right\} = \frac\left\{a_\left\{n\right\}\right\}\left\{a_\left\{n-1\right\}\right\}\frac\left\{\int_\left\{a\right\}^\left\{b\right\}\omega\left(x\right)p_\left\{n-1\right\}\left(x\right)^\left\{2\right\}dx\right\}\left\{p\text{'}_\left\{n\right\}\left(x_\left\{i\right\}\right)p_\left\{n-1\right\}\left(x_\left\{i\right\}\right)\right\}$ (1)

where $a_\left\{k\right\}$ is the coefficient of $x^\left\{k\right\}$ in $p_\left\{k\right\}\left(x\right)$. To prove this, note that using Lagrange interpolation one can express $r\left(x\right)$ in terms of $r\left(x_\left\{i\right\}\right)$ as

$r\left(x\right) = \sum_\left\{i=1\right\}^\left\{n\right\}r\left(x_\left\{i\right\}\right)\prod_\left\{\begin\left\{smallmatrix\right\}1\leq j\leq n\\j\neq i\end\left\{smallmatrix\right\}\right\}\frac\left\{x-x_\left\{j\right\}\right\}\left\{x_\left\{i\right\}-x_\left\{j\right\}\right\}$

because r(x) has degree less than n and is thus fixed by the values it attains at n different points. Multiplying both sides by $\omega\left(x\right)$ and integrating from a to b yields

$\int_\left\{a\right\}^\left\{b\right\}\omega\left(x\right)r\left(x\right)dx= \sum_\left\{i=1\right\}^\left\{n\right\}r\left(x_\left\{i\right\}\right)\int_\left\{a\right\}^\left\{b\right\}\omega\left(x\right)\prod_\left\{\begin\left\{smallmatrix\right\}1\leq j\leq n\\j\neq i\end\left\{smallmatrix\right\}\right\}\frac\left\{x-x_\left\{j\right\}\right\}\left\{x_\left\{i\right\}-x_\left\{j\right\}\right\}dx$

The weights $w_\left\{i\right\}$ are thus given by

$w_\left\{i\right\} = \int_\left\{a\right\}^\left\{b\right\}\omega\left(x\right)\prod_\left\{\begin\left\{smallmatrix\right\}1\leq j\leq n\\j\neq i\end\left\{smallmatrix\right\}\right\}\frac\left\{x-x_\left\{j\right\}\right\}\left\{x_\left\{i\right\}-x_\left\{j\right\}\right\}dx$

This integral expression for $w_\left\{i\right\}$ can be expressed in terms of the orthogonal polynomials $p_\left\{n\right\}\left(x\right)$ and $p_\left\{n+1\right\}\left(x\right)$ as follows.

We can write

$\prod_\left\{\begin\left\{smallmatrix\right\}1\leq j\leq n\\j\neq i\end\left\{smallmatrix\right\}\right\}\left\left(x-x_\left\{j\right\}\right\right) = \frac\left\{\prod_\left\{1\leq j\leq n\right\} \left\left(x - x_\left\{j\right\}\right\right)\right\}\left\{x-x_\left\{i\right\}\right\} = \frac\left\{p_\left\{n\right\}\left(x\right)\right\}\left\{a_\left\{n\right\}\left\left(x-x_\left\{i\right\}\right\right)\right\}$

where $a_\left\{n\right\}$ is the coefficient of $x^\left\{n\right\}$ in $p_\left\{n\right\}\left(x\right)$. Taking the limit of x to $x_\left\{i\right\}$ yields using L'Hôpital's rule

$\prod_\left\{\begin\left\{smallmatrix\right\}1\leq j\leq n\\j\neq i\end\left\{smallmatrix\right\}\right\}\left\left(x_\left\{i\right\}-x_\left\{j\right\}\right\right) = \frac\left\{p\text{'}_\left\{n\right\}\left(x_\left\{i\right\}\right)\right\}\left\{a_\left\{n\right\}\right\}$

We can thus write the integral expression for the weights as

$w_\left\{i\right\} = \frac\left\{1\right\}\left\{p\text{'}_\left\{n\right\}\left(x_\left\{i\right\}\right)\right\}\int_\left\{a\right\}^\left\{b\right\}\omega\left(x\right)\frac\left\{p_\left\{n\right\}\left(x\right)\right\}\left\{x-x_\left\{i\right\}\right\}dx$ (2)

In the integrand, writing

$\frac\left\{1\right\}\left\{x-x_\left\{i\right\}\right\} = \frac\left\{1-\left\left(\frac\left\{x\right\}\left\{x_\left\{i\right\}\right\}\right\right)^\left\{k\right\}\right\}\left\{x-x_\left\{i\right\}\right\} + \left\left(\frac\left\{x\right\}\left\{x_\left\{i\right\}\right\}\right\right)^\left\{k\right\} \frac\left\{1\right\}\left\{x-x_\left\{i\right\}\right\}$

yields

$\int_\left\{a\right\}^\left\{b\right\}\omega\left(x\right)\frac\left\{x^\left\{k\right\}p_\left\{n\right\}\left(x\right)\right\}\left\{x-x_\left\{i\right\}\right\}dx= x_\left\{i\right\}^\left\{k\right\}\int_\left\{a\right\}^\left\{b\right\}\omega\left(x\right)\frac\left\{p_\left\{n\right\}\left(x\right)\right\}\left\{x-x_\left\{i\right\}\right\}dx$

provided $k\leq n$, because $\frac\left\{1-\left\left(\frac\left\{x\right\}\left\{x_\left\{i\right\}\right\}\right\right)^\left\{k\right\}\right\}\left\{x-x_\left\{i\right\}\right\}$ is a polynomial of degree k-1 which is then orthogonal to $p_\left\{n\right\}\left(x\right)$. So, if q(x) is a polynomial of at most nth degree we have

$\int_\left\{a\right\}^\left\{b\right\}\omega\left(x\right)\frac\left\{p_\left\{n\right\}\left(x\right)\right\}\left\{x-x_\left\{i\right\}\right\}dx=\frac\left\{1\right\}\left\{q\left(x_\left\{i\right\}\right)\right\}\int_\left\{a\right\}^\left\{b\right\}\omega\left(x\right)\frac\left\{q\left(x\right)p_\left\{n\right\}\left(x\right)\right\}\left\{x-x_\left\{i\right\}\right\}dx$

We can evaluate the integral on the right hand side for $q\left(x\right) = p_\left\{n-1\right\}\left(x\right)$ as follows. Because $\frac\left\{p_\left\{n\right\}\left(x\right)\right\}\left\{x-x_\left\{i\right\}\right\}$ is a polynomial of degree n-1, we have

$\frac\left\{p_\left\{n\right\}\left(x\right)\right\}\left\{x-x_\left\{i\right\}\right\} = a_\left\{n\right\}x^\left\{n-1\right\} + s\left(x\right)$

where s(x) is a polynomial of degree n-2. Since s(x) is orthogonal to $p_\left\{n-1\right\}\left(x\right)$ we have

$\int_\left\{a\right\}^\left\{b\right\}\omega\left(x\right)\frac\left\{p_\left\{n\right\}\left(x\right)\right\}\left\{x-x_\left\{i\right\}\right\}dx=\frac\left\{a_\left\{n\right\}\right\}\left\{p_\left\{n-1\right\}\left(x_\left\{i\right\}\right)\right\}\int_\left\{a\right\}^\left\{b\right\}\omega\left(x\right)p_\left\{n-1\right\}\left(x\right)x^\left\{n-1\right\}dx$

We can then write

$x^\left\{n-1\right\} = \left\left(x^\left\{n-1\right\} - \frac\left\{p_\left\{n-1\right\}\left(x\right)\right\}\left\{a_\left\{n-1\right\}\right\}\right\right) + \frac\left\{p_\left\{n-1\right\}\left(x\right)\right\}\left\{a_\left\{n-1\right\}\right\}$

The term in the brackets is a polynomial of degree n-2, which is therefore orthogonal to $p_\left\{n-1\right\}\left(x\right)$. The integral can thus be written as

$\int_\left\{a\right\}^\left\{b\right\}\omega\left(x\right)\frac\left\{p_\left\{n\right\}\left(x\right)\right\}\left\{x-x_\left\{i\right\}\right\}dx=\frac\left\{a_\left\{n\right\}\right\}\left\{a_\left\{n-1\right\}p_\left\{n-1\right\}\left(x_\left\{i\right\}\right)\right\}\int_\left\{a\right\}^\left\{b\right\}\omega\left(x\right)p_\left\{n-1\right\}\left(x\right)^\left\{2\right\}dx$

According to Eq. (2), the weights are obtained by dividing this by $p\text{'}_\left\{n\right\}\left(x_\left\{i\right\}\right)$ and that yields the expression in Eq. (1).

#### Proof that the weights are positive

Consider the following polynomial of degree 2n-2

$f\left(x\right) = \prod_\left\{\begin\left\{smallmatrix\right\}1\leq j\leq n\\j\neq i\end\left\{smallmatrix\right\}\right\}\left(x-x_\left\{j\right\}\right)^\left\{2\right\}$

where as above the $x_\left\{j\right\}$ are the roots of the polynomial $p_\left\{n\right\}\left(x\right)$. Since the degree of f(x) is less than 2n-1, the Gaussian quadrature formula involving the weights and nodes obtained from $p_\left\{n\right\}\left(x\right)$ applies. Since $f\left(x_\left\{j\right\}\right)=0$ for j not equal to i, we have

$\int_\left\{a\right\}^\left\{b\right\}\omega\left(x\right)f\left(x\right)=\sum_\left\{j=1\right\}^\left\{N\right\}w_\left\{j\right\}f\left(x_\left\{j\right\}\right) = w_\left\{i\right\} f\left(x_\left\{i\right\}\right).$

Since both $\omega\left(x\right)$ and f(x) are non-negative functions, it follows that $w_\left\{i\right\}>0$.

### Computation of Gaussian quadrature rules

For computing the nodes $x_i$ and weights $w_i$ 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. For n points, these nodes and weights can be computed in O(n2) operations by an algorithm derived by Gautschi (1968).

#### Gautschi's theorem

Gautschi's theorem (Gautschi, 1968) states that orthogonal polynomials $p_r$ with $\left(p_r,p_s\right)=0$ for $r\ne s$ for a scalar product $\left( , \right)$ to be specified later, degree$\left(p_r\right)=r$ and leading coefficient one (i.e. monic orthogonal polynomials) satisfy the recurrence relation

$p_\left\{r+1\right\}\left(x\right)=\left(x-a_\left\{r,r\right\}\right)p_r\left(x\right)-a_\left\{r,r-1\right\}p_\left\{r-1\right\}\left(x\right)\ldots-a_\left\{r,0\right\}p_0\left(x\right)$

for $r=0,1,\ldots,n-1$ where $n$ is the maximal degree which can be taken to be infinity, and where $a_\left\{r,s\right\}=\left(xp_r,p_s\right)/\left(p_s,p_s\right)$. First of all, it is obvious that the polynomials defined by the recurrence relation starting with $p_0\left(x\right)=1$ have leading coefficient one and correct degree. Given the starting point by $p_0$, the orthogonality of $p_r$ can be shown by induction. For $r=s=0$ one has

$\left(p_1,p_0\right)=\left(\left(x-a_\left\{0,0\right\}p_0,p_0\right)=\left(xp_0,p_0\right)-a_\left\{0,0\right\}\left(p_0,p_0\right)=\left(xp_0,p_0\right)-\left(xp_0,p_0\right)=0.$

Now if $p_0,p_1,\ldots,p_r$ are orthogonal, then also $p_\left\{r+1\right\}$, because in

$\left(p_\left\{r+1\right\},p_s\right)=\left(xp_r,p_s\right)-a_\left\{r,r\right\}\left(p_r,p_s\right)-a_\left\{r,r-1\right\}\left(p_\left\{r-1\right\},p_s\right)\ldots-a_\left\{r,0\right\}\left(p_0,p_s\right)$

all scalar products vanish except for the first one and the one where $p_s$ meets the same orthogonal polynom. Therefore,

$\left(p_\left\{r+1\right\},p_s\right)=\left(xp_r,p_s\right)-a_\left\{r,s\right\}\left(p_s,p_s\right)=\left(xp_r,p_s\right)-\left(xp_r,p_s\right)=0.$

However, if the scalar product satisfies $\left(xf,g\right)=\left(f,xg\right)$ (which is the case for Gaussian quadrature), the recurrence relation reduces to a three-term recurrence relation: For $s\le r-1$, $xp_s$ is a polynomial of degree less or equal to $r-1$. On the other hand, $p_r$ is orthogonal to every polynomial of degree less or equal to $r-1$. Therefore, one has $\left(xp_r,p_s\right)=\left(p_r,xp_s\right)=0$ and $a_\left\{r,s\right\}=0$ for

$p_\left\{r+1\right\}\left(x\right)=\left(x-a_r\right)p_r\left(x\right)-b_rp_\left\{r-1\right\}\left(x\right)$

(with the convention $p_\left\{-1\right\}\left(x\right)\equiv 0$) where

$a_r:=\frac\left\{\left(xp_r,p_r\right)\right\}\left\{\left(p_r,p_r\right)\right\},\qquad$

b_r:=\frac{(xp_r,p_{r-1})}{(p_{r-1},p_{r-1})}=\frac{(p_r,p_r)}{(p_{r-1},p_{r-1})} (the last because of $\left(xp_r,p_\left\{r-1\right\}\right)=\left(p_r,xp_\left\{r-1\right\}\right)=\left(p_r,p_r\right)$, since $xp_\left\{r-1\right\}$ differs from $p_r$ by a degree less than $r$).

#### The Golub-Welsch algorithm

The three-term recurrence relation can be written in the matrix form $J\tilde\left\{P\right\}=x\tilde\left\{P\right\}$ where $\tilde\left\{P\right\}=\left[p_0\left(x\right),p_1\left(x\right),...,p_\left\{n-1\right\}\left(x\right)\right]^\left\{T\right\}$ and $J$ is the so-called Jacobi matrix:



\mathbf{J}=\left( \begin{array}{llllll} a_0 & 1 & 0 & \ldots & \ldots & \ldots\\ b_1 & a_1 & 1 & 0 & \ldots & \ldots \\ 0 & b_2 & a_2 & 1 & 0 & \ldots \\ 0 & \ldots & \ldots & \ldots & \ldots & 0 \\ \ldots & \ldots & 0 & b_{n-2} & a_{n-2} & 1 \\ \ldots & \ldots & \ldots & 0 & b_{n-1} & a_{n-1} \end{array} \right). The zeros $x_j$ of the polynomials up to degree $n$ which are used as nodes for the Gaussian quadrature can be found by computing the eigenvalues of this tridiagonal matrix. This procedure is known as Golub–Welsch algorithm.

For computing the weights and nodes, it is preferable to consider the symmetric tridiagonal matrix $\mathcal\left\{J\right\}$ with elements $\mathcal\left\{J\right\}_\left\{i,i\right\}=J_\left\{i,i\right\}=a_\left\{i-1\right\},\, i=1,\ldots,n$ and $\mathcal\left\{J\right\}_\left\{i-1,i\right\}=\mathcal\left\{J\right\}_\left\{i,i-1\right\}=\sqrt\left\{J_\left\{i,i-1\right\}J_\left\{i-1,i\right\}\right\}=\sqrt\left\{b_\left\{i-1\right\}\right\},\, i=2,\ldots,n.$ $\mathbf\left\{J\right\}$ and $\mathcal\left\{J\right\}$ are similar matrices and therefore have the same eigenvalues (the nodes). The weights can be computed from the corresponding eigenvectors: If $\phi^\left\{\left(j\right)\right\}$ is a normalized eigenvector (i.e., an eigenvector with euclidean norm equal to one) associated to the eigenvalue $x_j$, the corresponding weight can be computed from the first component of this eigenvector, namely:



w_j=\mu_0 \left(\phi_1^{(j)}\right)^2

where $\mu_0$ is the integral of the weight function



\mu_0=\int_a^b \omega(x) dx.

See, for instance, (Gil, Segura & Temme 2007) for further details.

There are alternative methods for obtaining the same weights and nodes in O(n) operations using the Prüfer Transform.

### 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,

$\int_a^b \omega\left(x\right)\,f\left(x\right)\,dx - \sum_\left\{i=1\right\}^n w_i\,f\left(x_i\right)$
= \frac{f^{(2n)}(\xi)}{(2n)!} \, (p_n,p_n)


for some ξ in (a, b), where pn is the monic (i.e. the leading coefficient is 1) orthogonal polynomial of degree n and where

$\left(f,g\right) = \int_a^b \omega\left(x\right) f\left(x\right) g\left(x\right) \, dx . \,\!$

In the important special case of ω(x) = 1, we have the error estimate (Kahaner, Moler & Nash 1989, §5.2)

$\frac\left\{\left(b-a\right)^\left\{2n+1\right\} \left(n!\right)^4\right\}\left\{\left(2n+1\right)\left[\left(2n\right)!\right]^3\right\} f^\left\{\left(2n\right)\right\} \left(\xi\right) , \qquad a < \xi < b . \,\!$

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.

Important consequence of the above equation is that Gaussian quadrature of order n is accurate for all polynomials up to degree 2n–1.

### 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.

### Gauss–Lobatto rules

Also known as Lobatto quadrature (Abramowitz & Stegun 1972, p. 888), named after Dutch mathematician Rehuel Lobatto.

It is similar to Gaussian quadrature with the following differences:

1. The integration points include the end points of the integration interval.
2. It is accurate for polynomials up to degree 2n–3, where n is the number of integration points.

Lobatto quadrature of function f(x) on interval [–1, +1]:


   \int_{-1}^1 {f(x) \, dx} =
\frac {2} {n(n-1)}[f(1) + f(-1)] +
\sum_{i = 2} ^{n-1} {w_i f(x_i)} + R_n.


Abscissas: $x_i$ is the $\left(i-1\right)$st zero of $P\text{'}_\left\{n-1\right\}\left(x\right)$.

Weights:


   w_i = \frac{2}{n(n-1)[P_{n-1}(x_i)]^2} \quad (x_i \ne \pm 1).


Remainder: 

   R_n = \frac
{- n (n-1)^3 2^{2n-1} [(n-2)!]^4}
{(2n-1) [(2n-2)!]^3}
f^{(2n-2)}(\xi), \quad (-1 < \xi < 1)


Some of the weights are:

Number of points, n Points, xi Weights, wi
$3$ $0$ $\frac\left\{4\right\}\left\{3\right\}$
$\pm 1$ $\frac\left\{1\right\}\left\{3\right\}$
$4$ $\pm \sqrt\left\{\frac \left\{1\right\} \left\{5\right\}\right\}$ $\frac\left\{5\right\}\left\{6\right\}$
$\pm 1$ $\frac\left\{1\right\}\left\{6\right\}$
$5$ $0$ $\frac\left\{32\right\}\left\{45\right\}$
$\pm\sqrt\left\{\frac \left\{3\right\} \left\{7\right\}\right\}$ $\frac\left\{49\right\}\left\{90\right\}$
$\pm 1$ $\frac\left\{1\right\}\left\{10\right\}$