Math is Fun
Bookmark Add to favorites
link Link here
Math is Fun HomeHome





Top-rated teacher Web sites rated by teacher usage
Edunet site of the week January 2001
Maths Is Fun is ICRA Registered

Copyright © 2009
MathsIsFun.com

Completing the Square

"Completing the Square" is where you ...

... take a Quadratic Equation like this: and turn it into this:

ax2 + bx + c = 0

a(x+d)2 + e = 0


For those of you in a hurry, I can tell you that:    
and:    

But if you have time, let me show you how to get there.

The Clue

First I would like to show you what happens when you expand (x+d)2

(x+d)2 = (x+d)(x+d) = x(x+d) + d(x+d) = x2 + 2dx + d2

So, if we can get the equation into the form:
 
x2 + 2dx + d2
 
Then we can immediately rewrite it as:
 
(x+d)2
 

The Trick

So, if you want it like x2 + 2dx + d2, then make it like that!

You can make a new third term that matches the second, by dividing by 2 then squaring:

Remember this: Take half of the middle number, square it and add it

You must also subtract that new term (so you don't change the value of the equation) and you must also keep the old third term.

Here, I will show you how to do it an example:

Start with:  

 

Make a new third term :

Also subtract the new term

 

Simplify it and you are done.

   

 

Let us now work through the theory step by step

Simplest Case

Let's first work on:
Add (b/2)2 to both sides:

It is now in the form x2 + 2dx + d2 where d=b/2, so we can rewrite it

Complete the Square:
   
See? Not hard. Tricky but not hard.

The Full One

OK, now for the full case. This one has a coefficient of a in front of x2:

Start with
Divide the equation by a
Put c/a on other side
Add (b/2a)2 to both sides

Aha! we have the x2 + 2dx + d2 format that we wanted!
(if we treat "b/2a" as "d", that is)

"Complete the Square"
Now bring everything back...
... to the left side
... to the same multiple of x2

And you will notice that we have got:  
a(x+d)2 + e = 0
Where:  
, and:

Example

Let's try a real example:

Start with 3x2 - 4x - 5 = 0
Divide the equation by a
Put c/a on other side
Add (b/2a)2 to both sides
... now it is ready to be transformed ...
"Complete the Square"
We can simplify the fractions
Now bring everything back...
... to left side
... to same multiple of x2

But here's an interesting thing ... the vertex (the highest or lowest point of a curve) is at (2/3, -19/3) ... and those numbers are in the equation!

Also, the equation can now be solved by hand:
 
 
 
 
 
 

Why "Complete the Square"?

Why would you want to complete the square when you can just use the Quadratic Formula to solve a Quadratic Equation?

Well, the answer is partly given above, where the new form not only shows you the vertex, but makes it easier to solve.

It is the first step in the Derivation of the Quadratic Formula

There are times when the form "ax2 + bx + c" may be part of a larger problem and rearranging it as "a(x+d)2 + e" makes the solution easier, because "x" only appears once.

For example it is hard to Integrate 1/(3x2 - 4x - 6) but 1/(3(x - 4/6)2 - 22/3) is easier.

Or "x" may itself be a function (like cos(z)) and once again rearranging it may open up a path to a better solution.

Just think of it as another tool in your mathematics toolbox.

 

Try some more Completing the Square Exercises

(Thanks to Patrick for the LaTeX formatting)