Maths WorkshopMaths problems with full solutions
Exercise 15Calculus › Single-variable calculus › Differentiation › Optimisation and curve sketchingHigh schoolAdded 4 Nov 2026

A fence along a river

#optimisation#area#quadratic function

Statement

A farmer has 100100 m of fence and wants to enclose a rectangular field along a straight river. No fence is needed along the river. Which dimensions maximise the area?

Hint

Call xx the length of each side perpendicular to the river. What is the length of the side parallel to the river?

Show solutionHide solution

Solution

Setup. Two sides of length xx and one of length 100−2x100-2x, with 0<x<500<x<50. The area is
A(x)=x(100−2x)=100x−2x2.A(x)=x(100-2x)=100x-2x^2.

Maximum. A′(x)=100−4xA'(x)=100-4x vanishes at x=25x=25, with A′>0A'>0 on (0,25)(0,25) and A′<0A'<0 on (25,50)(25,50). So AA is increasing then decreasing on the whole interval, and x=25x=25 gives the global maximum.

Answer. 2525 m by 5050 m, area 12501250 m².

Remark. If the field were fenced on all four sides, the best rectangle would be a square. Here the free side lets the field be twice as long as it is wide. In general, with a fence of length LL, the maximum is at x=L4x=\frac L4, and the side parallel to the river is L−2x=L2=2xL-2x=\frac L2=2x: always twice each perpendicular side.