SME
Calculus I · Problem type

The largest field along a river

Use this for “A gardener has 16 m of fence for a plot along a straight river, with no fence on the river side. What sides give the largest area?”

Chart

A(x) = −2x(x − 10)02468100102030405060Side x (m)Area A (m²)(5, 50)x = 5(4, 48)
Vertex (5, 50), axis of symmetry x = 5
A(4) = 48
This is an example. Type your own values to start a new problem.
x
=
x (m)
,
P
=
P (m)
A
=
x(P
−
2x)
=
A (m²)
y
Side along the river
calculated · m
m
Slope of the area A′(x) at that side
calculated · m
xₘₐₓ
Best side away from the river
worked out (not typed) · m
Aₘₐₓ
Largest area
worked out (not typed) · m²

Formulas

y
=
P
−
2
×
x
12 = 20 − 2 × 4
A
=
x
×
y
48 = 4 × 12
m
=
P
−
4
×
x
4 = 20 − 4 × 4
xₘₐₓ
=
P
4
5
=
20
4
Aₘₐₓ
=
xₘₐₓ
×
(
P
−
2
×
xₘₐₓ)
50 = 5 × (20 − 2 × 5)

Assumptions

•
The field is a rectangle with one long side on the river, so the fence P runs on the other three sides: two sides x away from the river and one side y along it.
•
So y = P − 2x and the area is A(x) = x(P − 2x), which makes sense for 0 < x < P ÷ 2. At both ends A = 0.
•
A′(x) = P − 4x is 0 only at x = P ÷ 4, and A″ = −4 < 0, so that side gives the largest area.
•
Lengths are in m and areas in m²; the slope A′ is in m² per m of side, which is m.

Step-by-step

WE KNOW
P = 20 m, x = 4 m
FIND
side along the river (y), area of the field (A), slope of the area A′(x) at that side (m), best side away from the river (xₘₐₓ), largest area (Aₘₐₓ)
Step 1 · Find side along the river (y)
Use y = P − 2 × x
Two
sides
of
length
x
use
2
x
of
the
fence;
the
rest
runs
along
the
river.
y
=
20
−
2
×
4
y
=
12
m
Step 2 · Find area of the field (A)
Use A = x × y
A rectangle’s area is one side times the other.
A
=
4
×
12
A
=
48
m²
Step 3 · Find slope of the area A′(x) at that side (m)
Use m = P − 4 × x
Multiply
A
out
and
use
the
power
rule.
A
′
>
0
here,
so
a
longer
side
x
still
adds
area.
m
=
20
−
4
×
4
A
(
x
)
=
x
(20
−
2
x
)
=
−
2
x
²
+
20
x
A
′(
x
)
=
−
4
x
+
20
A
′(4)
=
−4(4)
+
20
=
4
m
=
4
m
Step 4 · Find best side away from the river (xₘₐₓ)
Use xₘₐₓ = P ÷ 4
Set
A
′
=
0:
P
−
4
x
=
0,
so
x
=
P
4
.
Half
the
fence
then
runs
along
the
river.
xₘₐₓ
=
20
4
xₘₐₓ = 5 m
Step 5 · Find largest area (Aₘₐₓ)
Use Aₘₐₓ = xₘₐₓ × (P − 2 × xₘₐₓ)
Put
the
best
side
into
A
.
A
″
=
−4
<
0,
so
the
graph
is
a
hill
and
this
is
its
top.
Aₘₐₓ = 5 × (20 − 2 × 5)
Aₘₐₓ = 50 m²
Check
Put the numbers back in. Both sides should match.
12 = 20 − 2 × 4 ✓
48 = 4 × 12 ✓
4 = 20 − 4 × 4 ✓
5
=
20
4
✓
50 = 5 × (20 − 2 × 5) ✓
Topic check
See what you know: 5 questions on this topic
New questions each time. Pass to mark it complete.

Related lessons

© 2026 SME. All rights reserved.