A fixed three-sided fence reveals quadratic maxima, completing the square, constraints and the difference between an algebraic optimum and a feasible design.
Guide chapters
- The quick answer: one constraint connects two dimensions
- Why the garden area becomes quadratic
- Set the domain before optimising
- Read the design options from a table
- Complete the square to find the maximum
- Find the other dimension
- Why the optimum is not a square
- Why the completed-square form is so useful
- Two very different gardens can have the same area
- Solve a target-area question
- An impossible target gives useful information too
- What the graph adds to the answer
- Confirm the maximum using differentiation
- The meaning of the derivative in this context
- Add a new condition: the long fenced side must be at least 20 metres
- Find the constrained maximum
- Why a constraint is not merely a side note
- What happens if the fencing length changes?
- Why doubling the fence length quadruples the maximum area
- A small integer-design example
- Why a table alone is not a proof
- Four different student errors
- Four more errors that look similar
- A five-minute independent check
- What parents can ask in ordinary language
- What a targeted small-group lesson should repair
- Where this sits in Singapore G3 Additional Mathematics
- Frequently asked questions
- More Additional Mathematics explanations
- Official source and the model’s limits
What is Additional Mathematics when there are many possible designs but only one produces the largest area? A garden fence gives a clear answer.
Imagine a rectangular garden built alongside an existing straight wall. The wall forms one boundary, so fencing is needed for only three sides. You have a fixed total length of fencing material. If the garden becomes wider, its depth must become smaller, and vice versa.
This is a quadratic optimisation problem: a mathematical expression for area rises to a maximum, then falls. Completing the square makes the maximum visible without guessing dimensions or trying every possible layout.
The numbers are fictional teaching examples. They are not a construction quote, a land measurement or permission to attach a fence to an existing wall.
The quick answer: one constraint connects two dimensions
Suppose there are exactly 36 metres of usable fencing material for three sides of a rectangular garden.
Let x metres be the depth of the garden, perpendicular to the wall. Two fenced sides have this same depth.
Let y metres be the length of the third fenced side, opposite the wall.
The fencing condition is:
2x + y = 36.
Rearrange:
y = 36 − 2x.
This is the first important mathematical step. It expresses one dimension in terms of the other.
The student cannot independently choose any x and any y. Once x is selected, the fixed fencing length determines y.
That is what makes the dimensions linked.
Why the garden area becomes quadratic
The area of a rectangle is:
A = length × width.
Here:
A = xy.
Substitute y = 36 − 2x:
A(x) = x(36 − 2x).
Expand:
A(x) = 36x − 2x².
The x² term appears because changing the depth also changes the available opposite-side length.
The result is a quadratic function. Its coefficient of x² is negative, so the parabola opens downwards.
That means the area function can have a maximum value.
It does not automatically tell us the location of that maximum, and it does not remove the need to check whether the dimensions are physically valid.
Set the domain before optimising
A usable rectangular garden must have positive depth and positive length.
Therefore:
x > 0.
And:
36 − 2x > 0.
Rearrange:
2x < 36,
so:
x < 18.
Hence the valid domain is:
0 < x < 18.
At x = 0, the garden has no depth and its area collapses to zero.
At x = 18, the third fenced side has zero length and the garden again has zero area.
Neither endpoint describes a positive-area rectangle.
This domain will matter when we interpret a calculated maximum or later impose an extra design restriction.
Read the design options from a table
Calculate several possibilities.
| Depth x | Opposite fenced side y | Area A |
|---|---|---|
| 3 m | 30 m | 90 m² |
| 6 m | 24 m | 144 m² |
| 8 m | 20 m | 160 m² |
| 9 m | 18 m | 162 m² |
| 10 m | 16 m | 160 m² |
| 12 m | 12 m | 144 m² |
| 15 m | 6 m | 90 m² |
The pattern is striking. Increasing the depth from three to six metres raises the area, but increasing it from nine to twelve metres reduces the area.
A taller value of x is not necessarily better.
The area grows, reaches a maximum and then declines because more fencing allocated to the two depth sides leaves less material for the opposite side.
The table suggests that x = 9 gives the largest area among the listed designs. Now we need a mathematical proof that no other admissible depth gives a larger value.
Complete the square to find the maximum
Start with:
A(x) = 36x − 2x².
Factor out −2:
A(x) = −2(x² − 18x).
Complete the square inside the brackets:
x² − 18x = (x − 9)² − 81.
Substitute:
A(x) = −2[(x − 9)² − 81].
Expand the outer factor:
A(x) = −2(x − 9)² + 162.
This is the completed-square form.
Because (x − 9)² is never negative, the term −2(x − 9)² is zero or negative.
Therefore:
A(x) ≤ 162.
Equality occurs only when:
x − 9 = 0,
so:
x = 9.
The maximum possible area in the mathematical model is 162 square metres, achieved at depth x = 9 metres.
Find the other dimension
Use the fencing constraint:
y = 36 − 2x.
At x = 9:
y = 36 − 18 = 18 metres.
Thus the optimal dimensions are:
Depth = 9 m.
Third fenced side = 18 m.
Maximum area = 9 × 18 = 162 m².
Check the fencing:
9 + 18 + 9 = 36 metres.
The full amount of fencing is used, and both dimensions are positive.
The solution respects both the algebraic maximum and the original material constraint.
Why the optimum is not a square
A common assumption is that a square always gives the largest area for a fixed perimeter.
That observation does apply to a fully fenced rectangle when all four sides use the fixed perimeter material.
But our problem is different: only three sides need the supplied fencing.
If we choose a square with x = y, the constraint becomes:
2x + x = 36.
Then:
x = 12,
and the square has area:
12 × 12 = 144 m².
That is smaller than 162 m².
The true optimum has dimensions 9 m by 18 m, not 12 m by 12 m.
This is why students must model the actual constraint rather than apply a remembered result from a different question.
Why the completed-square form is so useful
The original expression:
A(x) = 36x − 2x²
tells us how to calculate area.
The completed-square expression:
A(x) = 162 − 2(x − 9)²
tells us why the maximum is 162 and how departing from x = 9 reduces the area.
The square term measures how far the depth is from the optimum.
If x differs from nine by one metre, the area is:
162 − 2(1²) = 160 m².
If x differs by three metres, the area becomes:
162 − 2(3²) = 144 m².
The loss depends on the square of the deviation, not simply the distance from the optimum.
This relationship makes the table’s symmetry understandable.
Two very different gardens can have the same area
Look at x = 6 and x = 12.
For x = 6:
y = 36 − 12 = 24.
Area = 6 × 24 = 144 m².
For x = 12:
y = 36 − 24 = 12.
Area = 12 × 12 = 144 m².
Both use the same 36 metres of fencing. Both have the same area. Yet the dimensions are different.
The area graph is symmetric about x = 9, so equal distances to either side of nine produce the same area.
A student should understand this as a property of the quadratic model rather than as a coincidence in the table.
Solve a target-area question
Suppose the task is no longer “maximise the area”. It is:
Find every garden depth that gives exactly 144 m².
Set:
36x − 2x² = 144.
Rearrange:
2x² − 36x + 144 = 0.
Divide by two:
x² − 18x + 72 = 0.
Factorise:
(x − 6)(x − 12) = 0.
Therefore:
x = 6 or x = 12.
Both satisfy 0 < x < 18.
The corresponding third fenced sides are 24 m and 12 m respectively.
The quadratic equation has produced two valid designs.
A question asking for “all possible dimensions” must not discard the second solution merely because the first looks more familiar.
An impossible target gives useful information too
Suppose someone asks for a garden area of 170 m² using the same 36 metres of three-sided fencing.
We already proved that the maximum is 162 m².
Therefore the target is impossible under the stated rectangle and fence constraint.
We can also see this algebraically.
Set:
36x − 2x² = 170.
Rearrange and divide by two:
x² − 18x + 85 = 0.
The discriminant is:
Δ = (−18)² − 4(1)(85).
Calculate:
Δ = 324 − 340 = −16.
A negative discriminant means no real roots.
The geometry and algebra agree: the target area is above the maximum, so no admissible depth can produce it.
What the graph adds to the answer
The graph of:
A(x) = 162 − 2(x − 9)²
is a downward-opening parabola.
Its maximum is at (9, 162).
The valid physical graph is only the part with 0 < x < 18.
A horizontal line at area 144 intersects that graph twice, at x = 6 and x = 12.
A horizontal line at area 162 touches the graph at one point, x = 9.
A horizontal line at area 170 does not intersect it.
These are the same zero-one-two intersection ideas students meet in quadratic equations and discriminants.
A single real-world-style constraint has therefore linked factorisation, completing the square, graph interpretation and quadratic roots.
Confirm the maximum using differentiation
G3 Additional Mathematics also teaches differentiation. We can use it as an independent route.
Start with:
A(x) = 36x − 2x².
Differentiate:
A′(x) = 36 − 4x.
At a stationary point:
A′(x) = 0.
Thus:
36 − 4x = 0.
So:
x = 9.
The second derivative is:
A″(x) = −4.
Because the second derivative is negative, the stationary point is a maximum.
Substitute x = 9 into the original area expression and obtain 162 m².
The calculus and completed-square methods agree.
For this quadratic, completing the square is a particularly direct method, while differentiation demonstrates a useful connection to more general optimisation problems.
The meaning of the derivative in this context
A′(x) = 36 − 4x describes how the area changes when the depth x changes.
When x < 9, the derivative is positive. Increasing the depth a little raises the area.
At x = 9, the derivative is zero. Small changes around the optimum do not give a first-order improvement in area.
When x > 9, the derivative is negative. Increasing the depth further reduces area.
Here the derivative has units of square metres of area per metre of depth, which simplifies dimensionally to metres.
It is not a rate per second because the independent variable x is a length, not time.
The meaning of a derivative depends on what its variables represent.
Add a new condition: the long fenced side must be at least 20 metres
Now imagine that the planning brief changes.
The third fenced side must be at least 20 metres long:
y ≥ 20.
Because y = 36 − 2x:
36 − 2x ≥ 20.
Rearrange:
−2x ≥ −16.
Divide by negative two, reversing the inequality:
x ≤ 8.
Together with positive depth, the new admissible domain is:
0 < x ≤ 8.
The unconstrained optimum x = 9 is no longer allowed.
A student cannot simply repeat the previous answer of 162 m². The new requirement changes the feasible set.
Find the constrained maximum
On the interval 0 < x ≤ 8, the area function is increasing because:
A′(x) = 36 − 4x > 0
for every x in that interval.
Therefore its largest value occurs at the right endpoint x = 8.
The corresponding side length is:
y = 36 − 16 = 20 metres.
The constrained maximum area is:
A(8) = 8 × 20 = 160 m².
That is slightly smaller than the unrestricted 162 m².
The difference is logical: requiring a longer opposite side prevents the proportions that gave the previous optimum.
This is an example of optimisation under an additional constraint.
Why a constraint is not merely a side note
Suppose the student completes the square and writes:
Maximum 162 m² at x = 9.
If the question also required y ≥ 20, that answer would be mathematically correct for the unrestricted model but invalid for the stated task.
The calculation does not become wrong simply because a new condition exists. Rather, its conclusion applies to the wrong feasible domain.
Good Additional Mathematics separates the shape of the function from the set of admissible inputs.
That distinction reappears in modelling, inequalities and calculus.
What happens if the fencing length changes?
Let the total available length be F metres instead of 36.
The constraint is:
2x + y = F.
Thus:
y = F − 2x.
The area is:
A(x) = x(F − 2x) = Fx − 2x².
Complete the square:
A(x) = −2(x − F/4)² + F²/8.
So, for positive F and the ideal three-sided model, the unconstrained maximum occurs at:
x = F/4.
The opposite side is:
y = F/2.
And the maximum area is:
A_max = F²/8.
This general formula explains why the example with F = 36 gives x = 9, y = 18 and area 162.
The result belongs to the particular three-sided rectangle model, not to every possible type of garden or fencing arrangement.
Why doubling the fence length quadruples the maximum area
In the general formula:
A_max = F²/8.
If the available fence length doubles from F to 2F, the maximum becomes:
(2F)²/8 = 4F²/8.
That is four times the original maximum.
The relationship is quadratic because increasing every length by a factor of two changes an area by a factor of four.
This helps students transfer the mathematics to scaling questions.
However, it does not claim that doubling material automatically gives four times the usable land in a real property. The idealised geometry assumes a sufficiently long existing wall and no other constraints.
A small integer-design example
Suppose there are 35 metres of fencing rather than 36.
The continuous mathematical optimum has:
x = F/4 = 8.75 m.
y = F/2 = 17.5 m.
Maximum area:
F²/8 = 35²/8 = 153.125 m².
Now suppose a particular classroom exercise also requires both dimensions to be whole numbers of metres.
We cannot use x = 8.75 under that new rule.
Compare nearby valid integer depths.
At x = 8:
y = 35 − 16 = 19.
Area = 8 × 19 = 152 m².
At x = 9:
y = 35 − 18 = 17.
Area = 9 × 17 = 153 m².
The integer-constrained maximum is 153 m², achieved at x = 9.
This illustrates the difference between optimising over real-valued dimensions and optimising over a discrete set of allowed choices.
Why a table alone is not a proof
The early table shows that x = 9 beats the listed alternatives.
But what about x = 8.5, x = 9.1 or infinitely many other admissible values?
A table samples only a finite number of choices.
Completing the square provides a general inequality:
A(x) = 162 − 2(x − 9)² ≤ 162.
That proves no real x in the domain can produce a larger area.
A graph supports the conclusion visually. Differentiation offers an independent optimisation test.
This hierarchy of evidence is important: numerical checks support understanding, while a symbolic inequality establishes the full maximum claim.
Four different student errors
Error 1: fencing all four sides
Writing 2x + 2y = 36 models a fully enclosed rectangle. It does not match a problem that uses an existing wall as the fourth boundary.
Error 2: treating x and y as independent
The fixed material length connects the dimensions. If depth changes, the opposite side length must change.
Error 3: assuming a square must be optimal
That result applies to a different constraint. For three fenced sides, the optimum dimensions are 9 m by 18 m.
Error 4: ignoring new restrictions
If y must be at least 20 m, the unconstrained maximum x = 9 is excluded. The best feasible solution is x = 8.
Four more errors that look similar
Error 5: forgetting the sign of the quadratic coefficient
The area expression is −2x² + 36x. Its negative leading coefficient is why the parabola opens downwards and has a maximum.
Error 6: omitting the domain
The formula can produce an algebraic value even when y becomes negative. A physical side length cannot be negative.
Error 7: reporting dimensions without checking the total
The proposed lengths must add to 36 metres over the three fenced sides. Re-substitution is a quick accuracy check.
Error 8: confusing a rate derivative with an area
A′(x) concerns the sensitivity of area to depth, not an area measured in square metres.
A five-minute independent check
Try these questions using 36 metres of three-sided fencing.
1. Write the fencing constraint if x is the depth and y the opposite side. 2. State the possible positive values of x. 3. Express area as a function of x. 4. Complete the square and find the largest possible area. 5. Give both designs with area 144 m². 6. Find the maximum if y must be at least 20 m. 7. Explain why a square is not the optimum under the original constraint.
Answers: 2x + y = 36; 0 < x < 18; A = 36x − 2x²; 162 m² at x = 9; dimensions 6 by 24 and 12 by 12; constrained maximum 160 m² at dimensions 8 by 20; because the fixed length covers only three sides, not four.
Students should explain how the constraint changes the algebra, not just quote a numerical result.
What parents can ask in ordinary language
Ask your child why increasing the depth reduces the fencing available for the opposite side.
Ask why there is a maximum rather than an area that keeps increasing forever.
Ask why a square is not automatically best in this particular question.
Then add the requirement “the long fenced side must be at least twenty metres” and ask why the answer changes.
These questions test modelling, not simply the ability to perform algebra quickly.
A student who can explain the difference between the original and constrained optimum has understood something that transfers beyond one worksheet.
What a targeted small-group lesson should repair
Two learners can get the same wrong area for completely different reasons.
One may misread the three-sided fencing condition. Another may build the right expression but complete the square incorrectly. Another may find x = 9 but fail to calculate y. A fourth may overlook the extra side-length restriction.
Giving all four students more factorisation exercises would not fix every problem.
A useful tutorial observes the student’s working, identifies the first mistaken decision and checks understanding with a slightly changed model.
The aim is independent method selection, not repeating a teacher’s final diagram.
Where this sits in Singapore G3 Additional Mathematics
The 2027 Singapore–Cambridge Secondary Education Certificate G3 Additional Mathematics K341 syllabus includes finding maxima or minima of quadratic functions by completing the square and using quadratic functions as models under Algebra A1.
It also includes differentiation applications to maxima and minima under Calculus C1.
Our fence is an original illustrative application of those topics. It is not a published examination question or a real construction plan.
SEAB lists G3 Additional Mathematics as K341 for 2027, with 4049 as the earlier GCE O-Level reference. G2 Additional Mathematics K232 is separately specified.
Frequently asked questions
Why are only three sides fenced?
The model assumes an existing straight wall forms the fourth boundary. The total fencing material therefore covers two depths and one opposite side.
Why does area become a quadratic expression?
The depth x multiplies the remaining side length 36 − 2x. Multiplying produces a term in x².
Can I find the maximum without calculus?
Yes. Completing the square gives A(x) = 162 − 2(x − 9)², proving the maximum directly.
Why is the maximum garden not square?
A square uses the material differently. The three-sided constraint has a different optimal proportion from a four-sided fixed-perimeter rectangle.
What does it mean if the target area is above 162 m²?
It cannot be achieved under the stated idealised fencing and rectangular-shape conditions.
Is a domain restriction important if the quadratic has a clear maximum?
Yes. Extra design constraints can exclude the unconstrained maximum or rule out other algebraic candidates.
Is the second derivative necessary?
Not for this completed-square solution. Differentiation provides another way to locate and classify the maximum.
What foundations should students revise first?
Fractions, expanding brackets, solving linear equations, forming algebraic expressions, completing the square and reading inequalities.
More Additional Mathematics explanations
For another quadratic model, see the basketball shot and its maximum height.
To understand how a line can meet a curve once or twice, read the moving line and quadratic intersections.
For a different optimisation model, see the packaging box and its cubic volume function.
The knowledge hubs are What Is Additional Mathematics? and How Additional Mathematics Works.
The immutable Secondary 1 Mathematics Tutor Clementi | Small Groups Tutorials illustrates why algebra foundations and precise feedback support upper-secondary mathematical problem-solving.
Official source and the model’s limits
The curriculum reference is SEAB 2027 G3 Additional Mathematics K341 syllabus (PDF), especially Algebra A1 and Calculus C1, plus the 2027 G3 subject listing.
The example assumes a straight existing boundary, perfect rectangular geometry and no waste or space lost to fence posts, entrances or ground conditions. It is not a measured or safety-approved design.
The enduring mathematical lesson is that maximisation starts with the correct constraint. A convincing answer identifies the function, proves its maximum and checks that the resulting dimensions are admissible.