Lagrange polynomial interpolation is particularly convenient when the same values V0, V1, ... Vn are repeatevely used in several applications. The data values can be stored in computer memory and number of computations can thus be reduced. Limitations of the Lagrange interpolation occur when additional data points are added or removed to improve the appearance of the interpolating curve. The data set should be completely re-calculated every time when the data points are added or removed. It is thus harder to control the optimal appearence of the curve with the Largange interpolation algorithm compared with the other (Newton) polynomial interpolation.
Consider the following algorithm to construct forward divided differences
|data points||data values||first divided difference||second divided difference||third divided difference|
First divided difference approximates the slope of the function I = I(V) at the point (Ik,Vk) (cf. the secant method):
f[Vk,Vk+1] = ( Ik+1 - Ik ) / ( Vk+1 - Vk )
Second, third and higher-order divided differences approximate the corresponding higher-order derivatives of the function I= I(V) by using the recursive rule:
f[Vk,...,Vk+m] = ( f[Vk+1,...,Vk+m] - f[Vk,...,Vk+m-1] ) / ( Vk+m - Vm )
If the data values are equally spaced, i.e. h = Vk - Vk-1 for any k=1,2,...,n, the divided differences can be written in the Taylor series form:
f[Vk,...,Vk+m] = Dm f[Vk] / ( m! hm),
where Dm f[Vk] is the m-th order forward difference (see Lecture 3.1), i.e.,
D f[Vk] = Ik+1 - Ik
D2 f[Vk] = Ik+2 - 2 Ik+1 + Ik
D3 f[Vk] = Ik+3 - 3 Ik+2 + 3 Ik+1 - Ik
After all necessary divided differences have been computed from the data set, the Newton interpolating polynomials are defined similar to the Taylor polynomials:
I(V) = V0 + f[V0,V1] (V - V0)
+ f[V0,V1,V2] (V - V0) (V - V1)
... + f[V0,V1,...,Vn] (V - V0) (V - V1) ... (V - Vn-1).
The Newton interpolating polynomial has also degree n and passes also through the (n+1) given data points. In fact, being expanded in powers of V, this polynomial is the same as the Largange interpolating polynomial in Lecture 2-1. Therefore, the error of Newton interpolation is also the same as the error of the Largange interpolation. The difference between Newton and Lagrange interpolating polynomials lies only in the computational aspect. The advantage of Newton intepolation is the use of nested multiplication and the relative easiness to add more data points for higher-order interpolating polynomials.
More algorithms of numerical interpolations are in use in modern numerical analysis. The chapters on Hermite, Chebyshev, and Pade interpolations are left out for more advance studies (optional chapters 4.5,4.6 of the main textbook).