General Case: Polynomials of Degree n
The general case can be analyzed in the same way. The function \( L_0(x) \) must vanish at \( x = x_1, x_2, x_3, \dots, x_n \). We therefore introduce the function:
\( (x - x_1)(x - x_2)(x - x_3) \cdots (x - x_n) \)
This expression takes the value \( (x_0 - x_1)(x_0 - x_2)(x_0 - x_3) \cdots (x_0 - x_n) \) when \( x = x_0 \). To satisfy \( L_0(x_0) = 1 \), we divide by this value:
\( L_0(x) = \dfrac{(x - x_1)(x - x_2)(x - x_3)\cdots(x - x_n)}{(x_0 - x_1)(x_0 - x_2)(x_0 - x_3)\cdots(x_0 - x_n)} \)
There are \( n \) factors of the form \( (x - x_i) \), confirming that it is a polynomial of degree \( n \). Similarly, for \( L_1(x) \), we omit the factor \( (x - x_1) \) and define:
\( L_1(x) = \dfrac{(x - x_0)(x - x_2)(x - x_3)\cdots(x - x_n)}{(x_1 - x_0)(x_1 - x_2)(x_1 - x_3)\cdots(x_1 - x_n)} \)
The general expression for \( L_i(x) \) is therefore:
\( L_i(x) = \dfrac{(x - x_0)\cdots(x - x_{i-1})(x - x_{i+1})\cdots(x - x_n)} {(x_i - x_0)\cdots(x_i - x_{i-1})(x_i - x_{i+1})\cdots(x_i - x_n)} \)
The polynomial \( L_i(x) \) is of degree \( n \), equals 1 at \( x = x_i \), and vanishes at all other interpolation points.
Lagrange Interpolation Theorem
Given \( (n + 1) \) interpolation points \( (x_i, f(x_i)) \) for \( i = 0, 1, \dots, n \), the unique interpolation polynomial of degree \( n \) that passes through all these points is:
\( p_n(x) = \sum_{i=0}^{n} f(x_i)\,L_i(x) \)
where the \( L_i(x) \) functions are defined as above. This is known as the Lagrange Interpolation Formula.
Example
Consider the points \( (0, 1), (1, 2), (2, 9), (3, 28) \), for which we previously obtained the polynomial \( p_3(x) = x^3 + 1 \) using the Vandermonde matrix. The Lagrange interpolation formula gives:
\( p_3(x) = 1\,\dfrac{(x - 1)(x - 2)(x - 3)}{(0 - 1)(0 - 2)(0 - 3)} + 2\,\dfrac{(x - 0)(x - 2)(x - 3)}{(1 - 0)(1 - 2)(1 - 3)} + 9\,\dfrac{(x - 0)(x - 1)(x - 3)}{(2 - 0)(2 - 1)(2 - 3)} + 28\,\dfrac{(x - 0)(x - 1)(x - 2)}{(3 - 0)(3 - 1)(3 - 2)} \)
Simplifying, we obtain:
\( p_3(x) = -\dfrac{(x - 1)(x - 2)(x - 3)}{6} - \dfrac{9x(x - 1)(x - 3)}{2} + x(x - 2)(x - 3) + \dfrac{14x(x - 1)(x - 2)}{3} \)
This simplifies to \( p_3(x) = x^3 + 1 \), confirming that both methods lead to the same unique interpolation polynomial. The polynomial can then be used to approximate the unknown function \( f(x) \) within the interval \( [0, 3] \). For instance:
\( f(2.5) \approx p_3(2.5) = 16.625 \)
Note
The Lagrange interpolation method has a major limitation: it is not recursive. If we wish to increase the degree from \( n \) to \( n+1 \) by adding an additional point, the entire process must be redone. This difficulty is what motivates the development of the Newton interpolation method.