# At a Glance - Completing the Square

### Sample Problem

Solve the quadratic equation *x*^{2} + 2*x* + 5 = 0.

Hmm, now this is tricky. This equation is—most definitely—not factorable. It would be really convenient if it were factorable, though; this is especially the case if it factored into a squared term. In fact, we can make it do just that, and that's what **completing the square** is all about.

Take another look at the equation above, this time with some parentheses thrown in.

(*x*^{2} + 2*x*) + 5 = 0

It looks like *x*^{2} + 2*x* would be factorable if we had another term in the parentheses. If we pick the right number, it would even factor into a squared term, (*x* + *d*)^{2}. For this equation, that number is 1:

(*x*^{2} + 2*x* **+ 1**) = (*x* + 1)^{2}

We can even pull a little bit of algebraic wizardry to make it happen. Check it out: (+1 – 1) = 0. Who cares if we add zero to an equation? No one, that's who. We can add *and* subtract a 1 to the left side of our original equation without technically changing anything.

(*x*^{2} + 2*x*) + 5 (+ 1 – 1) = 0

(*x*^{2} + 2*x* + 1) + 5 – 1 = 0

(*x* + 1)^{2} + 4 = 0

Now that we have all of the *x*'s inside the squared term, we can do this:

(*x* + 1)^{2} = -4

*x* + 1 = ± 2*i*

*x* = -1 + 2*i* and *x* = -1 – 2*i*

Did we really just solve an unfactorable equation? Let's check our answers and make sure.

*x*^{2} + 2*x* + 5 = 0

(-1 + 2*i*)^{2} + 2(-1 + 2*i*) + 5

(1 – 4*i* + 4*i ^{2}*) – 2 + 4

*i*+ 5

(1 – 4*i* – 4) + 4*i* + 3

-4*i* + 4*i* – 3 + 3 = 0

So far, so good.

*x*^{2} + 2*x* + 5 = 0

(-1 – 2*i*)^{2} + 2(-1 – 2*i*) + 5

(1 + 4*i* + 4*i ^{2}*) – 2 – 4

*i*+ 5

(1 – 4) + 3 = 0

Yes, we did it. Booyah.

## A Squared Peg for a Square Hole

How were we supposed to know to add and subtract 1 from the equation, though? There's a simple formula for the number you need to complete the square: when your equation is in the form *x*^{2} + *bx* + *c* = 0, you wanna add and subtract . In the previous example, we added . What will we add in the next example?

### Sample Problem

Solve the quadratic equation *x*^{2} – 7*x* + 2 = 0.

Again we have an equation we can't factor, so we need to complete the square. Using our newfangled knowledge, we know that we need . So we'll add *and* subtract that on the left side of our equation, to keep everything balanced.

When we complete the square, the term inside the parentheses is , because you multiply that by itself to get in the expression you factored it from.

and

We think we did everything right, but how about we double-check our results by plugging our answers back into the original equation?

Ugh. UGGHH. That's a lot of fractions. Oh well, just one more to go.

Whew. Unfortunately, solutions with square roots and fractions are common when dealing with quadratic equations that can't be factored.

### Sample Problem

Solve the quadratic equation 2*x*^{2} – 5*x* – 3 = 0 by completing the square.

This equation is easily factored: (2*x* + 1)(*x* – 3) = 0. See, we're almost done already. But the problem says we need to solve it by completing the square, so we've gotta go through with it. At least we can easily check our answer.

There's one important thing we need to point out here before continuing: completing the square will work *only if a* = 1. That means we need to get rid of that 2 in front of the *x*^{2} somehow. If you don't do that, terrible things will happen to you. Oh, and you'll get the problem wrong.

Let's divide the whole equation by 2.

(2*x*^{2} – 5*x* – 3 = 0) ÷ 2

Now the term we need to add or subtract is

That extra 2 on the bottom can be tricky, so be careful.

That gives us two answers: *x* = 3 and .

This is exactly the result we would expect from our factored equation. If you have a choice, you want to factor if possible.

### Summing It All Up

When you're trying to complete the square, follow these steps.

- If
*a*is anything other than 1, divide it out. You need*a*= 1 to even start.

- Separate the equation out into (
*x*^{2}+*bx*) and everything else.

- Add to your
*x*-values, and subtract from the rest.

- Factor your
*x*-terms into or as needed.

- Isolate your squared term and take the square root of both sides.

- Simplify the expression.

The steps themselves are fairly simple, but the math can get convoluted. Like trying to play chess in your head.

#### Example 1

Solve by completing the square. - |

#### Example 2

Solve by completing the square. 2 |

#### Example 3

Solve by completing the square. |

#### Exercise 1

Solve by completing the square.

*x*^{2} – 3*x* – 5 = 0

#### Exercise 2

Solve by completing the square.

3*x*^{2} + 6*x* + 3 = 0

#### Exercise 3

Solve by completing the square.

*x*^{2} + 2*x* – 3 = 0

#### Exercise 4

Solve by completing the square.

#### Exercise 5

Solve by completing the square.

*x*^{2} + 7*x* – 1 = 0