Chalk−1

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?

2⁢x+y=240,A=x⁢y

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.

2⁢x+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.

A⁢(x)=x⁢(240−2⁢x)=240⁢x−2x2

Set the derivative to zero

A′(x) = 240 − 4x, which is zero at x = 60.

A′(x)=240−4⁢x=0⟹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.

Candidates for the maximum
x (m)A(x) (m²)
00
607200
1200

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.

A⁢(60)=60⁢(240−2⋅60)=7200

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.

P⁢(x)=x⁢(20−x)P′(x)=20−2⁢xP′(10)=0P⁢(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.

Make it concrete

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 Reference

Your existing work stays on this device. Examples open as editable copies.