Interpolation & Polynomial Approximation
The next problem we want to investigate is the problem of finding a simple • function such as a polynomial, trigonometric function or rational function which approximates either a discrete set of (n + 1) data points (x ,f ), (x ,f ), (x ,f ) 0 0 1 1 n n or a more complicated function f(x). We saw that we can approximate a set of discrete data by a linear least • squares approach. In this case we make the assumption that the data behaves in a certain way such as linearly or quadratically. Now we take a different approach where we find a function which agrees with the data at each of the given points, i.e., it interpolates the data. The problem we are going to consider initially is to find an interpolating • polynomial for a set of discrete data (xi,fi). The data can be obtained from two main sources. First, suppose we have a • continuous function f(x) and we select (n + 1) distinct points x [a,b], i ∈ and then let fi = f(xi). In this way we are using interpolation as a means to approximate a continuous function by a simpler function.
Secondly, the data (xi,fi) may come from observations, e.g., from measure- • ments. In this case we do not know a continuous function f(x) but rather its value at (n + 1) points. If the data is observed then this is the fixed data we must work with. However, • if the data arises from evaluating a known function f(x) at (n + 1) points, then we can choose the points uniformly or some other sampling. Polynomial interpolation of discrete data: Given n+1 distinct points (x ,f ), (x ,f ), (x ,f ) 0 0 1 1 n n find a polynomial of degree n, say pn, that interpolates the given data, i.e., such that ≤
pn(xi)= fi, for i =0, 1, 2,...,n
The polynomial pn(x) is called the interpolant of the data fi ,i = 1,...,n +1. The points xi , i = 0, 1,...,n are {called} the interpolation points. { }
This means that the graph of the polynomial passes through our n+1 distinct • data points. Let denote the space of all polynomials of degree n or less. Then any • Pn polynomial in n can be written in terms of the monomial basis for n 1,x,x2,...,xnPas P 2 n 1 n a0 + a1x + a2x + + an 1x − + anx − Note that we have (n +1) coefficients to determine and (n +1) interpolation • conditions to satisfy.
Why do we choose n to be the space of all polynomials with degree n • and not just equal toPn? ≤ In the first figure we have two data points so we find the linear polynomial • which passes through these two points. In the second figure we have three data points so we find the quadratic poly- • nomial which passes through these three points. In the third and fourth figures we have four and five points so we find a cubic • and a quartic, respectively. The interpolation conditions pn(xi)= fi, i =0,...,n can be gathered together into the linear system of algebraic equations given by
2 3 n 1 n 1 x0 x0 x0 x0− x0 a0 f0 2 3 n 1 n 1 x1 x1 x1 x1− x1 a1 f1 2 3 n 1 n 1 x x x x − x a f 2 2 2 2 2 2 = 2 . (1) ...... . . 2 3 n 1 n 1 xn 1 xn 1 xn 1 xn−1 xn 1 an 1 fn 1 − −2 −3 n−1 −n − − 1 x x x x − x an fn n n n n n The (n + 1) (n + 1) coefficient matrix of this linear system is referred as the interpolation× matrix or, more precisely, the interpolation matrix corresponding to j n the monomial basis x j=0. In this case, the interpolation matrix is known as the Vandermonde matrix{ }. It is not difficult to show that Vandermonde determinant, i.e., the determinant of the matrix in (1), is given by 0 k