IB Maths AA HL Topic 2 — Functions Paper 1 & 2 ~7 min read

Completing the Square

Completing the square turns ax2 + bx + c into a(xh)2 + k — vertex form. The reason this matters: vertex form hands you the vertex (h, k) for free, which means you instantly get the maximum or minimum of the function. That single fact is what makes this technique a workhorse — for sketching, optimisation, range questions, and even solving equations when factorising fails. It always works, no matter how ugly the numbers.

📘 What you need to know

Why bother completing the square?

Find max/min
a(xh)2 + k
vertex (h, k) is right there — no calculus needed
Solve when factorising fails
isolate, ±√, done
always works, even with irrational roots

Monic case — x2 + bx + c

The basic move is “halve b, square the half, fix the constant“:

Monic completion x2 + bx + c  =  (x + b2)2 − (b2)2 + c

🤔 Why does this work?

Expanding (x + b/2)2 gives x2 + bx + (b/2)2 — the right x2 and middle term, but with an extra (b/2)2. Subtracting that bit cancels it out. The actual constant c then comes back in. Neat.

Non-monic case — ax2 + bx + c

When a ≠ 1, factor a out of the x terms only — leave c alone. Then complete the square inside.

🧭 Recipe — non-monic completion

  1. Factor a out of just the x2 and x terms: a(x2 + (b/a)x) + c.
  2. Complete the square inside the bracket using the monic move (halve, square, subtract).
  3. Multiply through by a to clear the bracket — careful to multiply the subtracted piece too.
  4. Combine the constants at the end.
Don’t factor a out of the constant c — leave it where it is. That avoids the messiest fractions and keeps the algebra clean.

Reading the vertex straight off

Once you’ve got the completed square form a(xh)2 + k, three things are immediate:

Vertex
(h, k)
x-coord from inside the bracket (sign flips), y-coord is the constant outside
Min / max value
value = k, at x = h
min if a > 0, max if a < 0
Sign warning:  the h-value is the number inside the bracket with its sign flipped. (x − 4)2 + 3 has vertex (4, 3). (x + 7)2 − 5 has vertex (−7, −5).

Worked examples

WE 1

Complete the square — monic with positive middle term

Express x2 + 6x + 11 in the form (x + h)2 + k.

Halve b: half of 6 is 3 write (x + 3)² and subtract 3² to fix the constant x² + 6x + 11 = (x + 3)² − 9 + 11 (x + 3)² + 2 check: (x + 3)² + 2 = x² + 6x + 9 + 2 = x² + 6x + 11 ✓
WE 2

Complete the square — monic with negative middle term

Express x2 − 10x + 7 in completed-square form, and hence find the minimum value of the function.

Halve b: half of −10 is −5 x² − 10x + 7 = (x − 5)² − 25 + 7 = (x − 5)² − 18 Read off vertex from a(x − h)² + k form h = 5, k = −18 → vertex (5, −18) (x − 5)² − 18; minimum value = −18, at x = 5 since a = 1 > 0 the parabola opens up, so the vertex is a minimum
WE 3

Complete the square — non-monic, a = 2

Express 2x2 + 12x + 5 in the form a(xh)2 + k.

Step 1: Factor 2 out of the x terms only 2(x² + 6x) + 5 Step 2: Complete the square inside half of 6 is 3 → (x + 3)² − 9 2[(x + 3)² − 9] + 5 Step 3: Multiply through by 2 and tidy 2(x + 3)² − 18 + 5 2(x + 3)² − 13 vertex (−3, −13), minimum value = −13, achieved at x = −3
WE 4

Non-monic with negative leading coefficient

Express −x2 + 8x − 3 in completed-square form, and state the maximum value of the function.

Step 1: Factor −1 out of the x terms only −(x² − 8x) − 3 Step 2: Complete the square inside half of −8 is −4 → (x − 4)² − 16 −[(x − 4)² − 16] − 3 Step 3: Multiply through by −1 and tidy −(x − 4)² + 16 − 3 −(x − 4)² + 13; maximum value = 13, at x = 4 since a = −1 < 0 the parabola opens down, so the vertex is a maximum
WE 5

Solve a quadratic equation by completing the square

Solve 5x2 − 20x + 3 = 0 by completing the square. Give exact answers.

Step 1: Factor 5 out of the x terms 5(x² − 4x) + 3 = 0 Step 2: Complete the square inside half of −4 is −2 → (x − 2)² − 4 5[(x − 2)² − 4] + 3 = 0 5(x − 2)² − 20 + 3 = 0 5(x − 2)² = 17 Step 3: Isolate and ±√ (x − 2)² = 17/5 x − 2 = ±√(17/5) x = 2 ± √(17/5) don’t forget the ± when taking the square root — both values are solutions
WE 6

Optimisation — finding maximum area

A rectangular pen is built against a long straight wall, using 60 m of fencing for the other three sides. Let x be the length of each side perpendicular to the wall. Find the value of x that gives the maximum area, and state that maximum.

Step 1: Express the area as a function of x two perpendicular sides = 2x; remaining side parallel to wall = 60 − 2x A(x) = x(60 − 2x) = 60x − 2x² Step 2: Complete the square A(x) = −2x² + 60x = −2(x² − 30x) half of −30 is −15 → (x − 15)² − 225 A(x) = −2[(x − 15)² − 225] A(x) = −2(x − 15)² + 450 Step 3: Read off the maximum (since a = −2 < 0) vertex (15, 450) → max value 450 when x = 15 x = 15 m gives maximum area = 450 m² at x = 15, the parallel side = 60 − 30 = 30 m → pen is 15 by 30, twice as wide as it is deep

💡 Top tips

⚠ Common mistakes

Completing the square gives you two superpowers: instant access to the vertex (so you can find max/min and sketch immediately), and a reliable way to solve any quadratic equation. The next note brings together everything from the last few — factorising, completing the square, and the quadratic formula — so you can confidently solve quadratic equations in any form they come in.

Need help with Completing the Square?

Get 1-on-1 help from an IB examiner who knows exactly what Paper 1 & 2 are looking for.

Book Free Session →