Interpolation and splines · Definition

Interpolation error

numerical methodsinterpolation and splines

Before you start you need to know

When approximating a function by a polynomial, it matters how far that approximation can be off between the nodes. This error is controlled by a formula that combines higher-order derivatives and the position of the points.

Definition

The interpolation error is the difference between \(f(x)\) and the polynomial \(P(x)\) that approximates it at the nodes \(x_0,\dots,x_n\); it depends on \(f^{(n+1)}\) and on \(\prod(x-x_i)\).

\[f(x)-P_n(x)=\frac{f^{(n+1)}(\xi)}{(n+1)!}\prod_{i=0}^{n}(x-x_i)\]

The error formula states that, if f is n+1 times continuously differentiable on \([a,b]\), there exists \(\xi\) in the interval such that the error at x is \(\frac{f^{(n+1)}(\xi)}{(n+1)!}\prod_{i=0}^{n}(x-x_i)\). Its proof applies Rolle's theorem repeatedly to an auxiliary function that vanishes at all nodes. The error is zero at each node because the product vanishes there.

For \(f(x)=\sin(x)\) with nodes \(0,\ \pi/2,\ \pi\) and \(n=2\), the bound is \(|f(x)-P_2(x)|\le \frac{1}{3!}\max|\,x(x-\pi/2)(x-\pi)|\). Since \(|\sin^{(3)}|\le 1\), this gives an explicit bound that can be evaluated over the interval of interest.

A typical mistake is forgetting that \(\xi\) depends on x and treating it as a fixed known value. Another is using \((n+1)!\) where \(n!\) belongs, which yields a bound that is too large or too small depending on the case.

Think about it

Why does the error formula give a bound rather than the exact error at a point?

Because \(\xi\) is unknown and only known to lie in the interval, so the formula only lets us bound the error.

Exercises 10

What comes next

References

  • Richard L. Burden, J. Douglas Faires, Annette M. Burden, Numerical Analysis, 10th edition, Cengage Learning, 2016.
  • Lloyd N. Trefethen, David Bau III, Numerical Linear Algebra, 1st edition, SIAM, 1997.