Lagrange Interpolation Polynomials
If we wish to describe all of the ups and downs in a data set, and hit every point, we use what is called an interpolation polynomial. This method is due to Lagrange.
Suppose the data set consists of N data points:
The interpolation polynomial will have degree
where the functions
Don't fret! This is easier than it looks. The key thing to notice is that the numerator of
If this seems like smoke and mirrors, consider a simple example. Here's the data for g again:
In this case there are
Multiplying each of these by the appropriate
The cubic terms cancel, and we arrive at a simple quadratic description of the data.
A quick plot of the data together with the polynomial shows that it indeed passes through each of the data points:
For an interactive demonstration of Lagrange interpolation polynomials, showing how variations in the data points affect the resulting curve, go here.