# How do you write a quadratic function in standard form whose graph passes through points (2,-4), (3,-7), (1,-3)?

Oct 19, 2017

$f \left(x\right) = - {x}^{2} + 2 x - 4$

#### Explanation:

Here's one method...

Putting the points in increasing order of $x$ coordinate, we have:

$\left(1 , - 3\right)$, $\left(2 , - 4\right)$, $\left(3 , - 7\right)$

Note that the $x$ coordinates are $1 , 2 , 3$.

Hence we can analyse this as a sequence of $y$ values using the method of differences...

Write down the sequence of $y$ values:

$\textcolor{b l u e}{- 3} , - 4 , - 7$

Write down the sequence of differences between pairs of consecutive terms:

$\textcolor{b l u e}{- 1} , - 3$

Write down the sequence of differences of differences:

$\textcolor{b l u e}{- 2}$

Having reached a constant sequence (albeit of just one term), we can write a general formula for a term of the initial sequence of $y$ values using the intial term of each of the above sequences as coefficients:

a_n = color(blue)(-3)/(0!)+color(blue)(-1)/(1!)(n-1)+color(blue)(-2)/(2!)(n-1)(n-2)

$\textcolor{w h i t e}{{a}_{n}} = - 3 - n + 1 - {n}^{2} + 3 n - 2$

$\textcolor{w h i t e}{{a}_{n}} = - {n}^{2} + 2 n - 4 \text{ }$ for $n = 1 , 2 , 3$

Hence our function can be written:

$f \left(x\right) = - {x}^{2} + 2 x - 4$

Oct 19, 2017

$f \left(x\right) = - {x}^{2} + 2 x - 4$

#### Explanation:

Here's a general purpose method for matching a polynomial to a set of points...

The formula

Given a set of points:

$\left\{\left({x}_{1} , {y}_{1}\right) , \ldots , \left({x}_{n} , {y}_{n}\right)\right\}$

with distinct values ${x}_{1}$, ${x}_{2}$, ... , ${x}_{n}$.

A polynomial that passes through them is:

$\frac{\left(x - {x}_{2}\right) \left(x - {x}_{3}\right) \ldots \left(x - {x}_{n}\right)}{\left({x}_{1} - {x}_{2}\right) \left({x}_{1} - {x}_{3}\right) \ldots \left({x}_{1} - {x}_{n}\right)} {y}_{1} +$

$\frac{\left(x - {x}_{1}\right) \left(x - {x}_{3}\right) \ldots \left(x - {x}_{n}\right)}{\left({x}_{2} - {x}_{1}\right) \left({x}_{2} - {x}_{3}\right) \ldots \left({x}_{2} - {x}_{n}\right)} {y}_{2} + \ldots$

$+ \frac{\left(x - {x}_{1}\right) \left(x - {x}_{2}\right) \ldots \left(x - {x}_{n - 1}\right)}{\left({x}_{n} - {x}_{1}\right) \left({x}_{n} - {x}_{2}\right) \ldots \left({x}_{n} - {x}_{n - 1}\right)} {y}_{n}$

$= {\sum}_{k = 1}^{n} \left({\prod}_{j = 1 , j \ne k}^{n} \frac{x - {x}_{j}}{{x}_{k} - {x}_{j}}\right) {y}_{k}$

How does it work?

That may look rather complicated, but notice how it works:

Looking at the first expression:

$\frac{\left(x - {x}_{2}\right) \left(x - {x}_{3}\right) \ldots \left(x - {x}_{n}\right)}{\left({x}_{1} - {x}_{2}\right) \left({x}_{1} - {x}_{3}\right) \ldots \left({x}_{1} - {x}_{n}\right)} = {\prod}_{j = 2}^{n} \frac{x - {x}_{j}}{{x}_{1} - {x}_{j}}$

Note that:

• It takes the value $1$ when $x = {x}_{1}$ since the numerator and denominator become identical.

• It takes the value $0$ when $x = {x}_{k}$ for any $k$ apart from $1$, since one of the factors in the numerator will be $0$.

• It is a polynomial of degree $n - 1$.

So when we multiply this by ${y}_{1}$ we get a polynomial that takes the value ${y}_{1}$ when $x = {x}_{1}$ and $0$ at each of ${x}_{2}$, ${x}_{3}$,...,${x}_{n}$.

Summing this with the similar polynomials for $\left({x}_{2} , {y}_{2}\right)$,...,$\left({x}_{n} , {y}_{n}\right)$ we get the behaviour we want.

Application

In the given example, with points:

$\left\{\begin{matrix}\left({x}_{1} {y}_{1}\right) = \left(2 - 4\right) \\ \left({x}_{2} {y}_{2}\right) = \left(3 - 7\right) \\ \left({x}_{3} {y}_{3}\right) = \left(1 - 3\right)\end{matrix}\right.$

We can write:

$f \left(x\right) = \frac{\left(x - 3\right) \left(x - 1\right)}{\left(2 - 3\right) \left(2 - 1\right)} \left(- 4\right) + \frac{\left(x - 2\right) \left(x - 1\right)}{\left(3 - 2\right) \left(3 - 1\right)} \left(- 7\right) + \frac{\left(x - 2\right) \left(x - 3\right)}{\left(1 - 2\right) \left(1 - 3\right)} \left(- 3\right)$

$\textcolor{w h i t e}{f \left(x\right)} = 4 \left({x}^{2} - 4 x + 3\right) - \frac{7}{2} \left({x}^{2} - 3 x + 2\right) - \frac{3}{2} \left({x}^{2} - 5 x + 6\right)$

$\textcolor{w h i t e}{f \left(x\right)} = - {x}^{2} + 2 x - 4$