What is Optimization?
Optimization means finding the best value of something — the maximum profit, minimum surface area, shortest distance, or largest volume — subject to some constraint. Calculus provides a precise method: find the critical points of the objective function and test which gives the optimal value.
The 5-Step Process
- Step 1: Read carefully and identify what to maximize or minimize (the objective function).
- Step 2: Identify the constraint(s).
- Step 3: Express the objective function in terms of one variable (using the constraint to eliminate others).
- Step 4: Differentiate, set equal to zero, find critical points.
- Step 5: Verify the critical point gives the desired optimum (use second derivative test or test endpoints).
Classic Example — Maximum Area
- Problem: A farmer has 100m of fence. What rectangle maximises the enclosed area?
- Objective: Maximise A = l × w.
- Constraint: 2l + 2w = 100, so l = 50 − w.
- Substitute: A(w) = (50−w)w = 50w − w².
- Derivative: A'(w) = 50 − 2w = 0 → w = 25.
- Result: l = w = 25 (a square). Max area = 625 m².
Example — Minimum Cost Box
- Problem: An open-top box with square base, volume 32 m³. Minimise total surface area.
- Objective: S = x² + 4xh (base + 4 sides, no top).
- Constraint: x²h = 32 → h = 32/x².
- Substitute: S(x) = x² + 128/x.
- Derivative: S'(x) = 2x − 128/x² = 0 → 2x³ = 128 → x = 4.
- Result: S''(4) > 0 confirms minimum. Optimal box: 4×4×2.
Closed Interval Method
On a closed interval [a,b], the absolute maximum and minimum must occur at either a critical point in (a,b) or at the endpoints. Process: find all critical points, evaluate f at each critical point and at both endpoints, compare all values — largest is the absolute maximum, smallest is the absolute minimum.
Optimisation: express the objective function in one variable using the constraint, differentiate, set equal to zero, find critical points, verify which gives the optimal value. Always check endpoints on closed intervals.
Why Optimisation Is Calculus's Killer Application
Every engineering design, economic policy, and machine learning algorithm is at its core an optimisation problem. How thick should a beam be to support maximum load with minimum material? What price maximises profit? What neural network weights minimise prediction error? Calculus gives a systematic, exact answer to all of these — not trial and error, but a procedure that finds the optimal solution directly.
The Constraint Is Everything
Most optimisation problems without constraints are trivial or ill-posed. You want to maximise profit — without a constraint, just raise prices infinitely. The constraint (demand falls with price; production limited by capacity) is what makes the problem meaningful. The key skill in applied optimisation is translating the constraint into a mathematical equation, then using it to reduce the objective function to one variable.
Common Constraint Relationships
- Fixed perimeter/cost: Express one dimension in terms of the other. Fencing problems, packaging problems.
- Fixed volume: Express height in terms of base dimensions. Can and box problems.
- Geometric constraints: Pythagorean theorem, similar triangles, inscribed shapes.
- Economic constraints: Budget equations, resource limits, production functions.
Three Fully Worked Examples
Optimisation on Closed Intervals — The Extreme Value Theorem
On a closed interval [a,b], a continuous function always attains both its maximum and minimum values (Extreme Value Theorem). These must occur at either a critical point in (a,b) or at an endpoint. The procedure: find all critical points, evaluate f at each critical point and at a and b, compare all values. The largest value is the absolute maximum; the smallest is the absolute minimum.
A common error is forgetting to check endpoints. The function f(x) = x³ on [−1, 2] has no critical points in (−1, 2), so the extrema are entirely determined by the endpoints: minimum at f(−1) = −1, maximum at f(2) = 8.
When the Second Derivative Test Fails
If f''(c) = 0 at a critical point, the second derivative test is inconclusive. Use the first derivative test: check the sign of f' just before and just after c. This always works. Alternatively, if the problem has a physical context (you are minimising cost or maximising area), check whether your critical point is the only one in the domain — if so, and if you are told an optimum exists, that critical point must be it (a technique called the "physical argument").
- Stewart, J. (2015). Calculus, §4.7. Cengage.
- Nocedal, J. & Wright, S. (2006). Numerical Optimization. Springer.
- Boyd, S. & Vandenberghe, L. (2004). Convex Optimization. Cambridge UP.