# Quadratic Formula and Functions

Completing the Square

# At a Glance - Completing the Square

### Sample Problem

Solve the quadratic equation x2 + 2x + 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.

(x2 + 2x) + 5 = 0

It looks like x2 + 2x 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:

(x2 + 2x + 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.

(x2 + 2x) + 5 (+ 1 – 1) = 0

(x2 + 2x + 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 = ± 2i

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

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

x2 + 2x + 5 = 0

(-1 + 2i)2 + 2(-1 + 2i) + 5

(1 – 4i + 4i2) – 2 + 4i + 5

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

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

So far, so good.

x2 + 2x + 5 = 0

(-1 – 2i)2 + 2(-1 – 2i) + 5

(1 + 4i + 4i2) – 2 – 4i + 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 x2 + 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 x2 – 7x + 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 2x2 – 5x – 3 = 0 by completing the square.

This equation is easily factored: (2x + 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 x2 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.

(2x2 – 5x – 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 (x2 + 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.-x2 + 6x + 13 = 0

#### Example 2

 Solve by completing the square.2x2 – x – 4 = 0

#### Example 3

 Solve by completing the square.

#### Exercise 1

Solve by completing the square.

x2 – 3x – 5 = 0

#### Exercise 2

Solve by completing the square.

3x2 + 6x + 3 = 0

#### Exercise 3

Solve by completing the square.

x2 + 2x – 3 = 0

#### Exercise 4

Solve by completing the square.

#### Exercise 5

Solve by completing the square.

x2 + 7x – 1 = 0