Interpolation - The Beginning

Thomas J. Kennedy

Contents:

Take some time to explore the interactive example. Note that the:

1 Interpolation vs. Least Squares Approximation

At first glance one might say… “But that is just Least Squares Approximation!”

However, interpolation requires that the interpolation/interpolating function passes throught all input points exactly.

$$ \forall x_i \phantom{2} f(x_i) = p(x_i) $$

Least Squares Approximation does not have the “$f(x_i) = p(x_i)$” requirement.

2 Interpolation Error

We still need to examine at least a couple interpolation methods before examining interpolation error. For the moment… let us make a note of the Interpolation Error Formula.

$$ f(x) - p_n(x) = \frac{f^{(n+1)}(\xi(x))}{(n+1)!} \prod\limits_{i=0}^{n}(x - x_i) $$

In a future lecture we will discuss each term. For now… let us make four notes:

If we have a line… the formula becomes… $$ f(x) - p_1(x) = \frac{f^{(2)}(\xi(x))}{2} (x - x_0)(x - x_1) $$

3 Linear Interpolation Forms

 

We know from previous discussions that (after a little algebra) $p_1(x)$ can be written as…

$$ p_1(x) = \frac{f_1 - f_0}{x_1 - x_0} (x - x_0) + f_0 $$

This happens to be… Newton’s Form of the Interpolation Polynomial for a line.

4 Introducing the Lagrange Form

If we perform a little algebraic manipulation…

$$ \begin{eqnarray} p_1(x) &=& \frac{f_1 - f_0}{x_1 - x_0} (x - x_0) + f_0 \\ &=& \frac{(x - x_0)f_1 - (x - x_0)f_0}{x_1 - x_0} + f_0 \\ &=& \frac{(x - x_0)f_1 - (x - x_0)f_0}{x_1 - x_0} + \frac{x_1 - x_0}{x_1 - x_0}f_0 \\ &=& \frac{(x - x_0)f_1 - (x - x_0)f_0 + (x_1 - x_0)f_0 }{x_1 - x_0} \\ &=& \frac{(x - x_0)f_1 + (x_1 - x_0)f_0 - (x - x_0)f_0}{x_1 - x_0} \\ &=& \frac{(x - x_0)f_1 + \Big((x_1 - x_0) - (x - x_0)\Big)f_0}{x_1 - x_0} \\ &=& \frac{(x - x_0)f_1 + \Big(x_1 - x_0 - x + x_0\Big)f_0}{x_1 - x_0} \\ &=& \frac{(x - x_0)f_1 + (x_1 - x)f_0}{x_1 - x_0} \\ &=& \frac{(x - x_0)f_1}{x_1 - x_0} + \frac{(x_1 - x)f_0}{x_1 - x_0} \\ &=& \frac{(x_1 - x)}{x_1 - x_0} f_0 + \frac{x - x_0}{x_1 - x_0} f_1 \\ &=& \frac{(-1)}{(-1)}\frac{(x_1 - x)}{x_1 - x_0} f_0 + \frac{x - x_0}{x_1 - x_0} f_1 \\ &=& \frac{x - x_1}{x_0 - x_1} f_0 + \frac{x - x_0}{x_1 - x_0} f_1 \\ \end{eqnarray} $$

We end up with the Lagrange Form of the Interpolation Polynomial for a line.

5 Polynomial Forms

As we discuss interpolation methods varying polynomials form will be encountered (beyond the familiar power form).

Note that the constants (e.g., $c_i, \alpha_i, b_i$) in each example are placeholders for real numbers

5.1 Power Form

The power form is the most familiar.

$$ \begin{eqnarray} p_n(x) = \sum\limits_{k=0}^{n}c_k x^k = c_0x^0 + c_1 x^1 + c_2 x^2 + \cdots + c_n x^n \end{eqnarray} $$

This form is ideal when taking derivatives, e.g.,

$$ \begin{eqnarray} \frac{d}{dx}p_n(x) &=& \frac{d}{dx}\left(\sum\limits_{k=0}^{n}c_k x^k\right) &=& \frac{d}{dx}\left(c_0x^0 + c_1 x^1 + c_2 x^2 + \cdots + c_n x^n\right) \\ &=& \sum\limits_{k=0}^{n}\frac{d}{dx}\left(c_k x^k\right) &=& \frac{d}{dx}c_0x^0 + \frac{d}{dx}c_1 x^1 + \frac{d}{dx}c_2 x^2 + \cdots + \frac{d}{dx}c_n x^n \\ \end{eqnarray} $$

The power form is also ideal when integrating, e.g.,

$$ \begin{eqnarray} \int p_n(x) dx &=& \int\left(\sum\limits_{k=0}^{n}c_k x^k\right)dx &=& \int\left(c_0x^0 + c_1 x^1 + c_2 x^2 + \cdots + c_n x^n\right)dx \\ &=& \sum\limits_{k=0}^{n} \int c_k x^k dx &=& \int c_0x^0 dx + \int c_1 x^1 dx + \int c_2 x^2 dx+ \cdots + \int c_n x^n dx \\ \end{eqnarray} $$

5.2 Shifted Power Form

The shifted power form does is not quite as nice to work with. It is, however, useful when expressing polynomials in terms of sums, products, or points.

$$ \begin{eqnarray} p_n(x) = c_0 + c_1(x - \alpha_1) + c_2(x - \alpha_2)^2 + \cdots + c_n(x - \alpha_n)^n \end{eqnarray} $$

5.3 Nested Form

The nested form can reduce the number of repeated multiplications.

$$ \begin{eqnarray} p_n(x) = c_0 + (x - b_1)\Big(c_1 + (x - b_2)\Bigg(\cdots \end{eqnarray} $$