# How do you solve x^2=12x-45 by completing the square?

Jul 28, 2015

#### Answer:

$\left\{\begin{matrix}{x}_{1} = 3 \left(2 + i\right) \\ {x}_{2} = 3 \left(2 - i\right)\end{matrix}\right.$

#### Explanation:

Start by getting the $x$-term on the left side of the equation

${x}^{2} - 12 x = \textcolor{red}{\cancel{\textcolor{b l a c k}{12 x}}} - \textcolor{red}{\cancel{\textcolor{b l a c k}{12 x}}} - 45$

${x}^{2} - 12 x = - 45$

Now you need to focus on writing the left side of the equation as a square of a binomial by adding a term to both sides of the equation.

The coefficient of the $x$-term will help with that. Divide this coefficient by 2, then square the result to get

$\frac{- 12}{2} = - 6$, then

${\left(- 6\right)}^{2} = 36$

This means that you must add $36$ to both sides of the equation.

${x}^{2} - 12 x + 36 = - 45 + 36$

The left side of the equation can now be written as

$\left({x}^{2} - 12 x + 36\right) = {x}^{2} + 2 \cdot \left(- 6\right) + {\left(- 6\right)}^{2} = {\left(x - 6\right)}^{2}$

The equation becomes

${\left(x - 6\right)}^{2} = - 9$

You can tell right away that this equation has no real solutions, so you're going to have to use complex numbers to get the solutions you want.

Take the square root of both sides to get

$\sqrt{{\left(x - 6\right)}^{2}} = \sqrt{- 9}$

$x - 6 = \pm \sqrt{- 9}$

Now, the square root of a negative number can be written, using the fact that ${i}^{2} = - 1$, as

$\sqrt{- a} = \sqrt{\left(- 1\right) \cdot a} = \sqrt{\left(- 1\right)} \cdot \sqrt{a} = \sqrt{{i}^{2}} \cdot \sqrt{a} = i \cdot \sqrt{a}$

In your case, you have

$\sqrt{- 9} = i \cdot \sqrt{9} = i \cdot \sqrt{{3}^{2}} = 3 i$

Therefore,

$x - 6 = \pm 3 i \implies {x}_{1 , 2} = 6 \pm 3 i = 3 \left(2 \pm i\right)$

The two solutions to your quadratic will thus be

${x}_{1} = \textcolor{g r e e n}{3 \left(2 + i\right)}$ and ${x}_{2} = \textcolor{g r e e n}{3 \left(2 - i\right)}$