# Thread: How did this happen?

1. ## How did this happen?

I am maximizing and minimizing the optimum. Once I had this quadratic function, f(x)=-[x^2-4x+4-4-2] the book says I factor it into vertex form. Giving me two equations in vertex form, f(x)=-(x-2)^2-6 and f(x)=-(x-2)^2+6. Any help understanding the factoring of that quadratic function?

2. ## Re: How did this happen?

Originally Posted by dLogic
I am maximizing and minimizing the optimum. Once I had this quadratic function, f(x)=-[x^2-4x+4-4-2] the book says I factor it into vertex form. Giving me two equations in vertex form, f(x)=-(x-2)^2-6 and f(x)=-(x-2)^2+6. Any help understanding the factoring of that quadratic function?
Only the second equation is correct. The first is wrong. You had $\displaystyle f(x) = -(x^2-4x+4-4-2) = -(x^2-4x-2)$. The first equation you wrote:

\displaystyle \begin{align*}-(x-2)^2-6 & = -(x^2-4x+4)-6 \\ & = -x^2+4x-10 \\ & = -(x^2-4x+10) \\ & \neq -(x^2-4x-2)\end{align*}.

So, I don't understand why the book gives you both equations. Only the second equation is correct. Anyway, to show you how the factoring works:

\displaystyle \begin{align*}f(x) & = -[x^2-4x+4-4-2] \\ & = -[(x^2-4x+4)-4-2] \\ & = -[(x^2-4x+4)-6]\end{align*}

Now, factor $\displaystyle x^2-4x+4$ into $\displaystyle (x-2)(x-2) = (x-2)^2$. Then you have $\displaystyle f(x) = -[(x-2)^2-6] = -(x-2)^2+6$.

The process the book used is called completing the square.

3. ## Re: How did this happen?

It is an optimization problem. I don't know if that helps to understand why they wrote the equation that doesn't equal the quadratic. I imagine the optimization idea is why we take 1/2 of the coefficient of and multiply it (-4) to get 4. Then +4-4 to the original equation. Then factor two vertexes? hmm...

4. ## Re: How did this happen?

Originally Posted by dLogic
It is an optimization problem. I don't know if that helps to understand why they wrote the equation that doesn't equal the quadratic. I imagine the optimization idea is why we take 1/2 of the coefficient of and multiply it (-4) to get 4. Then +4-4 to the original equation. Then factor two vertexes? hmm...
It is because any parabola can be put into the following form: $\displaystyle f(x) = p(x-a)^2 + b$. If $\displaystyle p>0$ then $\displaystyle b$ is the minimum value of $\displaystyle f(x)$. If $\displaystyle p<0$ then $\displaystyle b$ is the maximum value of $\displaystyle f(x)$. There is only one formula. I don't know what you mean factor "two vertexes". There is only one "vertex" of a parabola.

Given a function $\displaystyle f(x) = a_2x^2+a_1x+a_0, a_2 \neq 0$, let's put it into the form $\displaystyle f(x) = p(x-a)^2 + b$.

First, factor out $\displaystyle a_2$ from each term: $\displaystyle f(x) = a_2\left(x^2 + \dfrac{a_1}{a_2}x + \dfrac{a_0}{a_2}\right)$
Now, we want to complete the square. So, we take half of the coefficient of $\displaystyle x$ and square it. That is $\displaystyle \left(\dfrac{a_1}{2a_2}\right)^2 = \dfrac{a_1^2}{4a_2^2}$. We add and subtract it inside the parentheses:

$\displaystyle f(x) = a_2\left(x^2 + \dfrac{a_1}{a_2}x + \dfrac{a_1^2}{4a_2^2} - \dfrac{a_1^2}{4a_2^2} + \dfrac{a_0}{a_2}\right)$

Now, we use the associative rule to gather together the terms we want:

$\displaystyle f(x) = a_2\left(\left[x^2 + \dfrac{a_1}{a_2}x + \dfrac{a_1^2}{4a_2^2}\right] - \dfrac{a_1^2}{4a_2^2} + \dfrac{a_0}{a_2}\right)$

We can now factor the expression $\displaystyle \left[x^2 + \dfrac{a_1}{a_2}x + \dfrac{a_1^2}{4a_2^2}\right] = \left(x + \dfrac{a_1}{2a_2}\right)^2$.

So, now we have:

$\displaystyle f(x) =a_2\left(\left[x + \dfrac{a_1}{2a_2}\right]^2 - \dfrac{a_1^2}{4a_2^2} + \dfrac{a_0}{a_2}\right)$

Multiplying out the $\displaystyle a_2$, we get:

$\displaystyle f(x) = a_2\left(x + \dfrac{a_1}{2a_2}\right)^2 - \dfrac{a_1^2}{4a_2} + a_0$

So, we have $\displaystyle p = a_2$, $\displaystyle a = -\dfrac{a_1}{2a_2}$, and $\displaystyle b = a_0 - \dfrac{a_1^2}{4a_2}$.

Now, the quadratic is in the form the book wants.

5. ## Re: How did this happen?

Thank you for your help. I appreciate it.