# Putting a quadratic into standard form

$\left.f(x)=ax^{2}+bx+c\right.$ where $a\neq {0}$ (otherwise we'd have a linear function).

Now we factor out an $a$ :

$\left.f(x)=a\left(x^{2}+{\frac {b}{a}}x+{\frac {c}{a}}\right)\right.$ We want to create a perfect square, by replacing that term

$\left.x^{2}+{\frac {b}{a}}x\right.$ How do we do that?

Well, thinking backwards is often useful. If we consider a perfect square and expand it,

$\left.(x+d)^{2}=x^{2}+2dx+d^{2}\right.$ ,

we see that we can rewrite that as

$\left.(x+d)^{2}-d^{2}=x^{2}+2dx\right.$ .

We've solved for the quadratic piece and the linear piece. Now we set this equal to the expression we want to replace.

Setting

$\left.2d={\frac {b}{a}}\right.$ or

$d=\left.{\frac {b}{2a}}\right.$ we can write

$\left.(x+\left.{\frac {b}{2a}}\right.)^{2}-\left(\left.{\frac {b}{2a}}\right.\right)^{2}=x^{2}+2\left(\left.{\frac {b}{2a}}\right.\right)x=x^{2}+\left.{\frac {b}{a}}\right.x\right.$ .

from which we arrive at

$\left.f(x)=a\left((x+{\frac {b}{2a}})^{2}-({\frac {b}{2a}})^{2}+{\frac {c}{a}}\right)\right.$ Finally, following a little simplification, we can write $f(x)$ in standard form as

$\left.f(x)=a(x-{\frac {-b}{2a}})^{2}+{\frac {4ac-b^{2}}{4a}}\right.$ or

$\left.f(x)=a(x-{\frac {-b}{2a}})^{2}+c-{\frac {b^{2}}{4a}}\right.$ The former has the advantage of featuring the discriminant, from the quadratic formula. The simplest way of finding the constant is by evaluating

$\left.f\left({\frac {-b}{2a}}\right)\right.$ From this form, we can see that the maximum or minimum of the function occurs at

$\left.x=-{\frac {b}{2a}}\right.$ because this is the value at which the squared term is zero. The value of the function at $x=-{\frac {b}{2a}}$ is

$\left.{\frac {4ac-b^{2}}{4a}}\right.$ These two special values together are called the vertex: $\left(-{\frac {b}{2a}},{\frac {4ac-b^{2}}{4a}}\right)$ .

Mathematica: