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 for
since both sides are zero.
For
define
so that![]()
Define the function
![]()
which satisfies
for
and![]()
has
distinct roots in![]()
By Rolle's theorem, there must be at least one root of
between two successive roots of
So
has at least
distinct roots in![]()
Apply Rolle's theorem to derivatives of increasing order successively, to show that
must have at least one root in
Call this point
so that![]()
The nth derivative of
is
but
is a polynomial of degree
so![]()
Let
so 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 to
is![]()
The actual error is![]()
However, the function
cannot be approximated accurately by an interpolation
polynomial, using equidistant points on the interval
Although
is differentiable, its derivatives grow as
for
even so
does not converge to 0 while
increases (since interval width > 1).