‣

Interpolation is best used when we are very confident in each datapoint and don’t have a strong hypothesis for the form the curve should take. If we have low confidence in individual datapoints and a stronger hypothesis for the form of the curve, (4) Linear Regression should be used.

Basic Polynomial Interpolation

The most basic interpolation fits a $n^{th}$ order polynomial to $n+1$ datapoints. The issue is, ill conditioned matrices are likely to be produced, especially for large values of $x$. The following is a Vandermonde’s matrix.

$$ \bold V=\begin{bmatrix} 1&\cdots&x_1^{n-1}\\ \cdots&\cdots&\cdots\\ 1&\cdots&x_n^{n-1} \end{bmatrix}~~~\bold b=\begin{bmatrix} y_1\\ \cdots\\ y_n \end{bmatrix}\Rarr\bold a=\bold V^{-1}\bold b $$

In addition to ill-conditioning and roundoff error, this is often not even a good fit. The polynomials will tend to oscillate back and forth across a linear interpolation, passing through the points in a form graphically similar to solutions to a sine wave.

Another technique are Lagrange interpolating polynomials, but these suffer from similar problems.

Spline Interpolation

Splines of polynomial $n^{th}$ order entail a unique polynomial which interpolates across each interval, while maintaining $(n-1)^{th}$ order continuity (for example, adjacent quadratic splines have equivalent slopes at their intersection).

An example matrix expression for quadratic splines between four datapoints is shown. The significance of each rows is as follows

$$ \begin{bmatrix} 1~0~0 & 0~0~0 & 0~0~0\\ 1~x_1~x_1^2 & 0~0~0 & 0~0~0\\ 1~x_2~x_2^2 & 0~0~0 & 0~0~0\\ 2x_2~1~0 & -2x_2~-1~0 & 0~0~0\\ 0~0~0 & 1~x_2~x_2^2 & 0~0~0\\ 0~0~0 & 1~x_3~x_3^2 & 0~0~0\\ 0~0~0 & 2x_3~1~0 & -2x_3~-1\\ 0~0~0 & 0~0~0 & 1~x_3~x_3^2\\ 0~0~0 & 0~0~0 & 1~x_4~x_4^2\\ \end{bmatrix}

\begin{bmatrix} c_1\\b_1\\a_1\\ c_2\\b_2\\a_2\\ c_3\\b_3\\a_3\\ \end{bmatrix} \begin{bmatrix} 0\\y_1\\y_2\\ 0\\y_2\\y_3\\ 0\\y_3\\y_4\\ \end{bmatrix} $$