# How can you solve any quadratic equation?

May 23, 2016

The most general methods are the quadratic formula and completing the square.

#### Explanation:

The most general methods which will cope with any quadratic equation in one variable are:

• Completing the square.

These methods are both capable of finding the roots regardless of whether they are integers, rational, irrational or even non-Real Complex numbers.

$\textcolor{w h i t e}{}$

The roots of $a {x}^{2} + b x + c = 0$ are given by the formula:

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

$\textcolor{w h i t e}{}$
Completing the square

Given:

$a {x}^{2} + b x + c = 0$

Note that:

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

So our equation can be rewritten:

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

Dividing both sides by $a$ we find:

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

Hence:

$x + \frac{b}{2 a} = \pm \sqrt{{b}^{2} / \left(4 {a}^{2}\right) - \frac{c}{a}}$

Which can be simplified to:

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

Hmmm... that looks familiar.

So completing the square and the quadratic formula are kind of the same thing, but in particular cases completing the square can be a little cleaner:

For example, factoring ${x}^{2} + 4 x - 21$ by completing the square:

${x}^{2} + 4 x - 21$

$= {x}^{2} + 4 x + 4 - 25$

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

$= \left(\left(x + 2\right) - 5\right) \left(\left(x + 2\right) + 5\right)$

$= \left(x - 3\right) \left(x + 7\right)$

${x}^{2} + 4 x - 21$ is $a {x}^{2} + b x + c$ with $a = 1$, $b = 4$, $c = - 21$

hence has zeros:

$x = \frac{- 4 \pm \sqrt{{4}^{2} - \left(4 \cdot 1 \cdot \left(- 21\right)\right)}}{2 \cdot 1}$

$= \frac{- 4 \pm \sqrt{16 + 84}}{2}$

$= \frac{- 4 \pm \sqrt{100}}{2}$

$= \frac{- 4 \pm 10}{2}$

$= - 2 \pm 5$

i.e. $x = - 7$ and $x = 3$

Hence factors:

$\left(x + 7\right) \left(x - 3\right)$