Interpolation Error
Interpolation allows us to approximate the value of a function \(f(x)\) at any point \(x\) using a set of known data points. However, this process introduces an interpolation error that must be carefully analyzed, especially since the results are also relevant for numerical integration and differentiation.
🔹 Definition
The interpolation error can be expressed as:
\[ f(x) = p_n(x) + E_n(x) \quad \text{or} \quad E_n(x) = f(x) - p_n(x) \]
Here, \(p_n(x)\) is the polynomial of degree \(n\) approximating \(f(x)\), and \(E_n(x)\) is the associated error. By construction, the error vanishes at the interpolation points:
\[ E_n(x_i) = 0 \quad \text{for} \quad i = 0,1,\dots,n \]
We assume the data points \((x_i, f(x_i))\) are exact. If they come from measurements, additional measurement errors may be present.
🔹 Interpolation Error Formula
Let \(x_0 < x_1 < \dots < x_n\) be the interpolation points. Assume \(f(x)\) is defined on \([x_0, x_n]\) and is \((n+1)\)-times differentiable in \((x_0, x_n)\). Then, for any \(x\) in \([x_0, x_n]\), there exists a point \(\xi(x) \in (x_0, x_n)\) such that:
\[ E_n(x) = \frac{f^{(n+1)}(\xi(x))}{(n+1)!} (x - x_0)(x - x_1)\cdots(x - x_n) \]
Comments:
- The error is zero at the interpolation points \(x_i\).
- The unknown function \(f(x)\) appears through its \((n+1)\)-th derivative evaluated at \(\xi(x)\), which depends on \(x\).
- This formula is analogous to the remainder term in Taylor series expansions.
- To minimize the error at a given point \(x\), choose interpolation points \(x_i\) closest to \(x\).
- The polynomial \((x - x_0)(x - x_1)\cdots(x - x_n)\) may oscillate strongly for high degrees, which can lead to large errors.
🔹 Example: Interpolation Error in Practice
Suppose we measure the speed (km/h) of a vehicle every 5 seconds:
t (s): 0, 5, 10, 15, 20, 25, 30, 35, 40, 45
v (km/h): 55, 60, 58, 54, 55, 60, 54, 57, 52, 49
The vehicle moves at an approximately constant speed around 55 km/h. Constructing a 9th-degree polynomial through all ten points produces strong oscillations:
Interpolating at \(t = 2.5\) s and \(t = 42.5\) s gives speeds 69.25 km/h and 27.02 km/h, which are unrealistic.
By using only three points to define a 2nd-degree polynomial, we get reasonable results: 58.38 km/h at \(t = 2.5\) s and 50.25 km/h at \(t = 42.5\) s.
This example illustrates the dangers of extrapolation (using the interpolation polynomial outside the range of the given points), which can produce extreme, unusable values.
Conclusion: When interpolating, choose points close to the target \(x\) to minimize error, and avoid using high-degree polynomials over large intervals.