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

Try one — Chalk checks each line

Name the variables and the constraint

Let x be the depth, the length of each side that runs away from the river, and y the length of the side along it. The fence covers two depths and one length, so 2⁢x+y=240.

2⁢x+y=240

Write the area as a function of x

The area A=x⁢y has two variables. Solving the constraint for y gives y=240−2⁢x, and substituting it leaves the area as a function of x alone. No side can be negative, so 0≤x≤120.

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

Find the critical point

A is a polynomial, so A′ exists everywhere, and the only critical points are where A′(x)=0. A′(x)=240−4⁢x is zero at x=60, which lies inside [0,120].

A′(x)=240−4⁢x=0⟹x=60

Compare with the endpoints

A is continuous on the closed interval [0,120], so the closed interval method applies. A⁢(0)=0 and A⁢(120)=0, while A⁢(60)=60⋅120=7200, the largest of the three. The second derivative agrees. A′⁢′(x)=−4<0, so the graph is concave down.

Candidates for the maximum
x (m)A⁢(x) (m2)
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 m2. The fence used is 60+120+60=240 m, as required. 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 m2.

Your turn

1. One like the example

A rectangular pen is fenced on all four sides with 100 m of fence. Which dimensions give the largest area?

Show the answer and explanation

A square, 25 m by 25 m, with an area of 625 m2.

With sides x and y, 2⁢x+2⁢y=100, so y=50−x and A⁢(x)=x⁢(50−x) for 0≤x≤50. A′(x)=50−2⁢x is zero at x=25. A⁢(25)=625 m2, while A⁢(0)=A⁢(50)=0, so the square gives the maximum.

A⁢(x)=x⁢(50−x)A′(x)=50−2⁢xA′(25)=0A⁢(25)=625

2. A variation

Find the largest and smallest values of f⁡(x)=x3−6x2+9⁢x on [0,5]. This time a critical point is not the winner.

Show the answer and explanation

The maximum is f⁡(5)=20. The minimum is 0, reached at x=0 and at x=3.

f′(x) =3x2−12⁢x+9 =3⁢(x−1)⁢(x−3), so the critical points are x=1 and x=3. The candidates give f⁡(0)=0, f⁡(1)=4, f⁡(3)=0 and f⁡(5)=20. The local maximum at x=1 is not the largest value on [0,5], because the right endpoint is higher.

f⁡(x)=x3−6x2+9⁢xf′(x)=3⁢(x−1)⁢(x−3)f⁡(1)=4f⁡(3)=0f⁡(0)=0f⁡(5)=20

3. Somewhere new

An open box is made from a 12 cm by 12 cm square of cardboard by cutting a square of side x from each corner and folding up the sides. Which x gives the largest volume?

Show the answer and explanation

x=2 cm, for a volume of 128 cm3.

The base is 12−2⁢x on each side and the height is x, so V⁢(x)=x⁢(12−2⁢x)2 on [0,6]. The product rule gives V′(x) =(12−2⁢x)⁢(12−6⁢x), which is zero at x=2 and x=6. V⁢(0)=V⁢(6)=0 and V⁢(2)=2⋅82=128 cm3.

V⁢(x)=x⁢(12−2⁢x)2V′(x)=(12−2⁢x)⁢(12−6⁢x)V′(2)=0V⁢(2)=128

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.

After reading

Try it, then study it

Open the example in its tool to check steps or change values, then review the key terms as flashcards.

Graph the area in Graph Check each step in Math See the zero slope in Secant → Tangent Study the 5 key terms Open worked example on a board Optimization candidates in Math Reference

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