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

Classic Example — Maximum Area

Example — Minimum Cost Box

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.

Core Method

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

Three Fully Worked Examples

Example 1 Maximum Area Rectangle — Fixed Perimeter
ProblemFind the rectangle with perimeter 120m that has maximum area.
ObjectiveMaximise A = l·w.
Constraint2l + 2w = 120, so l = 60 − w.
SubstituteA(w) = (60−w)w = 60w − w².
DifferentiateA'(w) = 60 − 2w = 0 → w = 30. A''(w) = −2 < 0 → maximum confirmed.
Answerl = w = 30m (a square). Max area = 900 m². The isoperimetric principle: among all rectangles, the square has the largest area for a given perimeter.
Example 2 Minimum Surface Area Can
ProblemDesign a cylindrical can with volume 500 cm³ that uses the least material (minimum surface area).
ObjectiveMinimise S = 2πr² + 2πrh (top + bottom + side).
Constraintπr²h = 500 → h = 500/(πr²).
SubstituteS(r) = 2πr² + 2πr·500/(πr²) = 2πr² + 1000/r.
DifferentiateS'(r) = 4πr − 1000/r² = 0 → r³ = 250/π → r ≈ 4.30 cm.
Answerh = 500/(π·r²) ≈ 8.60 cm. Note h = 2r — the optimal can has height equal to diameter. This is why well-designed cans are roughly square in profile.

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").

Frequently Asked Questions
How do I know whether I found a max or min?
Three methods: (1) Second Derivative Test — f''(c) > 0 means minimum, < 0 means maximum. (2) First Derivative Test — check the sign of f' on either side of c. (3) For closed intervals, evaluate f at all critical points and endpoints and compare.
What if there is more than one constraint?
With multiple constraints, use the method of Lagrange multipliers (covered in multivariable calculus). For single-variable problems, extra constraints reduce the number of independent variables — use each constraint to eliminate one variable until you have a function of one variable to optimise.
Do I always differentiate the objective function?
Yes — but make sure the objective function is written in terms of a single variable first. The constraint(s) let you eliminate extra variables. The critical points of the resulting single-variable objective function give the candidates for the optimal solution.
← Previous
Applications of Derivatives
Next →
What is Integration? → Integrals Series
References & Further Reading
  • Stewart, J. (2015). Calculus, §4.7. Cengage.
  • Nocedal, J. & Wright, S. (2006). Numerical Optimization. Springer.
  • Boyd, S. & Vandenberghe, L. (2004). Convex Optimization. Cambridge UP.
AM
Dr. Aisha Malik, PhD Mathematics
Senior Lecturer in Applied Mathematics · 12 years teaching calculus at university level

Dr. Malik holds a PhD in Applied Mathematics from the University of Edinburgh and has taught calculus to over 4,000 students at both undergraduate and postgraduate level. Her research focuses on numerical methods for differential equations. She has reviewed this article for mathematical accuracy and pedagogical clarity.

Technically reviewed by: Prof. James Chen, Stanford Mathematics Department