Math · Calculus I · Worked example
Maximize the area of a fenced field
A farmer has 240 m of fencing to enclose a rectangular field along a straight river, with no fence on the river side. What dimensions give the largest area?
Name the variables and the constraint
Let x be the length of each side perpendicular to the river and y the side parallel to it. The fence covers two sides of length x and one of length y, so 2x + y = 240.
Write the area as a function of x
The area is A = xy. From the constraint, y = 240 − 2x, so the area depends on x alone. Both sides must be at least zero, so 0 ≤ x ≤ 120.
Set the derivative to zero
A′(x) = 240 − 4x, which is zero at x = 60.
Compare with the endpoints
A(0) = 0 and A(120) = 0, while A(60) = 60 · 120 = 7200. The critical point gives the maximum. The second derivative agrees: A″(x) = −4 < 0, so the graph is concave down.
| x (m) | A(x) (m²) |
|---|---|
| 0 | 0 |
| 60 | 7200 |
| 120 | 0 |
Answer the question
The field should reach 60 m from the river and run y = 240 − 120 = 120 m along it, for an area of 7200 m². The side along the river is twice the depth.
Result
Make the field 60 m deep and 120 m along the river. The largest area is 7200 m².
Your turn
Find two positive numbers whose sum is 20 and whose product is as large as possible.
Show the answer and explanation
10 and 10, with product 100.
Let the numbers be x and 20 − x, so P(x) = x(20 − x). P′(x) = 20 − 2x is zero at x = 10, and P″(x) = −2 < 0, so it is a maximum: 10 × 10 = 100.
Keep exploring
Open the rows in Math and change 240 m of fence to 300 m: the best depth becomes 75 m, still a quarter of the fence.
Return to the concept →Sources and scope
Authored study material. Tool results depend on the stated inputs and model assumptions.
Try in the workspace
Open the example inputs, change a value and keep a useful result on your board.
Graph the area in Graph Check each step in Math See the zero slope in Slopes, sums & signed area Open worked example on a board Optimization candidates in Math ReferenceYour existing work stays on this device. Examples open as editable copies.