Skip to main content

Section 4.1 Introduction to Interpolation

Consider part of a table of normal values from a statistics book:
\(x\) 0 0.25 0.50 0.75 1
\(P(0 \lt X \lt x)\) 0.0000 0.0987 0.1915 0.2734 0.3413
What is the value of the function for \(x=0.27\) or \(x=0.514\text{?}\)
We will eventually learn how to find this function value (which is called the cumulative density function for the normal distribution) using a technique called quadrature, but we would like to be able to approximate a function based on some given values.

Subsection 4.1.1 Fundamental Interpolation Problem

The following is the standard problem that we are looking to solve:
Given a set of points \((x_{i}, f_{i})\) for \(i=0,1,2, \ldots, n\text{,}\) where the \(x_{i}\) are distinct and \(f_{i}\) are the corresponding function values (perhaps either given or \(f_{i}=f(x_{i})\) for some \(f\)), we wish to find:
  • An approximate value for \(f\) at \(x\) (other than the given \(x_{i}\))
  • Or find a function \(g\) such that \(g(x_{i})=f_{i}\) and for other \(x\) values, \(g\) is “reasonable” between the points. Typically “reasonable” needs to be defined clearly.

Subsection 4.1.2 Interpolation Versus Regression

First, a bit about terminology. You probably have heard the word regression used in terms of data fitting. For example, linear regression for the data given above may seek to find the line that best fits the data above in the table.
In the case of finding the values of the cumulative density function above, this is not desirable. Instead, interpolation finds a function \(g\) that passes through the given points and approximates (hopefully in a smooth manner) between the points.

Subsection 4.1.3 Polynomial Interpolation

The first function \(g\) that we will use to interpolate some data is often a polynomial. Recall that a polynomial of degree \(n\) has the form:
\begin{equation*} \begin{aligned}P(x)\amp = a_{0} + a_{1} x + a_{2} x^{2} + \cdots a_{n} x^{n} = \sum_{k=0}^{n} a_{k} x^{k}\end{aligned} \end{equation*}
There are many reasons for using polynomials. From a computational point of view, a polynomial can be evaluated only with four basic operations (\(+,-,\times,\div{}\)) that are easily done in computers. Except for Rational Functions (which are usually the second encountered class of interpolated functions), all other functions require some kind of approximation to find function values. In addition, polynomials can be evaluated efficiently. See Subsection 2.3.3 for more details.
Finally (and probably the most-important) is that polynomial can always be used to approximate any other function. This is stated more precisely in the following theorem:
The proof of this theorem is rather complicated so will not be presented here, however this is a crucial theorem and can be found in functional analysis texts such as rudin1991. In short, any continuous function can be approximated (to within any value) with a polynomial. This is an important reason for using polynomial in both interpolation and approximation.
Next, we show a simple example of an interpolation problem.

Example 4.1.2.

Find a quadratic function that fits the following data \((0,0),(1,1), (3,2)\text{.}\)
Solution.
One way to handle this problem is to write a general quadratic function: \(P(x)=a_{0} + a_{1} x + a_{2} x^{2}\) and note that the polynomial must satisfy the data. \(P(0)=0, P(1)=1, P(3)=2\text{.}\) Then write down the function values for each of the three points:
\begin{equation*} \begin{aligned}0\amp = a_{0} \\ 1\amp = a_{0} + a_{1} + a_{2} = a_{1} + a_{2}\\ 2\amp = a_{0} + 3a_{1} + 9a_{2} = 3a_{1} + 9a_{2}\\\end{aligned} \end{equation*}
This is a linear system that can be solve using Gaussian Elimination (or a CAS can solve it directly) as \(a_{0}=0, a_{1} = 7/6, a_{2} = -1/6\text{.}\) Thus the polynomial that interpolates the given set of points is:
\begin{equation*} \begin{aligned}P(x)\amp = \frac{7}{6}x - \frac{1}{6}x^{2}.\end{aligned} \end{equation*}
A plot of the data and function is shown below:
Figure 4.1.3. A plot of a polynomial that interpolates the given data.