Optimization: Maximum Area with Constraint
Let's Picture This
Before diving into equations, let's visualize what we're working with. This diagram shows our rectangular plot against the river:
Notice that we need fencing for three sides: both sides perpendicular to the river (each of length y) and one side parallel to the river (length x). The river provides the fourth "wall" for free.
What You Will Learn
- How to set up constraint optimization problems using calculus
- Converting a two-variable problem into a single-variable function
- Finding maximum values using derivatives and the first derivative test
- Why geometric optimization problems often have elegant, symmetric solutions
- How to verify optimization results using the second derivative test
Solution: Method 1 — Single-Variable Calculus Approach
Step 1 — Define variables and set up the constraint
Let x = width of the plot (parallel to the river) and y = depth of the plot (perpendicular to the river).
Since one side is along the river, we only need fencing for three sides:
Step 2 — Express area as a function of one variable
The area of the rectangle is A = xy. From our constraint, we can solve for x:
Substituting this into the area formula:
Step 3 — Find the maximum using calculus
To find the maximum area, we take the derivative and set it equal to zero:
Step 4 — Find the corresponding x-value
Using our constraint equation:
Step 5 — Verify this is indeed a maximum
We check the second derivative:
Since the second derivative is negative, we have a maximum.
Solution: Method 2 — Completing the Square
Step 1 — Start with the area function
From Method 1, we have A(y) = 1120y - 2y².
Step 2 — Factor and complete the square
Factor out the coefficient of y²:
Complete the square inside the parentheses:
Step 3 — Rewrite in vertex form
Step 4 — Identify the maximum
This is in vertex form A(y) = a(y - h)² + k where a = -2, h = 280, and k = 156,800.
Since a < 0, the parabola opens downward, so the vertex represents the maximum. The maximum occurs at y = 280 meters, giving x = 560 meters.
Width (parallel to river): 560 meters
Depth (perpendicular to river): 280 meters
Maximum area: 156,800 square meters
Verification
Let's verify our answer satisfies all conditions:
Fence constraint check:
Area calculation:
Maximum verification: Let's test nearby values. If y = 275, then x = 1120 - 2(275) = 570, giving area 275 × 570 = 156,750 m². If y = 285, then x = 1120 - 2(285) = 550, giving area 285 × 550 = 156,750 m². Both are smaller than our answer of 156,800 m², confirming we found the maximum.
Does This Seem Reasonable?
Our answer tells us the optimal plot is 560m × 280m. Notice something interesting: the width along the river is exactly twice the depth. This isn't a coincidence!
The 2:1 ratio pattern: In any "three-sided fencing" problem where one side is free, the optimal rectangle always has the free side twice as long as each fenced side. This happens because we're essentially "sharing" the fencing budget optimally between the parallel and perpendicular directions.
We can also check this makes intuitive sense by considering extreme cases:
- If the plot were very narrow (
xsmall), we'd waste fencing on long sides perpendicular to the river - If the plot were very shallow (
ysmall), we'd waste fencing on the long side parallel to the river - Our solution balances these competing demands optimally
Watch Out For These
✗ Mistake 1: Fencing all four sides
Setting up the constraint as 2x + 2y = 1120 because "rectangles have four sides." This ignores that one side is along the river and needs no fence. The correct constraint is x + 2y = 1120.
✗ Mistake 2: Forgetting to check which variable is which
Mixing up x and y in the final answer. Always double-check: the width along the river should be the larger dimension (560m), while the depth into the land should be smaller (280m). If you get depth > width, you've likely swapped the variables.
✗ Mistake 3: Setting up area as A = x + y instead of A = xy
Confusing perimeter with area. The area of a rectangle is length × width, not length + width. This mistake usually comes from focusing too much on the constraint equation and carrying the addition into the area formula.
The Pattern Behind This
This problem represents a classic constrained optimization situation. Here's the general approach that works for any similar problem:
1. Identify what you want to optimize (area, volume, cost, etc.)
2. Write the constraint equation connecting your variables
3. Use the constraint to eliminate one variable
4. Express your target as a function of one variable
5. Find the maximum/minimum using calculus or algebra
The river fence pattern specifically: For any rectangular enclosure where one side needs no fencing, the optimal dimensions satisfy:
This pattern appears in many contexts: fencing against walls, buildings, cliffs, or any natural boundary that provides one "free" side.
You'll See This Again In...
- Engineering: Designing efficient storage tanks, warehouses, and enclosures where one side is against an existing structure
- Agriculture: Planning pastures and crop fields where natural boundaries (rivers, hills, existing fences) provide free containment
- Urban planning: Optimizing park layouts, parking lots, and building footprints against property lines
- Economics: Similar optimization appears in production theory when one resource is "free" or unlimited
What Comes Next
This problem is your entry point to a rich world of optimization. More advanced versions include:
Multiple constraints: What if you also had a maximum depth restriction due to soil conditions?
Non-uniform costs: What if fencing parallel to the river costs differently than perpendicular fencing?
Non-rectangular shapes: Advanced calculus courses explore optimizing circular and elliptical enclosures using Lagrange multipliers.
The systematic thinking you've learned here—expressing everything in terms of one variable, then optimizing—will serve you throughout calculus and beyond.
What If?
Practice your optimization skills with these variations:
Let x = width and y = length. With two sides along the river, we only fence two sides: x + y = 1120
From constraint: y = 1120 - x. So A(x) = x(1120 - x) = 1120x - x²
dA/dx = 1120 - 2x = 0, so x = 560 and y = 560
Check: 560 + 560 = 1120 ✓. Area = 560 × 560 = 313,600 m²
Optimal dimensions: 560m × 560m (a perfect square)
Maximum area: 313,600 m²
Given: xy = 156,800. Want to minimize: F = x + 2y
From area constraint: x = 156,800/y. So F(y) = 156,800/y + 2y
dF/dy = -156,800/y² + 2 = 0. So 2 = 156,800/y², giving y² = 78,400, thus y = 280
x = 156,800/280 = 560. Total fence = 560 + 2(280) = 1120 m
Optimal dimensions: 560m × 280m
Minimum fencing needed: 1120 m
Need: 2 sides of length y, plus 2 parallel sides of length x (exterior bottom + interior divider). Total: x + x + y + y = 2x + 2y = 1120
2x + 2y = 1120 simplifies to x + y = 560, so x = 560 - y
A(y) = xy = y(560 - y) = 560y - y². Taking derivative: dA/dy = 560 - 2y = 0, so y = 280
x = 560 - 280 = 280. Check: 2(280) + 2(280) = 1120 ✓
Optimal dimensions: 280m × 280m (perfect square)
Maximum area: 78,400 m²
Cost = 15x + 8(2y) = 15x + 16y = 8960
From constraint: 15x = 8960 - 16y, so x = (8960 - 16y)/15
A(y) = xy = y(8960 - 16y)/15 = (8960y - 16y²)/15dA/dy = (8960 - 32y)/15 = 0
8960 - 32y = 0, so y = 280x = (8960 - 16(280))/15 = (8960 - 4480)/15 = 298.67
Optimal dimensions: 298.67m × 280m
Maximum area: 83,627 m²
Frequently Asked Questions
2026-10-23