The Fence That Doubled Back
A farmer has 60 m of fencing and wants to enclose a rectangular pen against an existing straight wall, using the wall as one side so only three sides need fencing. She sketches a pen of width x metres perpendicular to the wall and length y metres parallel to it, and writes 2x + y = 60. A neighbour points out that if she instead builds the pen in a corner where two perpendicular walls already exist, only two sides need fencing. The farmer wants the largest possible area in each layout and cannot decide which layout to choose. She also wonders whether the 'against one wall' problem has an interior maximum at all or whether the best answer sits at an endpoint of the allowed range of x.
1. For the one-wall layout, express the area in terms of x, find the stationary point, and justify that it is a maximum over the physically allowed domain.
Read the worked answer
With 2x + y = 60, y = 60 − 2x, so A(x) = x(60 − 2x) = 60x − 2x².
Domain: x > 0 and y > 0 gives 0 < x < 30.
A'(x) = 60 − 4x, so A' = 0 at x = 15. A''(x) = −4 < 0 everywhere, so the curve is concave down and x = 15 is the unique maximum on the open interval. A(15) = 15 × 30 = 450 m².
Endpoint check: as x → 0⁺ or x → 30⁻, A → 0, so 450 m² is genuinely the largest value, attained at an interior point. The pen is 15 m by 30 m.
2. For the two-wall corner layout, set up and solve the area maximisation, then compare the two layouts and state which the farmer should build.
Read the worked answer
In a corner the two fenced sides are x and y with x + y = 60, so y = 60 − x and A(x) = x(60 − x) = 60x − x², with 0 < x < 60.
A'(x) = 60 − 2x = 0 gives x = 30, and A'' = −2 < 0, so this is a maximum. A(30) = 30 × 30 = 900 m².
Comparison: the corner pen gives 900 m², exactly double the 450 m² of the one-wall pen, because the same 60 m now fences two sides instead of three. The farmer should use the corner. Note the structural point: in both cases the optimum makes the two fenced sides equal, but the constraint differs, so the numerical answers differ by a factor of two.