Learn how polynomial interpolation estimates values between data points and its use in mathematical modeling and analysis.
Polynomial interpolation finds a polynomial that passes exactly through a given set of points. It is used to estimate values between measurements, to construct approximations of complicated functions, and as a basis for many numerical integration and differentiation methods [1].
Given $n + 1$ points $(x_i, y_i)$ with distinct abscissas, there exists a unique polynomial of degree at most $n$ with $p(x_i) = y_i$. Uniqueness follows from the fact that the difference of two such polynomials would have $n + 1$ roots but degree at most $n$, so it would be zero [1][2].
The Lagrange form is $p(x) = \sum y_i L_i(x)$ with $L_i(x) = \prod_{j \neq i}\dfrac{x - x_j}{x_i - x_j}$. The Newton form uses divided differences and is more convenient when adding points.
For the points $(0, 1)$, $(1, 3)$, $(2, 2)$ (values taken) the second-degree polynomial is $p(x) = -1.5x^2 + 3.5x + 1$. Verification: $p(0) = 1$, $p(1) = 3$, $p(2) = -6 + 7 + 1 = 2$. The estimated value at $x = 1.5$ is $p(1.5) = -3.375 + 5.25 + 1 = 2.875$ (calculation).
If the data come from a function $f$ differentiable $n + 1$ times, the error is $f(x) - p(x) = \dfrac{f^{(n+1)}(\xi)}{(n + 1)!}\prod (x - x_i)$. Increasing the degree does not always improve: for $f(x) = 1/(1 + 25x^2)$ on $[-1, 1]$ with equally spaced nodes the maximum error is about $0.43$ with $6$ nodes and about $1.92$ with $11$ nodes (numerical calculation). With Chebyshev nodes the error instead decreases.
For many points piecewise polynomial functions are preferred, such as cubic splines, and least squares approximation, which does not pass exactly through the data (see the line on linear regression).
Value tables, graphics, quadrature formulas (trapezoidal rule, Simpson’s rule), estimation of missing data, and finite difference schemes (general observation).
With noisy data a high-degree polynomial oscillates and reproduces the noise. Computation with equally spaced nodes and high degree is unstable. See the line on polynomials for basic definitions.
[1] Wikipedia (it): Interpolazione polinomiale
[2] Wikipedia (en): Polynomial interpolation
Generating summary…