Worked Example · Quadratic Functions · Paper 2 · 6 marks

Maximum Area with Completing the Square

Rig, founder of IGCSE Add Math Malaysia

Written by Rig, our founder

8 years teaching IGCSE & SPM maths · Updated 16 August 2026

You don’t always need calculus to optimise, completing the square finds the maximum or minimum of a quadratic directly. This is the intended method when the quantity to optimise is a quadratic and calculus hasn’t been assumed.

A rectangular pen is built against a straight wall, so only three sides need fencing. There are 4040 m of fencing available. Show that the area AA enclosed is A=40x2x2A = 40x - 2x^2, where xx is the width, and find the maximum possible area. [6]

The working

Step 1, form the area function. Two widths (xx each) and one length use the fencing: 2x+length=402x + \text{length} = 40, so length =402x= 40 - 2x. Then: A=x(402x)=40x2x2(M1, A1, answer shown)A = x(40 - 2x) = 40x - 2x^2 \quad \text{(M1, A1, answer shown)}

Step 2, complete the square to find the maximum. Factor out 2-2: A=2(x220x)=2[(x10)2100]=2(x10)2+200(M1, M1)A = -2(x^2 - 20x) = -2\big[(x - 10)^2 - 100\big] = -2(x - 10)^2 + 200 \quad \text{(M1, M1)}

Step 3, read the maximum. Since 2(x10)20-2(x - 10)^2 \le 0, the area is largest when the bracket is zero, at x=10x = 10: maximum area=200 m2(A1, A1)\text{maximum area} = 200 \text{ m}^2 \quad \text{(A1, A1)}

Where the marks are won and lost

  • Building the area function from the fencing constraint is the first work: length =402x= 40 - 2x (one length, two widths), not 40x40 - x.
  • The coefficient of x2x^2 is negative, so the vertex is a maximum, exactly what’s wanted.
  • Completing the square with a factored 2-2 needs care: 2[(x10)2100]=2(x10)2+200-2[(x-10)^2 - 100] = -2(x-10)^2 + 200. Forgetting to multiply the 100-100 by 2-2 is the usual slip.

Common mistakes

  • Using 40x40 - x for the length (forgetting only three sides are fenced, so it’s 402x40 - 2x).
  • Reading the vertex as a minimum.
  • Arithmetic in completing the square (the +200+200).

Full method: Maximum/Minimum & the Vertex notes. Topic home: Quadratic Functions pillar.

Common questions

Can I find a maximum without calculus?
Yes, completing the square finds the maximum or minimum of any quadratic directly. Write the area as a quadratic in one variable, complete the square, and read off the turning point. For a negative coefficient of x² the vertex is a maximum. This is often expected on questions set before calculus, or where the mark scheme wants the completed-square method specifically.

Keep going

See the teaching work on your own child. Then decide.

Every student starts with a 1-hour trial class taught by the vetted tutor your child would actually have. Real teaching, a diagnostic on real exam questions, and a straight answer on the gap to target. One hour at your tutor's rate (RM80–90/hr), no package and no deposit, and you decide afterwards whether to book a weekly slot. Online anywhere in Malaysia.