What Are Optimization Problems?
Optimization problems ask you to find the largest or smallest possible value of some quantity under a set of constraints. In calculus, that quantity is modeled by a function, and the maximum or minimum is found using derivatives.
Real-world optimization questions sound like this: "A farmer has 400 feet of fence and wants to enclose the largest possible rectangular area. What dimensions should she use?" or "A company needs to design a cylindrical can of volume 355 mL using the least material possible. What radius and height minimize surface area?"
In every case the workflow is the same: (1) identify the quantity to maximize or minimize, (2) express it as a function of one variable using the constraint, and (3) use derivatives to find the critical points.
This turns a continuous question ("what's the largest area?") into an algebraic one ("where does the derivative equal zero?").
Optimization is the most practical topic in a first calculus course — it's the reason engineers, economists, and data scientists still rely on calculus every day. Once you have the method down, solving these problems becomes methodical rather than mysterious.
The 6-Step Method
Every optimization problem can be solved with the same six-step procedure. Memorize it and you'll be able to tackle any problem with confidence.
- Draw a picture and label variables
A clear diagram makes setting up the problem ten times easier. Label every dimension with a variable.
- Identify the quantity to optimize
Read the question carefully: is it area, volume, cost, distance, time? This is the quantity you will turn into a function, called the objective function.
- Write the objective function in terms of the variables
It will usually have more than one variable at this stage — don't worry.
- Use the constraint to reduce to one variable
The problem will always give a constraint (fixed perimeter, fixed volume, a side relationship, etc.). Solve the constraint for one variable and substitute into the objective function so it depends on only one variable.
- Differentiate and find critical points
Compute the derivative, set it equal to zero, and solve. Also check the endpoints of the domain if the variable is restricted to an interval.
- Verify the critical point is a max or min
Use the first or second derivative test, or check the values at the endpoints and critical points. Finally, answer the question that was actually asked: state dimensions, not just the value of the variable.
Following this procedure religiously will catch about 90% of the mistakes students typically make.
Fencing / Area Optimization
Classic problem: A farmer has 400 feet of fence and wants to enclose a rectangular field with the largest possible area. What dimensions should he use?
Step 1 — Picture: Draw a rectangle with width w and length l.
Step 2 — Objective: Maximize area A = w · l.
Step 3 — Constraint: The total fence is the perimeter: 2w + 2l = 400, so w + l = 200.
Step 4 — Reduce to one variable: From the constraint, l = 200 − w. Substitute: A(w) = w(200 − w) = 200w − w². The domain is 0 < w < 200.
Step 5 — Differentiate: A'(w) = 200 − 2w. Set equal to zero: 200 − 2w = 0, so w = 100.
Step 6 — Verify: A''(w) = −2 < 0, so w = 100 is a local max. Since it is the only critical point and the endpoints give A = 0, it is the absolute max. Then l = 200 − 100 = 100.
100 ft × 100 ft square, area = 10,000 ft²Variant — fence against a river
If one side needs no fence, the constraint becomes w + 2l = 400. Substituting and optimizing gives l = 100, w = 200, with area 20,000 ft² — double the enclosed area.
l = 100, w = 200, area = 20,000 ft²This variant shows how the constraint completely changes the optimal shape.