More

# Completing the Square

Say we have a simple expression likeÂ x2Â + bx. HavingÂ xÂ twice in the same expression can make life hard. What can we do?

Well, with a little inspiration from Geometry we can convert it, like this:

As you can seeÂ x2Â + bxÂ can be rearrangedÂ nearlyÂ into a square …

… and we canÂ complete the squareÂ withÂ (b/2)2

In Algebra it looks like this:

 x2Â + bx + (b/2)2 = (x+b/2)2 “Complete the Square”

So, by addingÂ (b/2)2Â we can complete the square.

AndÂ (x+b/2)2Â hasÂ xÂ onlyÂ once, which is easier to use.

## Keeping the Balance

Now … we can’t justÂ addÂ (b/2)2Â without alsoÂ subtractingÂ it too! Otherwise the whole value changes.

So let’s see how to do it properly with an example:

 Start with: (“b” is 6 in this case) Complete the Square: AlsoÂ subtractÂ the new term Simplify it and we are done.

The result:

x2Â + 6x + 7 Â  = Â  (x+3)2Â âˆ’Â 2

And nowÂ xÂ only appears once, and our job is done!

## A Shortcut Approach

Here is a quick way to get an answer. You may like this method.

First think about the result we want:Â (x+d)2Â + e

AfterÂ expandingÂ (x+d)2Â we get:Â x2Â + 2dx + d2Â + e

Now see if we can turn our example into that form to discover d and e

### Example: try to fitÂ x2Â + 6x + 7Â intoÂ x2Â + 2dx + d2Â + e

Now we can “force” an answer:

• We know thatÂ 6xÂ must end up asÂ 2dx, soÂ dÂ must be 3
• Next we see thatÂ 7Â must become d2Â + e =Â 9 + e, soÂ eÂ must be âˆ’2

And we get the same resultÂ (x+3)2Â âˆ’ 2Â as above!

Now, let us look at a useful application: solving Quadratic Equations …

## Solving General Quadratic Equations by Completing the Square

We can complete the square toÂ solveÂ aÂ Quadratic EquationÂ (find where it is equal to zero).

But a general Quadratic Equation can have aÂ coefficientÂ ofÂ aÂ in front ofÂ x2:

ax2Â + bx + c = 0

But that is easy to deal with … just divide the whole equation by “a” first, then carry on:

x2Â + (b/a)x + c/a = 0

## Steps

Now we canÂ solveÂ a Quadratic Equation in 5 steps:

• Step 1Â Divide all terms byÂ aÂ (the coefficient ofÂ x2).
• Step 2Â Move the number term (c/a) to the right side of the equation.
• Step 3Â Complete the square on the left side of the equation and balance this by adding the same value to the right side of the equation.

We now have something that looks like (x + p)2Â = q, which can be solved rather easily:

• Step 4Â Take the square root on both sides of the equation.
• Step 5Â Subtract the number that remains on the left side of the equation to findÂ x.

## Examples

OK, some examples will help!

### Example 1: Solve x2Â + 4x + 1 = 0

Step 1Â can be skipped in this example since the coefficient of x2Â is 1

Step 2Â Move the number term to the right side of the equation:

x2Â + 4x = -1

Step 3Â Complete the square on the left side of the equation and balance this by adding the same number to the right side of the equation.

(b/2)2Â = (4/2)2Â = 22Â = 4

x2Â + 4x + 4 = -1 + 4
(x + 2)2Â = 3

Step 4Â Take the square root on both sides of the equation:

x + 2 = Â±âˆš3 = Â±1.73 (to 2 decimals)

Step 5Â Subtract 2 from both sides:

x = Â±1.73 â€“ 2 = -3.73 or -0.27

And here is an interesting and useful thing.

At the end of step 3 we had the equation:

(x +Â 2)2Â =Â 3

It gives us theÂ vertexÂ (turning point) of x2Â + 4x + 1:Â (-2, -3)

### Example 2: Solve 5x2Â â€“ 4x â€“ 2 = 0

Step 1Â Divide all terms by 5

x2Â â€“ 0.8x â€“ 0.4 = 0

Step 2Â Move the number term to the right side of the equation:

x2Â â€“ 0.8x = 0.4

Step 3Â Complete the square on the left side of the equation and balance this by adding the same number to the right side of the equation:

(b/2)2Â = (0.8/2)2Â = 0.42Â = 0.16

x2Â â€“ 0.8x + 0.16 = 0.4 + 0.16
(x â€“ 0.4)2Â = 0.56

Step 4Â Take the square root on both sides of the equation:

x â€“ 0.4 = Â±âˆš0.56 = Â±0.748 (to 3 decimals)

Step 5Â Subtract (-0.4) from both sides (in other words, add 0.4):

x = Â±0.748 + 0.4 = -0.348 or 1.148

## Why “Complete the Square”?

Why complete the square when we can just use theÂ Quadratic FormulaÂ to solve a Quadratic Equation?

Well, one reason is given above, where the new form not only shows us the vertex, but makes it easier to solve.

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

For example “x” may itself be a function (likeÂ cos(z)) and rearranging it may open up a path to a better solution.

Also Completing the Square is the first step in theÂ Derivation of the Quadratic Formula

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