1 Lagrange Interpolation

Interpolation has fallen by the wayside since the computer has replaced the use of precise mathematical tables, but the technique is still important in the analysis of laboratory data, for making predictions about the outcome of experiments that measure the values of some quantity between bracketing known values as a function of some parameter.
Suppose that you have a table or array of the values of a function



x y(x)


x0y(x0) = y0
x1y(x1) = y1
x2y(x2) = y2
x3y(x3) = y3
... ...


One can perform a linear interpolation to obtain y(xi + α) for α < xi+1 - xi by assuming that the curve is well approximated by a straight line between adjacent points listed in the table

                        y(xi+1)  - y(xi)
y(xi +  α)  ≈ y(xi)  +  ------------------α
                           xi+1  - xi
If the points x0,x1,x2,⋅⋅⋅ are evenly spaced with xi+1 -xi = δ, the Lagrange interpolation can provide better accuracy. Notice that
                        ′       1-- 2 ′′              δddx
y(x  + δ) =  y(x)  + δy  (x) +  2!δ  y (x) +  ⋅⋅ ⋅ = e   y(x)  =  E  y(x)
in which E is the shift operator
E  y(x)  =  y(x +  δ)
Then
                            ′       1--    2 ′′               αδ ddx          α
y(x  + α δ) =  y(x)  + α δy (x)  +  2!(α δ) y  (x) + ⋅ ⋅⋅ = e     y(x)  =  E  y(x)
which we can expand as
                 α                         α
y(x  + α δ) =  E   y(x) =  (1 +  (E  -  1)) y(x)
                           α(-α----1)-       2       α(-α----1)(-α----2)        3
=  y(x)+  α(E  - 1)y(x)+             (E -  1) y(x)+                     (E -  1) y(x)+  ⋅⋅ ⋅
                               2!                             3!
Collect terms together and use the fact that
  n
E  y(x0)  =  y(x0  + n δ) =  y(xn)  =  yn
then
                  (α  -  1)(α -  2)(α  -  3)      α( α -  2)(α  - 3)
y(x0  + α δ) =  - --------------------------y0 +  -------------------y1
                               6                           2
   α( α -  1)(α -  3)       α(α  -  1)(α -  2)
-  -------------------y2 +  -------------------y3
            2                       6
and so on, here correct to third order differences. Notice that if α = n,for 0 n 3, we simply obtain y(x0 + ) = y(xn).
This can provide a significant improvement over linear interpolation, and can be used to develop predict-correct numerical integration algorithms. For example consider a function y(x) and its derivative y(x), and apply this to the case α = -1 to y(x), we obtain
y ′(x  ) = 4y ′(x ) -  6y ′(x  ) + 4y ′(x ) -  y′(x )
     0          1           2          3         4
Now consider numerically integrating y(x) from x0 to x4 = x0 + 4δ by Simpson’s rule
∫ x4  ′                             δ-  ′          ′          ′          ′         ′
 x  y (x)dx   =  y(x4) -  y(x0)  =   (y (x0)  + 4y  (x1) + 2y  (x2) +  4y (x3) +  y (x4))
  0                                 3
and into this insert the previous interpolation formula to eliminate y(x4) on the right side to obtain the interpolation
y  =  y +  8-δ(y ′-  1-y′ +  y′)
 4     0    3    1   2  2     3