Setting Up Optimization Problems
From Words to Calculus
A farmer has fencing. A company wants to maximize profit. An engineer needs to minimize material costs. These real-world problems share a common structure: something needs to be made as large or as small as possible, subject to constraints.
The power of calculus is that derivatives tell us where functions reach their extreme values. But before you can use derivatives, you must translate the English description into a mathematical function. This translation step (setting up the problem) is often harder than the calculus that follows.
The good news: there’s a systematic procedure that works for nearly every optimization problem.
Prerequisite Map
Quick Reference
| Property | Value |
|---|---|
| Concept | Optimization |
| Chapter | 3.7 |
| Difficulty | Intermediate |
| Time | ~20 minutes |
The Six-Step Procedure
Step 1: Understand the Problem
Read carefully. Ask yourself:
- What quantity do I want to maximize or minimize?
- What quantities are given?
- What constraints limit my choices?
Common words that signal optimization:
- Maximum/minimum
- Largest/smallest
- Greatest/least
- Optimal/best
Step 2: Draw a Diagram
Most optimization problems have a geometric component. A clear diagram:
- Makes relationships visible
- Prevents errors in equations
- Reveals what variables you need
Example: Rectangular field along a river
┌─────────────────────────────┐
│ │
x │ Field │ x
│ │
└─────────────────────────────┘
══════════════════════════════════════════
RIVER
(no fence needed)
y
Step 3: Introduce Notation
Assign symbols to:
- The quantity to optimize (call it $Q$)
- The unknown dimensions or quantities
Use suggestive letters: $A$ for area, $V$ for volume, $t$ for time, $d$ for distance.
Step 4: Write the Objective Function
Express the quantity to optimize in terms of your variables:
$$Q = \text{(expression in terms of variables)}$$
This is your objective function: the function you’ll eventually maximize or minimize.
Step 5: Reduce to One Variable
Here’s where constraints become crucial. If your objective function has multiple variables, use the given information to eliminate all but one.
Example: If $Q = xy$ and you know $2x + y = 100$, then:
- Solve the constraint: $y = 100 - 2x$
- Substitute: $Q(x) = x(100 - 2x) = 100x - 2x^2$
Now $Q$ is a function of $x$ alone, ready for calculus.
Don’t forget the domain: What values can your variable actually take? The domain comes from physical constraints (lengths must be positive, angles between 0 and $\pi$, etc.).
Step 6: Solve Using Calculus
This is covered in the next skill: Optimization Solution Methods.
Worked Example: The Fencing Problem
Problem: A farmer has 2400 ft of fencing to enclose a rectangular field along a straight river. No fence is needed along the river. What dimensions maximize the enclosed area?
Step 1: Understand
- Maximize: area of rectangle
- Given: 2400 ft of fencing
- Constraint: no fence on river side
Step 2: Diagram
┌─────────────────────────────┐
│ │
x │ Field │ x
│ │
└─────────────────────────────┘
══════════════════════════════════════════
RIVER
y
Step 3: Notation
- $A$ = area (what we maximize)
- $x$ = depth (perpendicular to river)
- $y$ = width (parallel to river)
Step 4: Objective Function
$$A = xy$$
Step 5: Reduce to One Variable
The constraint: fencing = two sides of length $x$ + one side of length $y$
$$2x + y = 2400$$
Solve for $y$: $y = 2400 - 2x$
Substitute into objective:
$$A(x) = x(2400 - 2x) = 2400x - 2x^2$$
Domain: $x$ must be positive. Maximum $x$ occurs when all fencing goes to depth: $2x = 2400 \Rightarrow x = 1200$. So the domain is $0 \le x \le 1200$.
The setup is complete. We have:
$$\boxed{A(x) = 2400x - 2x^2, \quad 0 \le x \le 1200}$$
Common Constraint Types
| Constraint Type | Example | Typical Equation |
|---|---|---|
| Perimeter/Fencing | Total fencing is 100 ft | $2x + 2y = 100$ |
| Fixed Volume | Cylinder holds 1 liter | $\pi r^2 h = 1000$ |
| Fixed Surface Area | Box uses 600 cm² of material | $2xy + 2xz + 2yz = 600$ |
| Point on Curve | Point lies on $y^2 = 2x$ | Substitute $x = \frac{1}{2}y^2$ |
| Pythagorean | Right triangle with legs | $a^2 + b^2 = c^2$ |
Practice Problems
For each scenario, identify (a) the quantity to be optimized and (b) whether it should be maximized or minimized.
- A box with no lid is made from cardboard. The company wants to use the least material.
- A rectangular garden has a fixed perimeter. The gardener wants the largest growing space.
- A person rows across a river and runs along the shore. They want to arrive quickly.
A farmer has 600 meters of fencing to enclose a rectangular area and divide it into three equal pens with fencing parallel to one side. Write the constraint equation relating the length $x$ and width $y$.
┌────┬────┬────┐
│ │ │ │
y │ │ │ │
│ │ │ │
└────┴────┴────┘
x
A box with an open top is made from a 16 cm × 30 cm piece of cardboard by cutting equal squares from each corner and folding up the sides. Set up the volume as a function of one variable and state its domain.
┌──┬──────────────────┬──┐
│x │ │x │
├──┼──────────────────┼──┤
│ │ │ │
│ │ 30 cm │ │
│ │ │ │
├──┼──────────────────┼──┤
│x │ 16 cm │x │
└──┴──────────────────┴──┘
Find the point on the parabola $y = x^2 + 1$ that is closest to the point $(3, 1)$. Set up the problem completely (objective function in one variable with domain) but do not solve.
A rectangle is inscribed in the ellipse $\frac{x^2}{a^2} + \frac{y^2}{b^2} = 1$ with sides parallel to the axes.
(a) Using the symmetry of the ellipse, explain why we can assume the rectangle has vertices at $(\pm x, \pm y)$ for some point $(x, y)$ in the first quadrant.
(b) Express the area as a function of $x$ alone.
(c) Alternatively, express the area using the parametrization $x = a\cos\theta$, $y = b\sin\theta$.
(d) Which setup (b or c) do you expect will be easier to solve? Explain.
CCI-Style Conceptual Questions
A farmer uses 200 meters of fencing to create a rectangular pen. If $x$ represents the width and $y$ represents the length, the constraint equation is $2x + 2y = 200$.
Which statement correctly interprets the domain restriction $0 < x < 100$?
(A) The width must be less than the length. (B) The width cannot exceed the total fencing available. (C) If all fencing goes to width, we get $x = 100$, leaving nothing for length. (D) The perimeter formula requires $x < 100$.
Common Misconceptions
setting $f(x) = 0$ (not $f'(x) = 0$) finds the optimal value.
This is the height-vs-slope error. Optimization requires finding where the rate of change of the objective function equals zero, that is, where the derivative is zero. Setting the objective function itself to zero finds where the quantity is zero, not where it is maximized or minimized. For the area function $A(x) = 2400x - 2x^2$, setting $A = 0$ gives the endpoints where the area is zero; setting $A'(x) = 2400 - 4x = 0$ gives $x = 600$, where the area is greatest.
the constraint equation and the objective function are the same thing.
This is the action-view-of-function error about the roles of the two equations in an optimization setup. The objective function is the quantity to be maximized or minimized; the constraint is a relationship that limits the variables. In the fencing problem, $A = xy$ is the objective and $2x + y = 2400$ is the constraint. Using the constraint to eliminate a variable from the objective is the key step; conflating the two equations prevents that step from being taken.
Mastery Checklist
Mental Model
The Translation Process:
Think of optimization setup like translating between languages:
| English | Mathematics |
|---|---|
| “We want to maximize area” | Objective: $A = ?$ |
| “given 100 ft of fencing” | Constraint: $2x + 2y = 100$ |
| “length must be positive” | Domain: $x > 0$ |
The constraint is the bridge between variables. It lets you express everything in terms of one unknown, and that’s when calculus can take over.
Connections
Looking back:
- Critical points and the first derivative test (§3.1, §3.3) tell us how to find extrema once we have the function
Looking ahead:
- Optimization Solution Methods covers solving after setup
- Related rates (§3.9) also translates word problems to calculus, but finds rates instead of extrema
Real-world connections:
- Engineers minimize material costs while meeting strength requirements
- Economists maximize profit subject to production constraints
- Nature often “optimizes”: light takes the path of least time (Fermat’s principle)
| Previous | Up | Next |
|---|---|---|
| What Derivatives Tell Us | Skills Index | Optimization Solution Methods |
Last updated: 2026-01-22