Emzini weCodeUmhlahlandlelaMathematics 9.5 · Quadratics NoticesAll books

Chapter 9/9.5Accelerateabout 8 min

Completing the square

Try this first

Solve (x + 3)2 = 25. Now solve x2 + 6x + 9 = 25. Why are the answers the same? Can you use this to solve x2 + 6x = 16?

From (x + 3)2 = 25, the number x + 3 is 5 or −5, so x = 2 or x = −8. The second equation is the same, because x2 + 6x + 9 is (x + 3)2. And x2 + 6x = 16 becomes the same equation if you add 9 to both sides.

Al-Khwarizmi's square. In Chapter 7 you met al-Khwarizmi's problem: "a square and ten of its roots make thirty nine". Here "root" meant the side of the square, so the problem is x2 + 10x = 39. He solved it with a picture, and the picture still works.

Al‑Khwarizmi completes the square: x2 + 10x = 39Split 10x into two strips of 5x. Fill in the missing corner to make one big square.1A SQUARE AND TWO STRIPS2ADD THE MISSING CORNER3A SQUARE OF SIDE x + 5x25x5xx25x5x25x25x5x25x5x5x2 + 10x = 39A square and two stripsmake 39.x5x5x2 + 10x + 25 = 64The missing corner is5 by 5 = 25.x5x5x + 5x + 5(x + 5)2 = 64x + 5 = 8, x = 3The big square is39 + 25 = 64.
Figure 9.3 Al-Khwarizmi's picture. Adding the missing corner turns the shape into a square of side x + 5.

Draw the square x2. Split the 10x into two strips, each 5 by x, and attach them to two sides of the square. The shape has area 39, but it is a square with a corner missing. The missing corner is 5 by 5, so add 25 to complete the square. The big square has area 39 + 25 = 64, so its side is 8. Since the side is x + 5, x = 3.

Al-Khwarizmi gave the answer 3. The algebra finds a second root, because (x + 5)2 = 64 also allows x + 5 = −8, giving x = −13. He did not consider it, because in his time a negative number was not accepted as an answer. Check: (−13)2 + 10 × (−13) = 169 − 130 = 39.

Key fact

Completing the square. x2 + bx = (x + b/2)2 − (b/2)2. In words: halve the coefficient of x, put it in the bracket, and take away its square.

Proof

Expand the right side with the rule of Section 9.2: (x + b/2)2 = x2 + 2 × b/2 × x + (b/2)2 = x2 + bx + (b/2)2. Taking away (b/2)2 leaves x2 + bx.

We write ± ("plus or minus") to show both square roots at once: if y2 = 5, then y = ±√5.

Worked example 9.5
Solve by completing the square
  1. (a)x2 + 6x − 7 = 0
  2. (b)x2 − 4x − 1 = 0, giving answers to 2 decimal places.
(a)
x2 + 6x = (x + 3)2 − 9, so the equation is (x + 3)2 − 9 − 7 = 0
that is (x + 3)2 = 16
So x + 3 = ±4, and x = 1 or x = −7.
(b)
x2 − 4x = (x − 2)2 − 4
so (x − 2)2 − 5 = 0
that is (x − 2)2 = 5
So x − 2 = ±√5 and x = 2 ± √5.
To 2 decimal places, x = 4.24 or x = −0.24.
Part (b) cannot be done by factorising with whole numbers: its roots are irrational (Chapter 6).
Completing the square works for every quadratic equation.

Now try one yourself

Babylon, four thousand years ago. Quadratic problems are far older than al-Khwarizmi. A Babylonian clay tablet, written about 1800 BC and now in the British Museum, asks: "I added the area and the side of my square, and it is 0;45." In base 60 (Chapter 2), 0;45 means 45/60 = 3/4, so the problem is x2 + x = 3/4. The scribe's instructions are: take half of 1, which is 1/2; square it to get 1/4; add 3/4 to get 1; its square root is 1; take away the 1/2, and the side is 1/2. Step by step, this is completing the square.

Going further

The quadratic formula. Completing the square on the general equation ax2 + bx + c = 0 gives a formula for every root at once. Divide by a: x2 + b/ax = −c/a. Add (b/2a)2 to both sides: (x + b/2a)2 = b2 − 4ac/4a2. Take square roots and subtract b/2a:

x = −b ± √(b2 − 4ac)/2a

If b2 − 4ac is negative there are no roots, because no square is negative. In Chapter 5 the golden ratio g came from a rectangle whose sides satisfy g/1 = 1/g − 1, which gives g2 − g − 1 = 0. The formula gives g = 1 + √5/2 = 1.6180..., the exact value promised there.

Check your understanding 9.5

  1. Write in the form (x + p)2 + q:
    1. (a)x2 + 8x
    2. (b)x2 − 2x + 7
    3. (c)x2 + 5x
    Show answerHide answer
    1. (a)(x + 4)2 − 16
    2. (b)(x − 1)2 + 6
    3. (c)(x + 5/2)2 − 25/4
  2. Solve by completing the square
    1. (a)x2 + 4x = 21
    2. (b)x2 − 10x + 18 = 0, leaving square roots in your answer where they are not whole numbers.
    Show answerHide answer
    1. (a)(x + 2)2 = 25: 3, −7
    2. (b)(x − 5)2 = 7: 5 ± √7
  3. Use al-Khwarizmi's picture to solve x2 + 8x = 48. Draw it.
    Show answerHide answer
    Two strips 4 by x; the missing corner is 16. (x + 4)2 = 64, so x = 4 (and also −12).
  4. Solve the Babylonian problem x2 + x = 3/4 by factorising 4x2 + 4x − 3. Do you get the scribe's answer?
    Show answerHide answer
    4x2 + 4x − 3 = (2x − 1)(2x + 3) = 0, so x = 1/2 or −3/2. The positive root is the scribe's 1/2.