The quadratic formula

We have seen that the general quadratic equation looks like ax^2 + bx + c = 0

We are going to use the technique of completing the square on the general equation to come up with a formula for solving any quadratic equation.

ax^2 + bx + c = 0

We divide by a

x^2 + \frac{b}{a}x + \frac{c}{a} = 0

Then we complete the square

(x + \frac{b}{2a})^2 - (\frac{b}{2a})^2 + \frac{c}{a} = 0

Rearrange

(x + \frac{b}{2a})^2 = (\frac{b}{2a})^2 - \frac{c}{a}

Take the square root

sqrt{(x + \frac{b}{2a})^2} = pmsqrt{(\frac{b}{2a})^2 - \frac{c}{a}}

x + \frac{b}{2a} = pmsqrt{(\frac{b}{2a})^2 - \frac{c}{a}}

x = -\frac{b}{2a}pmsqrt{(\frac{b}{2a})^2 - \frac{c}{a}}

This is a formula that will find the roots of any quadratic equation but we can simplify it by multiplying the square root part by \frac{2a}{2a}. This doesn’t change the result we get because \frac{2a}{2a} = 1 and multiplying by 1 keeps the result the same.

When we put 2a inside the square root, we need to square it, so below you can see \frac{sqrt{4a^2}}{2a}.

x = -\frac{b}{2a}pm\frac{sqrt{4a^2((\frac{b}{2a})^2 - \frac{c}{a})}}{2a}

x = -\frac{b}{2a}pm\frac{sqrt{(\frac{4a^2b^2}{4a^2}) - \frac{4a^2c}{a}}}{2a}

x = -\frac{b}{2a}pm\frac{sqrt{{b^2} - 4ac}}{2a}

x = \frac{-bpmsqrt{{b^2} - 4ac}}{2a}