# Completing the Square

Completing the square is another method for solving quadratic equations. Although we can use the quadratic formula to solve any quadratic equation, completing the square helps us gain a better intuition for quadratic equations and understand where the quadratic formula comes from. As we will see in the next section, completing the square will also help us rearrange quadratic equations into forms that are easy to graph.

The main idea behind completing the square is that every quadratic expression has a squared factor hidden inside of it.

\begin{align*} \text{Original equation} \hspace{.5cm} &\Bigg| \hspace{.5cm} x^2+2x-5=0 \\ \text{Add } 5 \text{ to both sides} \hspace{.5cm} &\Bigg| \hspace{.5cm} x^2+2x=5 \\ \text{Add } 1 \text{ to both sides} \hspace{.5cm} &\Bigg| \hspace{.5cm} x^2+2x+1=6 \\ \text{Factor} \hspace{.5cm} &\Bigg| \hspace{.5cm} (x+1)^2=6 \\ \text{Take positive/negative root} \hspace{.5cm} &\Bigg| \hspace{.5cm} x+1=\pm \sqrt{6} \\ \text{Solve} \hspace{.5cm} &\Bigg| \hspace{.5cm} x= -1\pm \sqrt{6} \end{align*}

To find the squared factor, we just need to move the constant to the other side of the equation and add $\left( \frac{b}{2} \right)^2$ to both sides. Then, the quadratic expression will factor into $\left( x + \frac{b}{2} \right)^2$.

\begin{align*} \text{Original equation} \hspace{.5cm} &\Bigg| \hspace{.5cm} x^2+bx+c=0 \\ \begin{matrix} \text{Move the constant to the} \\ \text{other side} \end{matrix} \hspace{.5cm} &\Bigg| \hspace{.5cm} x^2+bx=-c \\ \text{Add } \left( \frac{b}{2} \right)^2 \text{ to both sides} \hspace{.5cm} &\Bigg| \hspace{.5cm} x^2+bx+ \left( \frac{b}{2} \right)^2 = \left( \frac{b}{2} \right)^2 - c \\ \text{Factor} \hspace{.5cm} &\Bigg| \hspace{.5cm} \left( x + \frac{b}{2} \right)^2 = \left( \frac{b}{2} \right)^2 - c \\ \text{Take positive/negative root} \hspace{.5cm} &\Bigg| \hspace{.5cm} x + \frac{b}{2} = \pm \sqrt{ \left( \frac{b}{2} \right)^2 - c} \\ \text{Solve} \hspace{.5cm} &\Bigg| \hspace{.5cm} x = -\frac{b}{2} \pm \sqrt{ \frac{b^2}{4} - c} \end{align*}

Hey, the solution is the same as the quadratic equation with $a=1$!

\begin{align*} x &= -\frac{b}{2} \pm \sqrt{ \frac{b^2}{4} - c } \\ x &= -\frac{b}{2} \pm \sqrt{ \frac{b^2-4c}{4} } \\ x &= -\frac{b}{2} \pm \frac{ \sqrt{ b^2-4c} }{2} \\ x &= \frac{-b \pm \sqrt{ b^2-4c} }{2} \\ x &= \frac{-b \pm \sqrt{ b^2-4(1)c} }{2(1)} \\ \end{align*}

To complete the square with $a$ not equal to $1$, we can simply divide by $a$ to create an equivalent equation where $a$ IS equal to $1$.

\begin{align*} \text{Original equation} \hspace{.5cm} &\Bigg| \hspace{.5cm} 3x^2-18x-1=0 \\ \text{Divide by } 3 \hspace{.5cm} &\Bigg| \hspace{.5cm} x^2 - 6x - \frac{1}{3} = 0 \\ \text{Add } \frac{1}{3} \text{ to both sides} \hspace{.5cm} &\Bigg| \hspace{.5cm} x^2 - 6x = \frac{1}{3} \\ \text{Add } \left( \frac{-6}{2} \right)^2 = 9 \text{ to both sides} \hspace{.5cm} &\Bigg| \hspace{.5cm} x^2 - 6x + 9 = \frac{28}{3} \\ \text{Factor} \hspace{.5cm} &\Bigg| \hspace{.5cm} (x-3)^2 = \frac{28}{3} \\ \begin{matrix} \text{Take positive/negative root} \\ \text{and solve} \end{matrix} \hspace{.5cm} &\Bigg| \hspace{.5cm} x = 3 \pm \sqrt{ \frac{28}{3} } \end{align*}

By completing the square on the general form $ax^2+bx+c=0$, we arrive at the quadratic equation:

\begin{align*} \text{Original equation} \hspace{.5cm} &\Bigg| \hspace{.5cm} ax^2+bx+c=0 \\ \text{Divide by } a \hspace{.5cm} &\Bigg| \hspace{.5cm} x^2 + \frac{b}{a}x + \frac{c}{a} = 0 \\ \begin{matrix} \text{Move the constant to the} \\ \text{other side} \end{matrix} \hspace{.5cm} &\Bigg| \hspace{.5cm} x^2 + \frac{b}{a} x = -\frac{c}{a} \\ \begin{matrix} \text{Add } \left( \frac{b/a}{2} \right)^2 = \left( \frac{b}{2a} \right)^2 \text{ to} \\ \text{both sides} \end{matrix} \hspace{.5cm} &\Bigg| \hspace{.5cm} x^2 + \frac{b}{a} x + \left( \frac{b}{2a} \right)^2 = \left( \frac{b}{2a} \right)^2-\frac{c}{a} \\ \text{Factor} \hspace{.5cm} &\Bigg| \hspace{.5cm} \left( x+\frac{b}{2a} \right)^2 = \left( \frac{b}{2a} \right)^2 - \frac{c}{a} \\ \text{Take positive/negative root} \hspace{.5cm} &\Bigg| \hspace{.5cm} x+\frac{b}{2a} = \pm \sqrt{ \left( \frac{b}{2a} \right)^2 - \frac{c}{a} } \\ \text{Solve} \hspace{.5cm} &\Bigg| \hspace{.5cm} x = -\frac{b}{2a} \pm \sqrt{ \frac{b^2}{4a^2} - \frac{c}{a} } \\ \text{Simplify} \hspace{.5cm} &\Bigg| \hspace{.5cm} x = -\frac{b}{2a} \pm \sqrt{ \frac{b^2-4ac}{4a^2} } \\ \text{ } \hspace{.5cm} &\Bigg| \hspace{.5cm} x = -\frac{b}{2a} \pm \frac{ \sqrt{ b^2-4ac} }{2a} \\ \text{ } \hspace{.5cm} &\Bigg| \hspace{.5cm} x = \frac{ -b \pm \sqrt{ b^2-4ac} }{2a} \end{align*}

Practice Problems

Solve the following quadratic equations by completing the square. If there are two solutions, leave your answer in the form $\text{number} \pm \sqrt{\text{other number}}$. (You can view the solution by clicking on the problem.)

$1) \hspace{.5cm} x^2+3x-1=0$
Solution:
$x = -\frac{3}{2} \pm \sqrt{ \frac{13}{4} }$

$2) \hspace{.5cm} x^2-x-2=0$
Solution:
$x = \frac{1}{2} \pm \sqrt{ \frac{9}{4} }$

$3) \hspace{.5cm} -x^2+2x+3=0$
Solution:
$x= 1 \pm \sqrt{4}$

$4) \hspace{.5cm} -x^2-4x+7=0$
Solution:
$x=-2 \pm \sqrt{11}$

$5) \hspace{.5cm} x^2=1-7x$
Solution:
$x=-\frac{7}{2} \pm \sqrt{ \frac{53}{4} }$

$6) \hspace{.5cm} 3x=x^2+5$
Solution:
$\text{no solution}$

$7) \hspace{.5cm} 3x^2-3=2x$
Solution:
$x=\frac{1}{3} \pm \sqrt{ \frac{10}{9} }$

$8) \hspace{.5cm} 1=5x^2+3x$
Solution:
$x= -\frac{3}{10} \pm \sqrt{ \frac{29}{100} }$

$9) \hspace{.5cm} 2x-2x^2=5$
Solution:
$\text{no solution}$

$10) \hspace{.5cm} 3-7x^2=x$
Solution:
$x=-\frac{1}{14} \pm \sqrt{ \frac{85}{196} }$

Tags: