3 Completing the square

The technique known as completing the square can be used to solve quadratic equations although it is applicable in many other circumstances too so it is well worth studying.

Example 14
  1. Show that ( x + 3 ) 2 = x 2 + 6 x + 9
  2. Hence show that x 2 + 6 x can be written as ( x + 3 ) 2 9 .
Solution
  1. Removing the brackets we find

    ( x + 3 ) 2 = ( x + 3 ) ( x + 3 ) = x 2 + 3 x + 3 x + 9 = x 2 + 6 x + 9

  2. By subtracting 9 from both sides of the previous equation it follows that

    ( x + 3 ) 2 9 = x 2 + 6 x

Example 15
  1. Show that ( x 4 ) 2 = x 2 8 x + 16
  2. Hence show that x 2 8 x can be written as ( x 4 ) 2 16 .
Solution
  1. Removing the brackets we find

    ( x 4 ) 2 = ( x 4 ) ( x 4 ) = x 2 4 x 4 x + 16 = x 2 8 x + 16

  2. Subtracting 16 from both sides we can write

    ( x 4 ) 2 16 = x 2 8 x

We shall now generalise the results of Examples 14 and 15. Noting that

( x + k ) 2 = x 2 + 2 k x + k 2 we can write x 2 + 2 k x = ( x + k ) 2 k 2

Note that the constant term in the brackets on the right-hand side is always half the coefficient of x on the left. This process is called completing the square .

Key Point 4

Completing the Square

The expression x 2 + 2 k x is equivalent to ( x + k ) 2 k 2

Example 16

Complete the square for the expression x 2 + 16 x .

Solution

Comparing x 2 + 16 x with the general form x 2 + 2 k x we see that k = 8 . Hence

x 2 + 16 x = ( x + 8 ) 2 8 2 = ( x + 8 ) 2 64

Note that the constant term in the brackets on the right, that is 8, is half the coefficient of x on the left, which is 16.

Example 17

Complete the square for the expression 5 x 2 + 4 x .

Solution

Consider 5 x 2 + 4 x . First of all the coefficient 5 is removed outside a bracket as follows

5 x 2 + 4 x = 5 ( x 2 + 4 5 x )

We can now complete the square for the quadratic expression in the brackets:

x 2 + 4 5 x = ( x + 2 5 ) 2 2 5 2 = ( x + 2 5 ) 2 4 25

Finally, multiplying both sides by 5 we find

5 x 2 + 4 x = 5 ( x + 2 5 ) 2 4 25

Completing the square can be used to solve quadratic equations as shown in the following Examples.

Example 18

Solve the equation x 2 + 6 x + 2 = 0 by completing the square.

Solution

First of all just consider x 2 + 6 x , and note that we can write this as

x 2 + 6 x = ( x + 3 ) 2 9

Then the quadratic equation can be written as

x 2 + 6 x + 2 = ( x + 3 ) 2 9 + 2 = 0 that is ( x + 3 ) 2 = 7

Taking the square root of both sides gives

x + 3 = ± 7 so x = 3 ± 7

The two solutions are x = 3 + 7 = 0.3542 and x = 3 7 = 5.6458 , to 4 d.p.

Example 19

Solve the equation x 2 8 x + 5 = 0

Solution

First consider x 2 8 x which we can write as x 2 8 x = ( x 4 ) 2 16 so that the equation becomes

x 2 8 x + 5 = ( x 4 ) 2 16 + 5 = 0

i.e. ( x 4 ) 2 = 11 x 4 = ± 11 x = 4 ± 11

So x = 7.3166 or x = 0.6834 (to 4 d.p.)

Task!

Solve the equation x 2 4 x + 1 = 0 by completing the square.

First examine the two left-most terms in the equation: x 2 4 x . Complete the square for these terms:

( x 2 ) 2 4

Use the above result to rewrite the equation x 2 4 x + 1 = 0 in the form ( x ? ) 2 + ? = 0 :

( x 2 ) 2 4 + 1 = ( x 2 ) 2 3 = 0

From this now obtain the roots:

( x 2 ) 2 = 3 , so x 2 = ± 3 . Therefore x = 2 ± 3 so x = 3.7321 or 0.2679 to 4 d.p.

Exercises
  1. Solve the following quadratic equations by completing the square.
    1. x 2 3 x = 0
    2. x 2 + 9 x = 0 .
    3. 2 x 2 5 x + 2 = 0
    4. 6 x 2 x 1 = 0
    5. 5 x 2 + 6 x 1 = 0
    6. x 2 + 4 x 3 = 0
  2. A chemical manufacturer found that the sales figures for a certain chemical X 2 O depended on its selling price. At present, the company can sell all of its weekly production of 300 t at a price of £ 600 / t. The company’s market research department advised that the amount sold would decrease by only 1 t per week for every £ 2 / t increase in the price of X 2 O . If the total production costs are made up of a fixed cost of £ 30000 per week, plus £ 400 per t of product, show that the weekly profit is given by

    P = x 2 2 + 800 x 270000

    where x is the new price per t of X 2 O . Complete the square for the above expression and hence find

    1. the price which maximises the weekly profit on sales of X 2 O
    2. the maximum weekly profit
    3. the weekly production rate
    1. 0 , 3
    2. 0 , 9
    3. 2 , 1 2
    4.   1 2 , 1 3
    5. 1 5 , 1
    6. 1 , 3
    1. £ 800 / t,
    2. £ 50000 /wk,
    3. 200 t / wk