# Can anyone teach me how to solve a Quadratic equation by completing the square? Thanks..

Apr 5, 2016

The idea behind completing the square is to add or subtract a constant to obtain the form ${\left(x - h\right)}^{2}$ and then take a square root to be left with a linear equation. Let's do a concrete example first.

Starting from $2 {x}^{2} - 7 x - 4 = 0$

Step 1: Divide both sides by $2$ to obtain ${x}^{2}$ as the first term

${x}^{2} - \frac{7}{2} x - 2 = 0$

Step 2: Add $2$ to both sides to isolate the $x$ terms.

${x}^{2} - \frac{7}{2} x = 2$

Step 3: Add a constant to both sides which will allow us to factor the left hand side as ${\left(x - h\right)}^{2}$. Noting that ${\left(x - h\right)}^{2} = {x}^{2} - 2 h + {h}^{2}$ we have $- 2 h = - \frac{7}{2}$ and thus $h = \frac{7}{4}$, meaning we add ${\left(\frac{7}{4}\right)}^{2} = \frac{49}{16}$ to both sides.

${x}^{2} - \frac{7}{2} + \frac{49}{16} = \frac{81}{16}$

Step 4: Factor the left hand side

${\left(x - \frac{7}{4}\right)}^{2} = \frac{81}{16}$

Step 5: Take the square root of both sides. Remember to account for both positive and negative roots.

$x - \frac{7}{4} = \pm \sqrt{\frac{81}{16}} = \pm \frac{9}{4}$

Step 6: Solve the remaining linear equation:

$x = \frac{7}{4} \pm \frac{9}{4} = \frac{1}{4} \left(7 \pm 9\right)$

$\implies x = 4$ or $x = - \frac{1}{2}$

The real trick here is observing in step 3 that the constant we need to add is equal to the square of half of the coefficient of $x$.

Let's see what happens if we apply this to a general quadratic equation.

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

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

$\implies {x}^{2} + \frac{b}{a} x = - \frac{c}{a}$

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

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

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

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

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

And we have just derived the quadratic formula.