Interpolation may used to approximate either a known function or a set of data for an unknown function. It is not possible to evaluate the error for an unknown function.
If(i.e.
is a function
times differentiable in
with continuous derivatives) and
is the polynomial that interpolates
then
there exists
that depends on
such that
Proof: This result is trivially true forsince both sides are zero.
Fordefine
so that
Define the function
which satisfiesfor
and
has
distinct roots in
By Rolle's theorem, there must be at least one root ofbetween two successive roots of
So
has at least
distinct roots in
Apply Rolle's theorem to derivatives of increasing order successively, to show thatmust have at least one root in
Call this point
so that
The nth derivative ofis
but
is a polynomial of degree
so
Letso that
Hence
Using this we can obtain bounds on the accuracy of Lagrange interpolation, provided we can bound the nth derivative,Since the error term involves
Lagrange interpolation is exact for polynomials of degree
at most.
Example: Estimate the error for f(x)= sin(3x) interpolated for the points
at
So, the error in the approximation tois
The actual error is
However, the functioncannot be approximated accurately by an interpolation
polynomial, using equidistant points on the intervalAlthough
is differentiable, its derivatives grow as
for
even so
does not converge to 0 while
increases (since interval width > 1).