Skip to content
Cambridge IGCSE® Mathematics 0580 Extended Algebra Lesson

Completing the Square

Rewrite a quadratic as a perfect square plus a constant — then solve it exactly and read the turning point straight off the page.

Learning objectives What you will be able to do

  • Write x² + bx + c in the form (x + p)² + q by halving, squaring and subtracting.
  • Handle an odd coefficient of x with exact fractions, and a leading coefficient by factoring it out of the first two terms.
  • Solve a quadratic exactly by completing the square, remembering the ± when square-rooting.
  • Read the turning point and line of symmetry from y = a(x − h)² + k, and prove an expression is always positive.

Key words

perfect squarecompleted square formcoefficientsurdturning pointline of symmetryminimummaximum

Starter 5 minutes — before we begin

Answer from memory, then open each one to check.

Starter 1Expand (x + 4)².
x² + 8x + 16 — the middle term is twice the 4.
Starter 2Solve x² = 25. How many answers are there?
Two: x = 5 or x = −5. Square-rooting always gives ±.
Starter 3What is (52)²?
254 — square the top and the bottom separately.

Learn Teach · example · together

1 ·  Halve, square, subtract

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

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² — the coefficient of x is twice p, which is why you halve.

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: (x + 4)² = x² + 8x + 16 — there is an unwanted +16.
3
Subtract the 16 to cancel it, then add the original constant 3. q = 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 x. (x − 3)² + 2 ≥ 2 > 0
x² − 6x + 11 = (x − 3)² + 2, whose smallest value is 2, so it is always positive
Note “Show 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.

2 ·  Odd numbers and a leading coefficient

When b is odd

Nothing changes — p is simply a fraction. Keep it exact, never a rounded decimal: x² + 7x gives p = 72, p² = 494.

When the coefficient of x² is not 1

The halving rule only works on a plain x². So factor the leading coefficient out of the first two terms only, complete the square inside, then multiply back out.

ax² + bx + c = a(x² + bax) + c First move when a ≠ 1: the constant stays outside
Example 3Write 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, subtract 3² = 9 in there. x² + 6x = (x + 3)² − 9
3
Put it back — the 2 multiplies everything in the bracket, including the −9. 2[(x + 3)² − 9] + 7 = 2(x + 3)² − 18 + 7
4
Tidy the constants and check by expanding. 2(x + 3)² − 11 = 2x² + 12x + 18 − 11 = 2x² + 12x + 7  ✓
2x² + 12x + 7 = 2(x + 3)² − 11

3 ·  Solving by completing the square

Once x appears only once, 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)
Example 4Solve 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, then collect constants. (x − 2)² − 4 − 7 = 0
(x − 2)² − 11 = 0
2
Move the −11 across. (x − 2)² = 11
3
Square root both sides — with ±. 11 is not a perfect square, so the surd stays. x − 2 = ±√11
4
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 never round part-way through.

4 ·  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), with line of symmetry 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.

Example 5Write 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 — and tidy. −[(x − 2)² − 4] + 5 = 9 − (x − 2)²
4
You are subtracting something never negative, so the expression is largest when the square is zero, at x = 2. greatest value = 9 − 0 = 9
5 + 4x − x² = 9 − (x − 2)²; maximum value 9 at the turning point (2, 9)

Practice Now you try

Do every question on paper first, then open the solution and mark your own working.

Practice 1Write x² + 10x + 3 in the form (x + p)² + q.
1
Halve 10, then subtract its square. p = 5,  q = 3 − 25 = −22
(x + 5)² − 22
Practice 2Write x² − 3x + 5 in the form (x + p)² + q, using fractions.
1
Half of −3 is −32, and its square is 94. q = 5 − 94 = 204 − 94 = 114
(x − 32)² + 114
Practice 3Write 2x² − 8x + 3 in the form a(x + p)² + q.
1
Factor 2 out of the first two terms. 2(x² − 4x) + 3
2
Complete the square inside, then multiply back out. 2[(x − 2)² − 4] + 3 = 2(x − 2)² − 8 + 3
2(x − 2)² − 5
Practice 4Solve x² + 6x − 2 = 0 by completing the square, giving exact answers.
1
Complete the square and collect constants. (x + 3)² − 9 − 2 = 0  →  (x + 3)² = 11
2
Root with ±, then subtract 3. x + 3 = ±√11  →  x = −3 ± √11
x = −3 + √11  or  x = −3 − √11   (0.32 or −6.32 to 2 d.p.)
Practice 5Write down the turning point and the line of symmetry of y = (x − 4)² + 7, and say whether it is a maximum or a minimum.
1
The bracket is (x − 4), so h = 4; the constant outside is 7. Since a = 1 > 0 the parabola opens upwards.
Turning point (4, 7); line of symmetry x = 4; a minimum.

Common mistakes Lose no easy marks

Forgetting to multiply the subtracted square by a In 2[(x + 3)² − 9] + 7 the 2 multiplies the −9 as well: −18 + 7 = −11, not −9 + 7. This is the single most common error in the topic.
Dropping the ± when square-rooting (x − 2)² = 11 gives x − 2 = ±√11 — two answers. Write the ± the moment you take the root, not later.
Sign slips at the turning point (x + 3)² + 2 has its vertex at (−3, 2), not (3, 2). The x-coordinate is the value that makes the bracket zero.
Exam tip Expand your completed square before moving on — it must return the original quadratic exactly. In a multi-part question every later part relies on it, so this one check protects all the marks.

Exit check Prove it before you leave

Exit 1Complete the square: x² + 12x.
(x + 6)² − 36
Exit 2What is the turning point of y = (x + 1)² − 5?
(−1, −5) — a minimum, since the squared term is positive.
Exit 3Show that x² − 8x + 20 is always positive.
x² − 8x + 20 = (x − 4)² + 4 ≥ 4 > 0, because a square is never negative.

Keep going