Lesson 11 · Putting it to work · 9 min
Optimization & related rates
Derivatives don't just describe change — they find best values and connect linked rates. This is where calculus starts paying rent.
Build the intuition
Peaks are flat
At the top of any smooth hill, the tangent is horizontal — slope zero. So to find a maximum or minimum, ask the derivative where it vanishes: solve f′(x) = 0. The candidates fall out as solutions; a glance at the slopes around them tells you peak or valley.
Optimization, the recipe
Write the quantity you care about as a function. Differentiate. Set to zero. Solve. Check the candidates. Five steps that design shipping boxes, price products, and shape aircraft wings.
Related rates
When quantities are linked by an equation, their rates link too — differentiate the relationship. Inflate a balloon: volume and radius are tied by V = 4/3 πr³, so their rates are tied by V′ = 4πr² · r′. Know one rate, get the other.
See it move
Climb the volume curve. Uphill: keep going. Downhill: too far. The peak is exactly where the slope reads zero.
A worked example
The best box
Fold an open box from a 6×6 sheet by cutting x-squares from the corners. Volume:
Differentiate and set to zero:
Solve: x = 1 (x = 3 gives a flat non-box). Best cut: 1 unit → volume 16.
No trial and error — the derivative walked straight to the answer.
Out in the world
Machine learning, literally
Training a neural network is optimization at absurd scale: the loss is a function of millions of parameters, and gradient descent follows the derivative downhill, step by step, until the error bottoms out. Every model you've chatted with was built by f′ chasing zero.
Common confusion, cleared
“f′ = 0 always means a maximum.”
It means flat — peak, valley, or a brief pause mid-climb. Check how the slope changes around the point to know which.
“Optimization needs to try lots of values.”
That's what makes calculus powerful: the derivative goes directly to the candidates. The search space collapses to an equation.
Recap
- Max/min live where f′ = 0 — peaks are flat.
- Recipe: model, differentiate, set to zero, solve, check.
- Linked quantities have linked rates — differentiate the relationship.