# Quadratic Lagrange Interpolating Polynomials

Recall from the Linear Lagrange Interpolating Polynomials page that given two points, $(x_0, y_0)$ and $(x_1, y_1)$ where $x_0$ and $x_1$ are distinct, we can construct a line $P_1$ that passes through these points. We also saw that we could approximate a function with this line that also passes through these two points.

(1)Realistically, using a straight line interpolating polynomial to approximate a function is generally not very practical because many functions are curved. The accuracy of approximating the values of a function with a straight line depends on how straight/curved the function is originally between these two points, and on how close we are to the points $(x_0, y_0)$ and $(x_1, y_1)$. We will now introduce quadratic Lagrange Interpolating polynomials

This time we will need three points to interpolate. Let $(x_0, y_0)$, $(x_1, y_1)$, and $(x_2, y_2)$ be the points that we want to interpolate where $x_0 \neq x_1 \neq x_2$, and define the functions $L_0(x)$, $L_1(x)$, and $L_2(x)$ as follows:

(2)We then define the quadratic Lagrange interpolating polynomial, $P_2$ through the points $(x_0, y_0)$, $(x_1, y_1)$, and $(x_2, y_2)$ as the following function:

(5)Note that $P_2$ does in fact pass through all the points specified above since $P_2(x_0) = y_0$, $P_2(x_1) = y_1$, and $P_2(x_2) = y_2$. A formal definition of the polynomial above is given below.

Definition: The Quadratic Lagrange Interpolating Polynomial through the points $(x_0, y_0)$, $(x_1, y_1)$, and $(x_2, y_2)$ where $x_0$, $x_1$, and $x_2$ are distinct is the polynomial $P_2(x) = y_0L_0(x) + y_1L_1(x) + y_2L_2(x)$. |

*It is important to note that while we define $P_2$ to be the "quadratic" Lagrange interpolating polynomial, it is possible that $P_2$ may have degree less than $2$.*

Let's now look at some examples of constructing a quadratic Lagrange interpolating polynomials.

## Example 1

**Construct the quadratic Lagrange interpolating polynomial $P_2(x)$ that interpolates the points $(1, 4)$, $(2, 1)$, and $(5, 6)$.**

Applying the formula given above directly and we get that:

(6)The graph of $y = P_2(x)$ is given below:

## Example 2

**Construct the quadratic Lagrange interpolating polynomial $P_2(x)$ that interpolates the points $(1, 2)$, $(3, 4)$, and $(5, 6)$.**

Applying the formula given above directly and we get that:

(7)The graph of $y = P_2(x)$ is given below:

Note that example 2 shows that $P_2$ need not be quadratic and may be a polynomial of lesser degree.