Completing the square

Completing the square rewrites a quadratic such as x² + 6x + 2 as (x + 3)² − 7. This form shows the turning point of the graph straight away and lets you solve any quadratic — it is where the quadratic formula comes from.

Key facts

  • x² + bx + c = (x + b/2)² − (b/2)² + c.
  • Halve the coefficient of x to get the number in the bracket, then subtract its square.
  • (x + p)² + q has minimum value q when x = −p, so its turning point is (−p, q).
  • If x² has a coefficient, take it out of the first two terms first: 2x² + 12x + 5 = 2(x + 3)² − 13.
  • To solve, write it as (x + p)² = k, then square root both sides (remember ±).

Worked examples

Example 1

Write x² + 8x + 5 in the form (x + p)² + q.

  1. Half of 8 is 4. Fill in the missing corner of the square. (x + 4)² = x² + 8x + 16
  2. We need + 5, not + 16. Take the 16 away and add 5. (x + 4)² − 16 + 5 = (x + 4)² − 11

Answer: (x + 4)² − 11

Example 2

Find the turning point of y = x² − 6x + 13.

  1. Half of −6 is −3. y = (x − 3)² − 9 + 13 = (x − 3)² + 4
  2. The bracket is 0 when x = 3, giving the least value 4. Turning point (3, 4)

Answer: (3, 4), a minimum

Example 3

Solve x² + 10x + 18 = 0 by completing the square. Give exact answers.

  1. Complete the square. (x + 5)² − 25 + 18 = 0
  2. Rearrange. (x + 5)² = 7
  3. Square root both sides (±), then take away 5. x = −5 ± √7

Answer: x = −5 ± √7

Example 4

Write 2x² − 8x + 3 in the form a(x + p)² + q.

  1. Take 2 out of the first two terms. 2(x² − 4x) + 3
  2. Complete the square inside. 2[(x − 2)² − 4] + 3
  3. Expand the outer bracket. 2(x − 2)² − 8 + 3 = 2(x − 2)² − 5

Answer: 2(x − 2)² − 5

Example 5

Write x^2 + 6x + 2 in the form (x + p)^2 + q.

  1. Halve the 6. (x + 3)^2 = x^2 + 6x + 9
  2. Take off the extra 9 and add the 2. (x + 3)^2 − 9 + 2 = (x + 3)^2 − 7

Answer: (x + 3)^2 − 7