Next: Neville algorithm Up: Lagrange Interpolation Previous: Generalized Lagrange Interpolation

## Errors in Interpolation

No numerical result has meaning without an estimate of the error. The exponential integral function we are attempting to interpolate is not a polynomial, so a polynomial representation is bound to be inexact. If we construct the quartic polynomial interpolating all five points in the table above, and evaluate it at 0.15, we get

whereas the correct value to six decimal digits is . The quartic polynomial is low by about 1%.

For any suitably smooth function the discrepancy can be quantified somewhat through a theorem that states

where depends on , but lies in the interval . (The notation means the st derivative of .) In nearly all cases we don't know how depends on . But sometimes we can find an upper bound on the magnitude of the st derivative of , which then gives us a bound on the error:

Notice that the error bound vanishes at the interpolation points and rises in the intervals between them, as would be expected. If the points are equally spaced and the degree of the polynomial is high, the error tends to be largest in the first and last intervals of the table, but better toward the middle. This is the case for the function, as we can see in the figure. So we should avoid high degree polynomials when interpolating evenly spaced points.

Next: Neville algorithm Up: Lagrange Interpolation Previous: Generalized Lagrange Interpolation