Fencing a Plot Against a Wall
A farmer has 60 metres of fencing and wants to enclose a rectangular vegetable plot using an existing straight stone wall as one full side of the rectangle, so fencing is needed on only three sides. She wants the plot to have the largest possible area. A neighbour claims that the best shape is always a square, so the plot should be 15 m by 15 m, giving 225 m². The farmer is unsure, because one side is free. She also has a second constraint in mind: the plot must be at least 10 m deep (the side perpendicular to the wall) so that a wheelbarrow can turn, and she wants to know whether that constraint changes the optimum. All dimensions are in metres and may be non-integer.
1. Let x be the depth perpendicular to the wall and y the length parallel to the wall. Set up the area function subject to the fencing constraint, and find the dimensions that maximise area without the depth constraint.
Read the worked answer
Fencing covers two depths and one length: 2x + y = 60, so y = 60 − 2x.
Area: A(x) = x·y = x(60 − 2x) = 60x − 2x², with x > 0 and y > 0 → 0 < x < 30.
Differentiate: A′(x) = 60 − 4x. Setting A′(x) = 0 gives x = 15. Since A″(x) = −4 < 0, this is a maximum.
Then y = 60 − 30 = 30, and A = 15 × 30 = 450 m².
So the neighbour is wrong: the optimum is 15 m by 30 m, not a square. The free wall means only three sides are fenced, so the optimal rectangle has the fenced length equal to twice the depth. The square 15 × 15 would use only 45 m of fencing and enclose 225 m² - exactly half the achievable area.
2. Now impose the constraint that the depth x must be at least 10 m. Does the optimum change? Justify using the behaviour of A(x) on the restricted interval.
Read the worked answer
The restricted domain is 10 ≤ x < 30 (still needing y = 60 − 2x > 0).
The unconstrained maximiser x = 15 already lies inside [10, 30), so the constraint is not binding. The maximum remains at x = 15, y = 30, area 450 m².
Justification without relying only on that coincidence: A′(x) = 60 − 4x is positive for x < 15 and negative for x > 15, so A increases on [10, 15] and decreases on [15, 30). Hence the global maximum on the restricted interval is at x = 15.
Check the endpoints for completeness: at x = 10, y = 40, A = 400 m²; as x → 30⁻, y → 0, A → 0. Both are below 450 m².
Conclusion: the 10 m depth requirement is satisfied by the optimal design (15 m ≥ 10 m), so the farmer can build the 15 m × 30 m plot and no compromise is needed.