# Quadratic Polynomial Interpolation

Recall from the Linear Polynomial Interpolation page that given two points, $(x_0, y_0)$ and $(x_1, y_1)$ where $x_0 \neq x_1$ we can construct a line $P_1$ that passes through point points to approximate a function that passes through these two points. The line $P_1$ has the equation:

(1)As we saw on the Linear Polynomial Interpolation page, the accuracy of approximations of certain values using a straight line dependents on how straight/curved the function is originally, and on how close we are to the points $(x_0, y_0)$ and $(x_1, y_1)$. We will now look at quadratic interpolation which in general is more accurate.

This time we will need three points of interest. Let $(x_0, y_0)$, $(x_1, y_1)$, and $(x_2, y_2)$ be distinct points. Define the functions $L_0(x)$, $L_1(x)$, and $L_2(x)$ as follows:

(2)We then define the quadratic polynomial interpolation 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(x)$ 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$. Also note that in general, for $i = 0, 1, 2$ and $j = 0, 1, 2$ we have that:

(6)Let's now look at some examples of constructing a quadratic interpolation.

## Example 1

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

Applying the formula given above directly and we get that:

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

## Example 2

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

Applying the formula given above directly and we get that:

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

Note that example 2 provides an important example in that $P_2$ need not be a quadratic function if the points of interest all lie on a straight line.