next up previous
Next: Quadrature Error Up: M243 Lecture Notes Previous: Convergence Rate of Secant

Quadrature

One obvious way of approximating the value of $\int _a^bf(x)dx$ is by $\int _a^bp(x)dx$, where p is an interpolating polynomial to f at various points, usually but not necessarily, in [a,b]. We write the Lagrange form with interpolation points $x_0, x_1,\ldots ,x_n$, as f(x)=p(x)+e(x), where $ p(x)=\sum _{i=0}^n\ell _i(x)f(x_i)$ in the usual notation, and e(x) is the pointwise error. Integrating this, we obtain

\begin{displaymath}
\begin{array}
{lcl}\int _a^bf(x)dx & = & \int _a^bp(x)dx+\int _a^be(x)dx\\ & = & \sum _{i=0}^nH_if(x_i)+E(f),\end{array} \end{displaymath}

The first part of this gives the quadrature formula, and is simply a weighted sum of the values of the function at the interpolation or quadrature points, xi; the quadrature weights are $H_i=\int _a^b\ell
_i(x)dx$. The second part gives the quadrature error, which is

\begin{displaymath}
E(f)=\int _a^bf(x)dx-\sum _{i=0}^nH_if(x_i). \end{displaymath}

Recall that, when f(x) is any polynomial of degree n or less, it is represented exactly by p(x), and so the quadrature error vanishes in this case. Taking successively f(x) as $1,x,x^2,\ldots
,x^n$ we find

\begin{displaymath}
0=E(x^k)=\int _a^bx^kdx-\sum _{i=0}^nH_ix_i^k,\quad k=0,1,\ldots ,n.\end{displaymath}

These are of course exactly the equations we used previously in the method of undetermined coefficients. Can we always solve them? They are, in displayed form,

\begin{displaymath}
\begin{array}
{lcl}H_0+H_1+\cdots +H_n & = & b-a\\ H_0x_0+H_...
 ...\cdots +H_nx_n^n & = & \frac{b^{n+1}-a^{n+1}}{n+1},\end{array} \end{displaymath}

or in matrix form

\begin{displaymath}
\left[ \begin{array}
{cccc}
1 & 1 & \cdots & 1\\ x_0 & x_1 &...
 ...2}\\ \vdots
\\ \frac{b^{n+1}-a^{n+1}}{n+1}\end{array} \right]. \end{displaymath}

We know that the Vandermonde determinant is nonzero if the interpolating points are distinct, so we can always solve the problem in this case.

With the coefficients determined in this way, let $f(x)=a_0+a_1x+\cdots
+a_nx^n$. Then

\begin{displaymath}
\begin{array}
{lcl}\int _a^bf(x)dx & = & a_0\int _a^b1dx+a_1...
 ...i+\cdots +a_nx_i^n)\\ & = & \sum _{i=0}^nH_if(x_i).\end{array} \end{displaymath}

This shows that the formula derived in this way is exact for all polynomials of degree n or less.



 
next up previous
Next: Quadrature Error Up: M243 Lecture Notes Previous: Convergence Rate of Secant
John Gilbert
5/8/1998