Notation: Equation numbers are placed in parentheses, (Eq. 1), at the end of the sentence preceding the mathematical presentation of the equation. They should not be read as if they are part of the sentence. When reference is made to an equation, the word "equation" will be spelled out and not abbreviated. Mathematical symbols are not in all cases precise. Greek symbols will show as such on a Windows operating system, but not a Unix or Mac system.
Non-Equidistant Data Interpolation
The previous discussion of interpolation is predicated on equidistant intervals in the independent variable x. Sometimes it is inconvenient or impossible to obtain function values on an equidistant interval. In such cases, Lagrange's formula can be fashioned to only utilize such data as may be available.
The general form of Lagrange's interpolation formula is given by (Eq. 1)
where
We should note that
- lagrange's formula does not involve successive differences as does Newton's, Stirling's and Bessel's interpolation formulas.
- Lagrange's formula does involve n+1 successive pairs of variables (xn,fn).
- Although Lagrange's formula works for non-equidistant data, it is not restricted to such a limitation, i.e., it can be applied to equidistant data.
- If we know rates of change (differences) or rates of rates of change of the function, their neglect is to ignore information.
Cubic Lagrangian Interpolation
Suppose one wishes to construct a cubic polynomial through four successive points of a data set which we will label as (x1,f1), (x2,f2), (x3,f3), and (x4,f4). This can be accomplished from our general relation for n+1 points where we can construct the following relation (Eq. 2)
where
If one wishes, this expression can be written in the form (with a little algebra) as
However, from the computational point of view there is no real advantage in doing so.
Example
Find the cubic polynomial whose graph contains the four successive points (0,1), (1,2), (2,0), and (3,-2). Setting x1 = 0, f1 = 1, x2 = 1, f2 = 2, x3 = 2, f3 = 0, and x4 = 3, f4 = -2, we can form the values of the ls
Inserting the values for the ls into Equation 2, we have
Multiplying out the terms and collecting yields the desired polynomial