Chapter 4 Interpolation#
In this chapter, we will study the following problem: given data \((x_{i},y_{i}),i=0,1,...,n\), find a function \(f\) such that \(f(x_{i})=y_{i}.\) This problem is called the interpolation problem, and \(f\) is called the interpolating function, or interpolant, for the given data.
Interpolation is used, for example, when we use mathematical software to plot a smooth curve through discrete data points, when we want to find the in-between values in a table, or when we differentiate or integrate black-box type functions.
How do we choose \(f\)? Or, what kind of function do we want \(f\) to be? There are several options. Examples of functions used in interpolation are polynomials, piecewise polynomials, rational functions, trigonometric functions, and exponential functions. As we try to find a good choice for \(f\) for our data, some questions to consider are whether we want \(f\) to inherit the properties of the data (for example, if the data is periodic, should we use a trigonometric function as \(f\)?), and how we want \(f\) to behave between data points. In general \(f\) should be easy to evaluate, and easy to integrate & differentiate.
Here is a general framework for the interpolation problem. We are given data, and we pick a family of functions from which the interpolant \(f\) will be chosen:
Data: \((x_{i},y_{i}),i=0,1,...,n\)
Family: Polynomials, trigonometric functions, etc.
Suppose the family of functions selected forms a vector space. Pick a basis for the vector space: \(\phi_{0}(x),\phi_{1}(x),...,\phi_{n}(x).\) Then the interpolating function can be written as a linear combination of the basis vectors (functions):
We want \(f\) to pass through the data points, that is, \(f(x_i)=y_i\). Then determine \(a_{k}\) so that:
which is a system of \(n+1\) equations with \(n+1\) unknowns. Using matrices, the problem is to solve the matrix equation
for \(a\), where