# Solving quadratics by completing the square

CCSS Math: HSA.REI.B.4, HSA.REI.B.4a, HSA.REI.B.4b, HSA.SSE.B.3, HSA.SSE.B.3b, HSF.IF.C.8, HSF.IF.C.8a

For example, solve x²+6x=-2 by manipulating it into (x+3)²=7 and then taking the square root.

#### What you should be familiar with before taking this lesson

#### What you will learn in this lesson

So far, you've either solved quadratic equations by taking the square root or by factoring. These methods are relatively simple and efficient, when applicable. Unfortunately, they are not always applicable.

In this lesson, you will learn a method for solving

*any*kind of quadratic equation.# Solving quadratic equations by completing the square

Consider the equation $x^2+6x=-2$. The square root and factoring methods are not applicable here.

But hope is not lost! We can use a method called

**completing the square**. Let's start with the solution and then review it more closely.In conclusion, the solutions are $x=\sqrt{7}-3$ and $x=-\sqrt{7}-3$.

### What happened here?

Adding $9$ to $x^2+6x$ in row $\blueD{(2)}$ had the fortunate result of making the expression a perfect square that can be factored as $(x+3)^2$. This allowed us to solve the equation by taking the square root.

This was no coincidence, of course. The number $9$ was carefully chosen so the resulting expression would be a perfect square.

### How to complete the square

To understand how $9$ was chosen, we should ask ourselves the following question: If $x^2+6x$ is the beginning of a perfect square expression, what should be the constant term?

Let's assume that the expression can be factored as the perfect square $(x+a)^2$ where the value of constant $a$ is still unknown. This expression is expanded as $x^2+2ax+a^2$, which tells us two things:

- The coefficient of $x$, which we know to be $6$, should be equal to $2a$. This means that $a=3$.

- The constant number we need to add is equal to $a^2$, which is $3^2=9$.

Try to complete a few squares on your own.

### Challenge question

This challenge question gives us a shortcut to completing the square, for those that like shortcuts and don't mind memorizing things. It shows us that in order to complete $x^2+bx$ into a perfect square, where $b$ is any number, we need to add $\left(\dfrac{b}{2}\right)^2$ to it.

For example, in order to complete $x^2+\blueD{6}x$ into a perfect square, we added $\left(\dfrac{\blueD{6}}{2}\right)^2=9$ to it.

### Solving equations one more time

All right! Now that you're a certified square-completer, let's go back to the process of solving equations using our method.

Let's look at a new example, the equation $x^2-10x=-12$.

In order to make the original left-hand expression $x^2-10x$ a perfect square, we added $25$ in row $\blueD{(2)}$. As always with equations, we did the same for the right-hand side, which made it increase from $-12$ to $13$.

In general, the choice of the number to add in order to complete the square doesn't depend on the right-hand side, but we should always add the number to both sides.

Now it's your turn to solve some equations.

# Arranging the equation before completing the square

### Rule 1: Separate the variable terms from the constant term

This is how the solution of the equation $x^2+5x-6=x+1$ goes:

Completing the square on one of the equation's sides is not helpful if we have an $x$-term on the other side. This is why we subtracted $x$ in row $\tealD{(2)}$, placing all the variable terms on the left-hand side.

Furthermore, to complete $x^2+4x$ into a perfect square, we need to add $4$ to it. But before we do that, we need to make sure that all the constant terms are on the other side of the equation. This is why we added $6$ in row $\purpleC{(3)}$, leaving $x^2+4x$ on its own.

### Rule 2: Make sure the coefficient of $x^2$ is equal to $1$.

This is how the solution of the equation $3x^2-36x=-42$ goes:

The completing the square method only works if the coefficient of $x^2$ is $1$.

This is why in row $\maroonD{(2)}$ we divided by the coefficient of $x^2$, which is $3$.

Sometimes, dividing by the coefficient of $x^2$ will result in other coefficients becoming fractions. This doesn't mean you did something wrong, it just means you will have to work with fractions in order to solve.

Now it's your turn to solve an equation like this.