Quadratic Interpolation (Degree 2 Polynomials)
When we look for a polynomial of degree 2 passing through the three points \( (x_0, f(x_0)), (x_1, f(x_1)), (x_2, f(x_2)) \), we must construct three functions \( L_0(x), L_1(x), L_2(x) \). The reasoning is always the same.
The function \( L_0(x) \) must vanish at \( x = x_1 \) and \( x = x_2 \). It therefore contains a factor of the form:
\( (x - x_1)(x - x_2) \)
This expression takes the value \( (x_0 - x_1)(x_0 - x_2) \) when \( x = x_0 \). To satisfy the condition \( L_0(x_0) = 1 \), we simply divide by this value, giving:
\( L_0(x) = \dfrac{(x - x_1)(x - x_2)}{(x_0 - x_1)(x_0 - x_2)} \)
This function equals 1 at \( x_0 \) and 0 at \( x_1 \) and \( x_2 \). Similarly, we can define:
\( L_1(x) = \dfrac{(x - x_0)(x - x_2)}{(x_1 - x_0)(x_1 - x_2)} \)
\( L_2(x) = \dfrac{(x - x_0)(x - x_1)}{(x_2 - x_0)(x_2 - x_1)} \)
Each of these polynomials takes the value 1 at its corresponding point and 0 at the others. The resulting interpolation polynomial of degree 2 is thus given by:
\( p_2(x) = f(x_0)L_0(x) + f(x_1)L_1(x) + f(x_2)L_2(x) \)
This polynomial passes exactly through the three given points and represents the Lagrange interpolation polynomial of degree 2.
