-
📘Lagrange Polynomial Interpolation
Lagrange Polynomial Interpolation
The Lagrange interpolation method provides a direct and elegant way to construct the polynomial that passes through a given set of points \( (x_0, f(x_0)), (x_1, f(x_1)), \dots, (x_n, f(x_n)) \). It is based on the idea of building specific polynomials \( L_i(x) \), called Lagrange basis polynomials, each equal to 1 at one node and 0 at all others.
The interpolating polynomial is then expressed as a weighted sum of these basis functions:
\( P_n(x) = \sum_{i=0}^{n} f(x_i)\,L_i(x) \)
where each term \( L_i(x) \) takes the form:
\( L_i(x) = \prod_{\substack{j=0 \\ j \ne i}}^{n} \frac{x - x_j}{x_i - x_j} \)
This formula ensures that \( P_n(x_i) = f(x_i) \) for all \( i \), making the polynomial pass exactly through the given data points. The Lagrange method is simple to implement and provides a clear mathematical understanding of how interpolation works.
For instance, with three points, we obtain a quadratic polynomial (degree 2) that perfectly connects them, as shown in the illustration below.
(x₀, f₀) (x₁, f₁) (x₂, f₂) Lagrange interpolation curve (degree 2)While powerful, this method has a limitation: it is not recursive. Adding a new interpolation point requires recomputing the entire polynomial. This drawback motivates other formulations such as the Newton interpolation method, which builds the polynomial incrementally.