Given several points in the plane, we can find the line that best fits them (the regression line). Of course, not all the points will necessarily lie on the line. We can also find the quadratic polynomial that best fits the points. Again, not every point will necessarily lie on the graph of the polynomial.
However, if we are given just two points, we can find a line of exact fit, that is, a line that actually passes through both points. Similarly, given three points (not all on the same line), we can find the quadratic polynomial of exact fit.
For example,suppose we are given the following three points: $$(-1, 6), \quad (1, 2), \quad (2, 3)$$
From Figure 1 we see that the points do not lie on a line. Let's find the quadratic polynomial that fits these points exactly. The polynomial must have the form $$y = ax^2 + bx + c$$
We need to find values for $a$, $b$, and $c$ so that the graph of the resulting polynomial contains the given points. Substituting the given points into the equation, we get the following.
$(-1, 6)$ | $x = -1, \; y = 6$ | $6 = a(-1)^2 + b(-1) + c$ | ||
$(1, 2)$ | $x = 1, \; y = 2$ | $2 = a(1)^2 + b(1) + c$ | ||
$(2, 3)$ | $x = 2, \; y = 3$ | $3 = a(2)^2 + b(2) + c$ |
These three equations simplify into the following system. $$\begin{cases} a - b + c = 6 \\ a + b + c = 2 \\ 4a + 2b + c = 3 \end{cases} $$
Using Gaussian elimination we obtain the solution $a = 1$, $b = -2$, and $c = 3$.
So the required quadratic polynomial is $$y = x^2 - 2x + 3$$
From Figure 2 we see that the graph of the polynomial passes through the given points.
Time (s) | $1.0$ | $2.0$ | $6.0$ |
---|---|---|---|
Elevation (ft) | $144$ | $192$ | $64$ |