next up previous
Next: Newton's Divided Differences Up: Interpolation Previous: Lagrange Formula

Pointwise Error

Clearly the interpolating polynomial has zero error at the interpolating points, but we now want to investigate the behaviour of the pointwise error, e(x)=f(x)-p(x), at all points. This is given by the following theorem.

Theorem 1736

Let f(n+1) exist on [a,b] and let p be the polynomial for which p(xi)=f(xi) at the n+1 distinct points $x_0,x_1,\ldots ,x_n$ in [a,b]. Then, for each x in [a,b] there exists a point $\xi $ (which depends on x) in the interval

\begin{displaymath}
\left( \min \left\{ x_0,x_1,\ldots ,x_n,x \right\} ,\max \left\{ x_0,x_1,\ldots
,x_n,x \right\} \right), \end{displaymath}

such that

\begin{displaymath}
e(x)=f(x)-p(x)=\frac{\Pi (x)f^{(n+1)}(\xi )}{(n+1)!}. \end{displaymath}

[Note that the order of points is not significant and that this form is very similar to the Taylor remainder $\frac{(x-a)^nf^{(n+1)}(\xi
)}{(n+1)!}$. The proof is also similar.]
\begin{trivlist}
% latex2html id marker 1164
\item[]
{\bf Proof.}Define the func...
 ...ed result after rearrangement.\nolinebreak
\hfill \rule{2mm}{2mm} \end{trivlist}

Corollary 1742

If f is a polynomial of degree at most n then the interplating polynomial of degree n is f.


\begin{trivlist}
\item[]
{\bf Proof.}In this case $f^{(n+1)}$\space is the zero function.\nolinebreak
\hfill \rule{2mm}{2mm} \end{trivlist}
Example Find a bound on the error in approximating e-x on [0.0.2] by its interpolating quadratic at 0, 0.1, 0.2.

The error is given by  
 \begin{displaymath}
\left\vert \kern.05em f(x)-p(x) \kern.05em \right\vert=\left...
 ...ht\vert
\left\vert \kern.05em f'''(\xi ) \kern.05em \right\vert\end{displaymath} (1)
for some $\xi \in (0,0.2)$. We have

\begin{displaymath}
\left\vert \kern.05em f'''(\xi ) \kern.05em \right\vert=e^{-\xi }\leq 1~~~\mbox{ since }\xi \gt. \end{displaymath}

We use elementary calculus to find bounds for x(x-0.1)(x-0.2)=x3-0.3x2+0.02x. To find the extrema

\begin{displaymath}
0=[x(x-0.1)(x-0.2)]'=3x^2-0.6x+0.02\Rightarrow x=0.1\left( 1\pm
\frac{1}{\sqrt{3}} \right) .\end{displaymath}

The values at these extrema are

\begin{displaymath}
\left( 0.1\pm \frac{0.1}{\sqrt{3}} \right)\left( \pm
\frac{0...
 ...( \frac{0.01}{3}-0.01 \right)=\mp \frac{2}{3\sqrt{3}}10^{-3}.
 \end{displaymath}

Putting these two results into ([*]), we obtain the bound

\begin{displaymath}
\left\vert \kern.05em f(x)-p(x) \kern.05em \right\vert\leq \frac{1}{3!}\frac{2}{3\sqrt{3}}10^{-3}\approx
0.6\times 10^{-4}, \end{displaymath}

so we obtain 4 figure accuracy.

It is interesting to note that 4-figure tables give the value of the function at a tabular interval of 0.01, which is required to give the correct answer using linear interpolation. With quadratic interpolation, over this part of the table at least, the tabular interval only needs to be 0.1!

To see how good the error estimate is in this case, we evaluate the interpolating quadratic using the Lagrange formula as

\begin{displaymath}
p(x)=\frac{(x-0.1)(x-0.2)}{(0-0.1)(0-0.2)}e^0+\frac{(x-0)(x-...
 ...-0.2)}e^{-0.1}
+\frac{(x-0)(x-0.1)}{(0.2-0)(0.2-0.1)}e^{-0.2}. \end{displaymath}

As we saw above, the maximum error occurs at $x=0.1\left( 1\pm
\frac{1}{\sqrt{3}} \right)\approx $ 0.157735 or 0.042265.

Now

\begin{displaymath}
p(0.157735)\approx -0.12201+0.66667\times 0.90484+0.45534\times
0.81873 \approx 0.85402 . \end{displaymath}

The true value is 0.85408 correct to 5D, so the error bound is very precise in this case.

If we use a Taylor approximation of order 2 about 0, the pointwise error is

\begin{displaymath}
f(x)-\{ f(0)+xf'(0)+\frac{x^2}{2!}f''(0)\} =\frac{x^3}{3!}f'''(\xi ).\end{displaymath}

With f(x)=e-x the error is $\frac{x^3}{6}e^{-\xi }$, which in the interval [0,0.2] is bounded by $0.2^3/6\approx 0.0013$. The actual error at x=0.157735 is

\begin{displaymath}
e^{-0.157735}-(e^0-0.157735e^0+\frac{1}{2}0.157735^2e^0)\approx -0.00063. \end{displaymath}


next up previous
Next: Newton's Divided Differences Up: Interpolation Previous: Lagrange Formula
John Gilbert
5/8/1998