## Problem on finding a quadratic that goes through three points

Find the second degree polynomial going through $(-1, 1), (1, 3),$ and $(2,2)$.

Hint: To find the coefficients of $y = a + bx + cx^2$, set up a $3 \times 3$ matrix satisfied by $a,b,c$.
• ## Solution

We are trying to find the function $y(x) = a + bx + cx^2$ such that $y(-1) = 1$, $y(1) = 3$, and $y(2) = 2$.
Let's plug the three values $x$ into $y$ and see what that says about $a$, $b$, and $c$.
Plugging the $x$ values into the function we get \begin{alignat}{3}
y(-1) \ &= a + b (-1) \ &&+ \ c (-1)^2 \ &&= 1\\
y(1)\ &= a + b ( 1) &&+ \ c(1)^2 &&= 3\\
y(2)\ &= a + b ( 2) &&+ \ c(2)^2 &&= 2
\end{alignat}
Simplifying, we get \begin{alignat}{6}
&a \ & &- & & b\ & &+ & & c &=1\\
&a & &+ & & b & &+ & & c &=3\\
&a & &+ & \ 2&b & &+ &\ 4& c \ &=2
\end{alignat}
This equation is of the form $\bfA \bfx = \bfb$ where $$\bfA = \begin{pmatrix}1 & -1 & 1 \\ 1 & 1 & 1 \\ 1 & 2 & 4\end{pmatrix}, \quad \bfx = \begin{pmatrix}a\\b\\c\end{pmatrix}, \quad \bfb = \begin{pmatrix}1\\3\\2\end{pmatrix}.$$
Recall that
Hence, $$\bfx = \begin{pmatrix}a\\b\\c\end{pmatrix} = \begin{pmatrix} 1/3 & 1 & -1/3 \\ -1/2 & 1/2 & 0 \\ 1/6 & -1/2 & 1/3 \end{pmatrix} \begin{pmatrix}1\\3\\2 \end{pmatrix} = \begin{pmatrix}8/3\\1\\-2/3\end{pmatrix}$$
Hence, the polynomial through the points $(-1, 1), (1, 3),$ and $(2,2)$ is $$y = \frac{8}{3} + x - \frac{2}{3} x^2$$