M4.9.4 Chapter 4

Completing the square

I know (x + 3)² = x² + 6x + 9. How can I use a square to write x² + 6x + 2?

Your guess

Pick one before you read on. It is fine to be wrong.

Your guess
  • You picked A. Read on. At the end, the chapter comes back to your guess.

  • You picked B. Read on. At the end, the chapter comes back to your guess.

  • You picked C. Read on. At the end, the chapter comes back to your guess.

By the end you can

  • Write x² + 6x + 2 as (x + 3)² − 7
  • Solve a quadratic by completing the square

The expression x² + 6x is nearly a perfect square. Picture a square of side x and two strips, each 3 wide and x long. The big square is not finished: its corner is missing.

Draw it first

Complete the square

  1. Step 1 shows a square marked x² with a strip marked 3x on its right and a strip marked 3x below it. The sides are marked x and 3. A dashed gap is left in the corner. Step 2 fills the gap with a hatched square marked 9, and names the whole square (x + 3)².x²3x3xx3x3

    1 A square x by x, and two strips 3 by x, make x² + 3x + 3x = x² + 6x. A corner is missing.

  2. Step 1 shows a square marked x² with a strip marked 3x on its right and a strip marked 3x below it. The sides are marked x and 3. A dashed gap is left in the corner. Step 2 fills the gap with a hatched square marked 9, and names the whole square (x + 3)².x²3x3x9x3x3(x + 3)²

    2 The missing corner is 3 by 3, with area 9. Add it, and the whole square has side x + 3.

So x² + 6x + 9 = (x + 3)². The number to add is 9. It is the square of half the x number: half of 6 is 3, and 3 × 3 = 9. A square like this is a perfect square.

To complete the square on x² + 6x + 2, make the square and then take away the extra. We added 9 to get a square, so we must take 9 away again. The value stays the same.

Worked example

Write x² + 6x + 2 in the form (x + a)² + b.

  1. The x number is 6. Half of 6 is 3.
  2. So start with the square (x + 3)². Expanding it gives x² + 6x + 9, and 3 × 3 = 9.
  3. Take away 9 and put 2 back: x² + 6x + 2 = (x + 3)² − 9 + 2.
  4. Work out −9 + 2 = −7.
  5. So x² + 6x + 2 = (x + 3)² − 7.

Answer: (x + 3)² − 7

This form shows something useful. A square is never below 0. So (x + 3)² − 7 is never below −7, and it equals −7 when x = −3. You can see it on the graph.

A graph with the x axis x and the y axis y. A curve named y = x² + 6x + 2 has its lowest point T at (−3, −7), marked with dashed guides to both axes.Ty = x² + 6x + 2−7−6−5−4−3−2−11−8−7−6−5−42340xy
The lowest point T is at x = −3, and its height is −7. The form (x + 3)² − 7 gives both numbers.

Worked example

Write x² − 8x + 3 in the form (x + a)² + b.

  1. The x number is −8. Half of −8 is −4.
  2. So start with (x − 4)². Expanding it gives x² − 8x + 16, and (−4) × (−4) = 16.
  3. Take away 16 and put 3 back: x² − 8x + 3 = (x − 4)² − 16 + 3.
  4. Work out −16 + 3 = −13.
  5. So x² − 8x + 3 = (x − 4)² − 13.

Answer: (x − 4)² − 13

Now use it to solve an equation. Once the square is complete, x appears only once. So you can undo the square with a square root. But a positive number has two square roots. The sign √ means the positive one, so the two square roots of 7 are √7 and −√7.

A table with the heads x and x × x. Rows: x is 4 and x × x is 16; x is −4 and x × x is 16; x is 3 and x × x is 9; x is −3 and x × x is 9.xx × x416−41639−39
Both 4 and −4 have the square 16. So 16 has two square roots: √16 = 4 and −√16 = −4.

Worked example

Solve x² + 6x − 7 = 0 by completing the square.

  1. Write x² + 6x − 7 as (x + 3)² − 9 − 7, which is (x + 3)² − 16.
  2. The equation is (x + 3)² − 16 = 0. Add 16 to both sides: (x + 3)² = 16.
  3. Take the square root of both sides. There are two square roots, 4 and −4: x + 3 = 4 or x + 3 = −4.
  4. Take 3 from each side: x = 1 or x = −7.
  5. Check x = −7: (−7)² + 6 × (−7) − 7 = 49 − 42 − 7 = 0.

Answer: x = 1 or x = −7

This equation also factorises: (x + 7)(x − 1) = 0 gives the same answers. Completing the square matters most when the quadratic does not factorise.

Worked example

Solve x² + 6x + 2 = 0. Give the answers to 2 decimal places.

  1. Write x² + 6x + 2 as (x + 3)² − 7. The equation is (x + 3)² − 7 = 0.
  2. Add 7 to both sides: (x + 3)² = 7.
  3. Take the square root of both sides: x + 3 = √7 or x + 3 = −√7.
  4. Use √7 ≈ 2.6458. Then x ≈ 2.6458 − 3 = −0.35, or x ≈ −2.6458 − 3 = −5.65.
  5. Check x = −0.35 in the equation. It gives 0.0225, which is close to 0, because −0.35 is rounded.

Answer: x ≈ −0.35 or x ≈ −5.65

See it three ways

With things

Cut a square of side x and two strips 5 wide. A 5 by 5 square is missing from the corner.

As a picture

A square marked x² with a strip marked 5x on its right and a strip marked 5x below it. The sides are marked x and 5. A hatched corner square is marked 25, and the whole square is named (x + 5)².x²5x5x25x5x5(x + 5)²

In words

Half of the x number 10 is 5. The missing corner has area 5 × 5 = 25. So the square is (x + 5)², and 25 must be taken away again.

In symbols

x² + 10x = (x + 5)² − 25.

Try it

Test the new form with numbers

You need: paper and a pencil.

  1. Put x = 0 into x² + 6x + 2 and into (x + 3)² − 7.
  2. Do the same for x = 1 and x = 2.
  3. Write the results in a table.

What you will see: Both forms give the same number for every x. A completed square is the same expression written another way.

If you cannot try it, this is what happens.
A table with the heads x, before and after. Before is x² + 6x + 2 and after is (x + 3)² − 7. Rows: x is 0 with 2 and 2; x is 1 with 9 and 9; x is 2 with 18 and 18.xbeforeafter02219921818

A wrong idea many people have

(x + 3)² = 16 gives x + 3 = 4, so x = 1.

Why it feels right: The square root of 16 is 4, so it seems that there is only one answer.

The test that breaks it: Put x = −7. Then (−7 + 3)² = (−4)² = 16. So x = −7 works too.

What is true: 16 has two square roots, 4 and −4. Write x + 3 = 4 or x + 3 = −4, so x = 1 or x = −7.

A wrong idea many people have

x² + 6x = (x + 3)².

Why it feels right: The 3 is half of 6, and the square looks like the start of the expression.

The test that breaks it: Put x = 1. Then x² + 6x = 7, but (1 + 3)² = 16. They are not equal.

What is true: (x + 3)² has an extra 9 that x² + 6x does not have. So x² + 6x = (x + 3)² − 9.

Key words

perfect square
an expression that is something squared, such as x² + 6x + 9, which is (x + 3)².
completing the square
writing x² + bx + c as a square plus a number.

Back to your guess

The answer is C: (x + 3)² − 7

Half of the x number 6 is 3, so the square is (x + 3)². It expands to x² + 6x + 9, which has 9 where we want 2. Take 9 away and put 2 back: 2 − 9 = −7. So x² + 6x + 2 = (x + 3)² − 7.

Check yourself

Try each one before you look. A wrong answer tells you where to go next.

  1. The picture shows x² + 12x with a gap in the corner. What number must you add to make a perfect square?

    A square marked x² with a strip marked 6x on its right and a strip marked 6x below it. The sides are marked x and 6. The corner is a dashed gap.x²6x6xx6x6
    Tap your answer.
    1. Not this one. That is the x number. Half of 12 is 6, and the number to add is 6 × 6 = 36. Go to M4.9.4. Try another.

    2. Not this one. Half of the x number is 6, but the missing corner is a square, 6 × 6 = 36. Go to M4.9.4. Try another.

    3. Yes, that is right. Half of 12 is 6, and 6 × 6 = 36. Then x² + 12x + 36 = (x + 6)².

    4. Not this one. That is 12 × 12. The number to add is the square of half of 12, which is 36. Go to M4.9.4. Try another.

    See the answer

    36

    Half of 12 is 6, and 6 × 6 = 36. Then x² + 12x + 36 = (x + 6)².

    • If you chose A: That is the x number. Half of 12 is 6, and the number to add is 6 × 6 = 36. Go to M4.9.4.
    • If you chose B: Half of the x number is 6, but the missing corner is a square, 6 × 6 = 36. Go to M4.9.4.
    • If you chose D: That is 12 × 12. The number to add is the square of half of 12, which is 36. Go to M4.9.4.
  2. Write x² + 8x + 1 in the form (x + a)² + b.

    Tap your answer.
    1. Not this one. Expanding (x + 4)² gives an extra 16, so you must take 16 away: 1 − 16 = −15. Go to M4.9.4. Try another.

    2. Not this one. Expand (x + 8)²: it gives 16x, not 8x. The number in the bracket is half of 8, which is 4. Go to M4.9.4. Try another.

    3. Not this one. You worked out −16 − 1. The +1 keeps its sign: −16 + 1 = −15. Go to M4.9.4. Try another.

    4. Yes, that is right. Half of 8 is 4, and 4 × 4 = 16. So x² + 8x + 1 = (x + 4)² − 16 + 1 = (x + 4)² − 15.

    See the answer

    (x + 4)² − 15

    Half of 8 is 4, and 4 × 4 = 16. So x² + 8x + 1 = (x + 4)² − 16 + 1 = (x + 4)² − 15.

    • If you chose A: Expanding (x + 4)² gives an extra 16, so you must take 16 away: 1 − 16 = −15. Go to M4.9.4.
    • If you chose B: Expand (x + 8)²: it gives 16x, not 8x. The number in the bracket is half of 8, which is 4. Go to M4.9.4.
    • If you chose C: You worked out −16 − 1. The +1 keeps its sign: −16 + 1 = −15. Go to M4.9.4.
  3. Write x² − 6x + 4 in the form (x + a)² + b.

    Tap your answer.
    1. Yes, that is right. Half of −6 is −3, and (−3) × (−3) = 9. So x² − 6x + 4 = (x − 3)² − 9 + 4 = (x − 3)² − 5.

    2. Not this one. Half of −6 is −3, so the bracket is (x − 3). Check the sign of the x term. Go to M4.9.4. Try another.

    3. Not this one. Expanding (x − 3)² gives an extra 9. Take it away: 4 − 9 = −5, not +5. Go to M4.9.4. Try another.

    4. Not this one. Half of −6 is −3, not −6. Expand (x − 6)²: it gives −12x, not −6x. Go to M4.9.4. Try another.

    See the answer

    (x − 3)² − 5

    Half of −6 is −3, and (−3) × (−3) = 9. So x² − 6x + 4 = (x − 3)² − 9 + 4 = (x − 3)² − 5.

    • If you chose B: Half of −6 is −3, so the bracket is (x − 3). Check the sign of the x term. Go to M4.9.4.
    • If you chose C: Expanding (x − 3)² gives an extra 9. Take it away: 4 − 9 = −5, not +5. Go to M4.9.4.
    • If you chose D: Half of −6 is −3, not −6. Expand (x − 6)²: it gives −12x, not −6x. Go to M4.9.4.
  4. Solve (x − 2)² = 9.

    Tap your answer.
    1. Not this one. 9 has two square roots, 3 and −3. Then x − 2 = −3 gives x = −1 as well. Go to M4.9.4. Try another.

    2. Yes, that is right. Take the square root of both sides: x − 2 = 3 or x − 2 = −3. Add 2: x = 5 or x = −1.

    3. Not this one. You took x − 2 = 9, which skips the square root. First take the square root of both sides: x − 2 = 3 or x − 2 = −3. Go to M4.9.4. Try another.

    4. Not this one. Add 2 to both sides: x − 2 = 3 gives x = 3 + 2 = 5. The 2 is added, not taken away. Go to M4.9.4. Try another.

    See the answer

    x = 5 or x = −1

    Take the square root of both sides: x − 2 = 3 or x − 2 = −3. Add 2: x = 5 or x = −1.

    • If you chose A: 9 has two square roots, 3 and −3. Then x − 2 = −3 gives x = −1 as well. Go to M4.9.4.
    • If you chose C: You took x − 2 = 9, which skips the square root. First take the square root of both sides: x − 2 = 3 or x − 2 = −3. Go to M4.9.4.
    • If you chose D: Add 2 to both sides: x − 2 = 3 gives x = 3 + 2 = 5. The 2 is added, not taken away. Go to M4.9.4.
  5. Solve x² + 4x − 5 = 0 by completing the square.

    Tap your answer.
    1. Not this one. x + 2 = 3 gives x = 1, since you take 2 from both sides. And x + 2 = −3 gives x = −5. Go to M4.9.4. Try another.

    2. Not this one. You found one root. Do not forget the negative square root: x + 2 = −3 gives x = −5 as well. Go to M4.9.4. Try another.

    3. Yes, that is right. x² + 4x − 5 = (x + 2)² − 4 − 5 = (x + 2)² − 9. So (x + 2)² = 9, and x + 2 = 3 or x + 2 = −3. Then x = 1 or x = −5.

    See the answer

    x = 1 or x = −5

    x² + 4x − 5 = (x + 2)² − 4 − 5 = (x + 2)² − 9. So (x + 2)² = 9, and x + 2 = 3 or x + 2 = −3. Then x = 1 or x = −5.

    • If you chose A: x + 2 = 3 gives x = 1, since you take 2 from both sides. And x + 2 = −3 gives x = −5. Go to M4.9.4.
    • If you chose B: You found one root. Do not forget the negative square root: x + 2 = −3 gives x = −5 as well. Go to M4.9.4.
  6. What is the smallest value of (x − 4)² + 3?

    Tap your answer.
    1. Not this one. The value x = 4 is where the smallest value happens. The value there is 0 + 3, which is different. Go to M4.9.4. Try another.

    2. Yes, that is right. (x − 4)² is never below 0 and is 0 at x = 4, so the smallest value is 3.

    3. Not this one. x = 0 gives 16 + 3 = 19, but that is not the smallest. A square is never below 0. Go to M4.9.4. Try another.

    See the answer

    3

    (x − 4)² is never below 0 and is 0 at x = 4, so the smallest value is 3.

    • If you chose A: The value x = 4 is where the smallest value happens. The value there is 0 + 3, which is different. Go to M4.9.4.
    • If you chose C: x = 0 gives 16 + 3 = 19, but that is not the smallest. A square is never below 0. Go to M4.9.4.
  7. Write x² + 5x + 1 in the form (x + a)² + b. What are a and b?

    Tap your answer.
    1. Yes, that is right. Half of 5 is 2.5, and 2.5 × 2.5 = 6.25. So x² + 5x + 1 = (x + 2.5)² − 6.25 + 1, and b = −5.25.

    2. Not this one. The number a is half of the x number, so a = 2.5. Expanding (x + 5)² gives 10x, not 5x. Go to M4.9.4. Try another.

    3. Not this one. Expanding (x + 2.5)² gives an extra 6.25. Take it away: 1 − 6.25 = −5.25. Go to M4.9.4. Try another.

    See the answer

    a = 2.5, b = −5.25

    Half of 5 is 2.5, and 2.5 × 2.5 = 6.25. So x² + 5x + 1 = (x + 2.5)² − 6.25 + 1, and b = −5.25.

    • If you chose B: The number a is half of the x number, so a = 2.5. Expanding (x + 5)² gives 10x, not 5x. Go to M4.9.4.
    • If you chose C: Expanding (x + 2.5)² gives an extra 6.25. Take it away: 1 − 6.25 = −5.25. Go to M4.9.4.
  8. From an earlier chapter

    Solve x² − 10x + 21 = 0 by factorising.

    Tap your answer.
    1. Not this one. The brackets are (x − 3)(x − 7). Putting x − 3 = 0 gives x = 3, not −3. Go to M4.9.3. Try another.

    2. Not this one. These are the numbers in the equation. The solutions come from the brackets, and they are 3 and 7. Go to M4.9.2. Try another.

    3. Not this one. Both numbers in the brackets are negative, (x − 3)(x − 7), so both solutions are positive. Go to M4.9.3. Try another.

    4. Yes, that is right. Two numbers with product 21 and sum −10 are −3 and −7. So (x − 3)(x − 7) = 0, and x = 3 or x = 7.

    See the answer

    x = 3 or x = 7

    Two numbers with product 21 and sum −10 are −3 and −7. So (x − 3)(x − 7) = 0, and x = 3 or x = 7.

    • If you chose A: The brackets are (x − 3)(x − 7). Putting x − 3 = 0 gives x = 3, not −3. Go to M4.9.3.
    • If you chose B: These are the numbers in the equation. The solutions come from the brackets, and they are 3 and 7. Go to M4.9.2.
    • If you chose C: Both numbers in the brackets are negative, (x − 3)(x − 7), so both solutions are positive. Go to M4.9.3.
  9. x² + 10x + 31 = (x + a)² + b. Give a, then b.

    See the answer

    a = 5, b = 6

    Half of 10 is 5, and 5 × 5 = 25. So x² + 10x + 31 = (x + 5)² − 25 + 31 = (x + 5)² + 6.

  10. The equation (x − 3)² = 25 has two solutions. What is the larger one?

    See the answer

    x = 8

    Take the square root of both sides: x − 3 = 5 or x − 3 = −5. So x = 8 or x = −2. The larger is 8.

Keep it

Copy this into your exercise book.

Half the x number goes in the bracket. Take away its square. Then add, take the square root, and use plus and minus.

Draw: A square with two strips and a hatched corner, with x² + 6x + 9 = (x + 3)² written under it.

Reading with a child? A short page for the adult: what this chapter teaches and three questions to ask.

No internet tomorrow? Save the whole book as one file (898 KB). It opens on any phone.