next up previous
Next: Errors in Interpolation Up: Lagrange Interpolation Previous: Lagrange Interpolation

Generalized Lagrange Interpolation

Returning to our table, if we examine the change in the function between 0.1 and 0.2 and between 0.2 and 0.3 we see that there is a dramatic change in slope. So clearly our result would be improved if we selected an interpolating polynomial with curvature. It takes three points to fix a parabola. Why stop there? We could include all $n+1$ points, resulting in a polynomial of degree $n$. Such a polynomial can be constructed from higher degree Lagrange interpolating polynomials

\begin{displaymath}
L^{(n)}_k(x) = \prod_{i=0,i\ne k}^n \frac{x - x_i}{x_k - x_i}.
\end{displaymath}

They satisfy the special property,

\begin{displaymath}
L^{(n)}_k(x_j) = \delta_{j,k}.
\end{displaymath}

The construction gives

\begin{displaymath}
P_{0,\ldots{},n}(x) = \sum_{k=0}^n L^{(n)}_k(x) y_k.
\end{displaymath}

If we set $x = x_j$ for any $j$, we see that all the polynomials except $L^{(n)}_j$ vanish, leaving $P_{0,\ldots{},n}(x_j) = y_j$. Thus the polynomial passes through all the points, as required. Since there can be only one degree $n$ polynomial interpolating all $n+1$ points, our construction gives the unique result.

As an application of this result, let's write the polynomial interpolating the values at $x = 0.2, 0.3, 0.4$ in our table. With three points it must be a quadratic. The Lagrange construction gives

\begin{eqnarray*}
P_{1,2,3} &=& -0.8218 \frac{(x - 0.3)(x - 0.4)}{(0.2 - 0.3)(0...
...\
&&+ 0.1048 \frac{(x - 0.2)(x - 0.3)}{(0.4 - 0.2)(0.4 - 0.3)}
\end{eqnarray*}




next up previous
Next: Errors in Interpolation Up: Lagrange Interpolation Previous: Lagrange Interpolation