Skip to content
MathClicksIGCSE← All notes Cambridge IGCSE® Mathematics 0580 Extended Chapter 14 — Further Solving of Equations and Inequalities

14.4  Completing the Square

Rewriting a quadratic as a perfect square plus a constant, so you can solve it exactly and read the turning point straight off the page.

What completing the square does

A quadratic like x² + 6x + 5 is awkward because x appears twice. Completing the square rewrites it so that x appears once only, inside a bracket that is squared:

x² + bx + c  =  (x + p)² + q    where    p = b2   and   q = c − p² Halve the coefficient of x; subtract the square of what you halved

The whole method rests on one expansion you must know cold:

(x + p)² = x² + 2px + p² so the coefficient of x is twice p — which is why you halve
Definition A perfect square is an expression that is exactly something squared, such as (x + 4)² or (x − 7)². Completing the square means building the nearest perfect square to your quadratic and then correcting the constant.

Why it is called “completing the square”

Think of x² + 6x as areas: one x by x square and two strips of width 3. Slide the strips into a corner and a 3 × 3 tile is missing. Add that tile to complete the square — then subtract it again so nothing changes.

x² 3x 3x 9 x 3 x 3 missing corner → (x + 3)² x + 3 − 9 x² + 6x = (x + 3)² − 9
Example 1Write x² + 8x + 3 in the form (x + p)² + q.
1
Halve the coefficient of x. That number goes inside the bracket. p = 8 ÷ 2 = 4  →  (x + 4)²
2
Expand mentally to see what you have created — there is an unwanted +16. (x + 4)² = x² + 8x + 16
3
Subtract the 16 to cancel it, then add the original constant 3. q = c − p² = 3 − 16 = −13
x² + 8x + 3 = (x + 4)² − 13
Exam tip Always check by expanding: (x + 4)² − 13 = x² + 8x + 16 − 13 = x² + 8x + 3. Ten seconds, one guaranteed mark.
Example 2Write x² − 6x + 11 in completed square form, and hence show it is always positive.
1
The coefficient of x is −6, so p = −3. The sign is kept inside the bracket. (x − 3)² = x² − 6x + 9
2
Subtract p² = 9 and add the 11. q = 11 − 9 = 2
3
A square is never negative, so (x − 3)² ≥ 0 for every value of x. (x − 3)² + 2 ≥ 0 + 2 = 2
x² − 6x + 11 = (x − 3)² + 2, whose smallest value is 2, so it is always positive
Note “Show that it is always positive” questions are answered only by completing the square. Say the words “a square is never negative” — that is where the reasoning mark lives.

Odd numbers and a leading coefficient

When b is odd

Nothing changes — p is simply a fraction. Keep it as a fraction, never as a rounded decimal, because the question almost always wants exact values.

x² + 7x  →  p = 72,   p² = 494

When the coefficient of x² is not 1

The halving rule only works when the x² term is a single x². So factor the leading coefficient out of the first two terms only, complete the square inside the bracket, then multiply back out.

ax² + bx + c = a(x² + bax) + c Step 1 for a ≠ 1: the constant stays outside
Example 3Write x² + 5x − 1 in the form (x + p)² + q.
1
Half of 5 is 52. Do not round it. p = 52
2
Square it. Square the top and the bottom separately. p² = 254
3
Now q = c − p². Write −1 as 44 so the fractions subtract cleanly. q = −1 − 254 = −44 − 254 = −294
x² + 5x − 1 = (x + 52)2 − 294
Watch out Writing p = 2.5 and then p² = 6.25 is not wrong, but exact-answer questions expect fractions, and decimals get ugly fast (try b = 7).
Example 4Write 2x² + 12x + 7 in the form a(x + p)² + q.
1
Factor 2 out of the x² and x terms only. Leave the 7 alone. 2(x² + 6x) + 7
2
Complete the square inside the bracket: half of 6 is 3, so subtract 3² = 9 in there. x² + 6x = (x + 3)² − 9
3
Put it back — and remember the 2 multiplies everything in the bracket, including the −9. 2[(x + 3)² − 9] + 7 = 2(x + 3)² − 18 + 7
4
Tidy the constants. 2(x + 3)² − 11
2x² + 12x + 7 = 2(x + 3)² − 11
Watch out Forgetting to multiply the −9 by 2 is the single most common error here. Check: 2(x² + 6x + 9) − 11 = 2x² + 12x + 18 − 11 = 2x² + 12x + 7 ✓

Solving a quadratic by completing the square

Once x appears only once, you can simply undo the operations one at a time. This is the method the paper demands when it says “solve by completing the square” or “give your answers in exact form”.

The four moves

  1. Complete the square: (x + p)² + q = 0
  2. Move the constant: (x + p)² = −q
  3. Square root both signs: x + p = ±−q
  4. Subtract p: x = −p ± −q
Watch out Step 3 is where marks disappear. 25 = ±5 gives two answers. Write the ± the moment you take the root, not later.
Example 5Solve x² − 4x − 7 = 0 by completing the square. Give exact answers.
1
Half of −4 is −2, so start with (x − 2)² and subtract 4. (x − 2)² − 4 − 7 = 0
2
Collect the constants. (x − 2)² − 11 = 0
3
Move −11 across. (x − 2)² = 11
4
Take the square root of both sides — with ±. Do not evaluate it; 11 is not a perfect square, so the surd stays. x − 2 = ±11
5
Add 2 to both sides. x = 2 ± 11
x = 2 + 11  or  x = 2 − 11   (5.32 or −1.32 to 2 d.p.)
Exam tip “Exact form” means leave the surd. Only convert to decimals if the question asks for decimal places or significant figures — and then never round part-way through.

Reading the turning point off the form

This is the real payoff. The graph of y = a(x − h)² + k is a parabola whose turning point (vertex) is at (h, k), and whose line of symmetry is the vertical line x = h.

y = a(x + p)² + q   →   turning point at (−p, q),   line of symmetry x = −p Notice the sign flip: (x + 3)² gives x = −3

If a > 0

The parabola opens upwards (a valley). The turning point is a minimum, and q is the smallest value the expression can take.

If a < 0

The parabola opens downwards (a hill). The turning point is a maximum, and q is the largest value the expression can take.

Key idea — always positive Because (x + p)² ≥ 0 for every real x, the expression (x + p)² + q is never smaller than q. So if q > 0 the quadratic is always positive and its graph never touches the x-axis.

Completing-the-square machine

Change a, b and c and watch the halving, the square that is added and subtracted, and the vertex move. Try a = 1, b = 5 to see the fraction case.

a  (coefficient of x²)1
b  (coefficient of x)6
c  (constant)5

More worked examples

Example 6Write 5 + 4x − x² in the form q − (x + p)² and hence write down its greatest value.
1
Reorder and factor −1 out of the x terms. Watch every sign. −x² + 4x + 5 = −(x² − 4x) + 5
2
Complete the square inside: half of −4 is −2. x² − 4x = (x − 2)² − 4
3
Substitute back. The −1 outside changes both signs in the bracket. −[(x − 2)² − 4] + 5 = −(x − 2)² + 4 + 5
4
Tidy up. 9 − (x − 2)²
5
You are subtracting something that is never negative, so the expression is largest when that square is zero, i.e. when x = 2. greatest value = 9 − 0 = 9
5 + 4x − x² = 9 − (x − 2)²; maximum value 9 at the turning point (2, 9)
Check 9 − (x² − 4x + 4) = 9 − x² + 4x − 4 = 5 + 4x − x² ✓
Example 7(a) Write 3x² − 12x + 5 in the form a(x + p)² + q. (b) Write down the coordinates of the turning point of y = 3x² − 12x + 5. (c) Solve 3x² − 12x + 5 = 0, giving exact answers.
1
(a) Factor 3 out of the first two terms only. 3(x² − 4x) + 5
2
Inside the bracket, half of −4 is −2, so subtract 4. 3[(x − 2)² − 4] + 5 = 3(x − 2)² − 12 + 5
3
Collect constants. (Check: 3x² − 12x + 12 − 7 = 3x² − 12x + 5 ✓) 3(x − 2)² − 7
4
(b) The bracket is (x − 2), so h = 2; the constant outside is −7. Since a = 3 > 0 it is a minimum. turning point (2, −7) — a minimum; line of symmetry x = 2
5
(c) Set it to zero and isolate the square. Divide by 3 before rooting. 3(x − 2)² = 7  →  (x − 2)² = 73
6
Root both sides, then rationalise the denominator: 7/3 = 73 = 213. x − 2 = ±213
(a) 3(x − 2)² − 7    (b) (2, −7)    (c) x = 2 ± 213  (3.53 or 0.47 to 2 d.p.)
Exam tip A three-part question like this is worth 5–6 marks and each part feeds the next. Get part (a) right and check it by expanding — otherwise you lose the lot.

Your turn

Practice set

  1. Write x² + 10x + 3 in the form (x + p)² + q.
  2. Write x² − 3x + 5 in the form (x + p)² + q, using fractions.
  3. Write 2x² − 8x + 3 in the form a(x + p)² + q.
  4. Solve x² + 6x − 2 = 0 by completing the square, giving exact answers.
  5. Write down the turning point and the line of symmetry of y = (x − 4)² + 7, and say whether it is a maximum or a minimum.
  6. Show that x² − 8x + 20 is always positive.

  1. p = 5, q = 3 − 25 → (x + 5)² − 22
  2. p = −32, p² = 94, q = 5 − 94 = 114 → (x − 32)² + 114
  3. 2(x² − 4x) + 3 = 2[(x − 2)² − 4] + 3 = 2(x − 2)² − 8 + 3 → 2(x − 2)² − 5
  4. (x + 3)² − 9 − 2 = 0 → (x + 3)² = 11 → x = −3 ± 11 (0.32 or −6.32 to 2 d.p.)
  5. The bracket is (x − 4) so h = 4: (4, 7), line of symmetry x = 4, a minimum because a = 1 > 0.
  6. p = −4, q = 20 − 16 = 4 → (x − 4)² + 4. A square is never negative, so the expression is at least 4, which is greater than 0 — always positive.

Key points to remember

  • Halve, square, subtract: x² + bx + c = (x + p)² + q with p = b2 and q = c − p².
  • The sign of b is carried into the bracket: x² − 6x gives (x − 3)².
  • If b is odd, p is a fraction — keep it exact, never round.
  • If the coefficient of x² is not 1, factor it out of the first two terms only, then multiply the whole bracket — including the number you subtracted — back out.
  • To solve: isolate the square, take the root of both sides with ±, then rearrange. Leave surds unless decimals are asked for.
  • y = a(x − h)² + k has turning point (h, k) and line of symmetry x = h; a minimum when a > 0, a maximum when a < 0.
  • A square is never negative. That single sentence proves “always positive” and gives the greatest or least value.
  • Always expand your completed square to check — it must return the original quadratic exactly.

Where next?

✅ Mark scheme All notes

Progress is saved on this device only and appears on the notes home page.