How do you solve by completing the square: ax^2+bx+c=0?

Apr 1, 2015

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

Divide all terms by $a$ so as to reduce the coefficient of ${x}^{2}$ to $1$
${x}^{2} + \frac{b}{a} x + \frac{c}{a} = 0$

Subtract the constant term from both sides of the equation
${x}^{2} + \frac{b}{a} x = - \frac{c}{a}$

To have a square on the left side the third term (constant) should be
${\left(\frac{b}{2 a}\right)}^{2}$

So add that amount to both sides
${x}^{2} + \frac{b}{a} x + {\left(\frac{b}{2 a}\right)}^{2} = {\left(\frac{b}{2 a}\right)}^{2} - \frac{c}{a}$

Re-write the left-side as a square
${\left(x + \left(\frac{b}{2 a}\right)\right)}^{2} = {\left(\frac{b}{2 a}\right)}^{2} - \frac{c}{a}$

Take the square root of both sides (remembering that the result could be plus or minus)
$x + \left(\frac{b}{2 a}\right) = \pm \sqrt{{\left(\frac{b}{2 a}\right)}^{2} - \frac{c}{a}}$

Subtract the constant term on the left side from both sides
$x = \pm \sqrt{{\left(\frac{b}{2 a}\right)}^{2} - \frac{c}{a}} - \left(\frac{b}{2 a}\right)$

or, with some simplification

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

(the standard form for solving a quadratic)