CALCULUS 1 • APPLICATIONS OF DERIVATIVES: ANALYTICAL

Solving Optimization Problems

Use derivatives to find the maximum or minimum values that make real-world designs as efficient as possible.

Historical Context & Motivation

People have been searching for the "best" solution to practical problems for thousands of years. Ancient architects wanted to enclose the largest area with a fixed amount of fencing, and merchants sought the most profitable way to fill a cargo ship. These are optimization problems — situations where you want to maximize or minimize some quantity subject to certain constraints. Before calculus, solving these problems required clever geometric tricks or exhaustive trial-and-error. The invention of calculus gave us a systematic, powerful method for finding exact optimal values.

~300 BCE
Euclid's Geometric Extremes
Euclid proved that among all rectangles with the same perimeter, the square encloses the greatest area — one of the earliest known optimization results, solved purely with geometry.
1662
Fermat's Method of Adequality
Pierre de Fermat developed a technique called adequality to find where a function reaches its maximum or minimum. His idea — setting a small change in the function equal to zero — foreshadowed the modern derivative.
1684
Leibniz Publishes Calculus
Gottfried Wilhelm Leibniz published his work on differential calculus, providing the notation and framework (dy/dx) that made optimization problems solvable through a clear, repeatable process.
1740s
Euler's Applied Optimization
Leonhard Euler applied calculus-based optimization to physics and engineering, solving problems about the shapes of beams, the paths of projectiles, and the most efficient designs of structures.
Modern Era
Optimization Everywhere
Today, optimization powered by calculus drives everything from GPS route planning to machine learning algorithms and spacecraft trajectory design. The core idea remains the same: set the derivative equal to zero.

The central question this lesson addresses is: given a real-world scenario with constraints, how do you use derivatives to find the absolute best outcome? By the end, you will have a systematic strategy that works for a wide range of optimization problems.

Core Principles of Optimization

Every optimization problem boils down to the same core structure. You have a quantity you want to make as large or as small as possible — the objective function. You also have restrictions, called constraints, that limit the values your variables can take. The strategy is to use the constraint to rewrite the objective function in terms of a single variable, then use calculus to find its extreme value. Understanding this structure is the key to solving any optimization problem you encounter.

1

Identify the Objective

Determine what quantity you need to maximize or minimize. This becomes your objective function. Examples include area, volume, cost, distance, or time.
2

Write the Constraint

Express the given limitation as an equation. A constraint like "the total perimeter is 100 ft" gives you a relationship between variables that you can use to eliminate one of them.
3

Reduce to One Variable

Substitute the constraint into the objective function so it depends on only one variable. This is the critical algebraic step that makes calculus applicable.
4

Find Critical Points

Take the derivative of the single-variable function, set it equal to zero, and solve. The solutions are critical points — candidates for the optimal value.
5

Verify & Interpret

Use the first or second derivative test to confirm whether each critical point is a maximum or minimum. Then check endpoints of the domain if the interval is closed.
KEY TAKEAWAY
Think of optimization like adjusting the volume dial on a speaker. The constraint is the dial's range — it can only go from 0 to 10. The objective is the sound quality, which peaks somewhere in that range. Calculus tells you the exact setting where quality is at its best, instead of you having to test every position one by one.

Visualizing the Optimization Process

To see how optimization works graphically, consider the classic problem: you have 60 meters of fencing and want to enclose the largest possible rectangular area against a wall (so only three sides need fencing). If the side perpendicular to the wall has length x, then the side parallel to the wall has length 60 − 2x, giving an area function A(x) = x(60 − 2x). The diagram below shows this parabola and its maximum.

The parabola A(x) = x(60 − 2x) opens downward. The pink dot marks the vertex at x = 15, where the area reaches its maximum of 450 m². Notice that A'(15) = 0 and A''(15) < 0, confirming a maximum by the second derivative test.

The graph tells a clear story. As x increases from 0, the enclosed area grows, reaches a peak, then decreases again until it hits zero at x = 30. The derivative A'(x) equals zero at exactly x = 15, which is the critical point. Since the parabola opens downward (the coefficient of x² is negative), this critical point must be a maximum. This visual intuition matches the algebraic verification using the second derivative.

Mathematical Framework

The mathematical backbone of optimization rests on a key theorem from calculus: if a continuous function on a closed interval has a maximum or minimum at an interior point, the derivative at that point must be zero (or undefined). This gives us the tools below.

CRITICAL POINT CONDITION
f'(x) = 0 or f'(x) is undefined
A critical point occurs where the derivative is zero or does not exist. These are the only candidates for local maxima or minima on the interior of a domain.
SECOND DERIVATIVE TEST
If f'(c) = 0 and f''(c) < 0, then f has a local maximum at x = c. If f'(c) = 0 and f''(c) > 0, then f has a local minimum at x = c.
The sign of the second derivative tells you the concavity of the curve. Concave down (f'' < 0) means a hilltop (maximum); concave up (f'' > 0) means a valley (minimum).
CLOSED INTERVAL METHOD
Absolute extrema of f on [a, b]: 1. Find all critical points in (a, b). 2. Evaluate f at each critical point and at the endpoints a and b. 3. The largest value is the absolute maximum; the smallest is the absolute minimum.
When the domain is a closed interval, the Extreme Value Theorem guarantees both an absolute max and an absolute min exist. Always check the endpoints — the optimal answer could occur at a boundary.
⚠️ Common Mistake
Don't forget to determine the feasible domain before differentiating. Physical quantities like length, area, and volume must be non-negative, which restricts x to an interval. If you ignore this, you might end up with a critical point that doesn't make sense in context — like a negative length.

Step-by-Step Strategy & Common Scenarios

Optimization problems come in many flavors — maximizing area, minimizing material, shortest distance, least cost — but they all follow the same general strategy. The diagram below shows the decision flowchart you should mentally walk through every time you face an optimization problem.

The seven-step optimization flowchart. Each colored node represents a phase: from reading the problem (amber) through interpreting the final answer (red). Notice that step 4 — reducing to a single variable — is often the most challenging algebraic step.
Common optimization problem types and their setup
Scenario TypeObjective FunctionTypical Constraint
Maximize area (fencing)A = length × widthFixed perimeter
Minimize surface area (box)S = 2lw + 2lh + 2whFixed volume
Minimize material (open-top can)S = πr² + 2πrhFixed volume V = πr²h
Minimize distance to a pointD = √((x − a)² + (y − b)²)Point lies on a curve y = f(x)
Maximize revenueR = (price)(quantity)Demand function p(q)

Worked Example: Minimizing Material for an Open-Top Box

A manufacturer needs to build an open-top rectangular box with a square base that holds exactly 500 cm³ of product. What dimensions minimize the amount of cardboard used (i.e., minimize the surface area)?

Minimizing Surface Area of an Open-Top Box
1
Step 1 — Draw & LabelSketch a box with a square base of side length x and height h. Since the box is open on top, the surface consists of the base and four sides.
2
Step 2 — Write the Objective FunctionThe surface area we want to minimize is S = (area of base) + (area of 4 sides) = x² + 4xh.
S = x² + 4xh
3
Step 3 — Write the ConstraintThe volume must be 500 cm³. Since the base is a square with side x and height h, we have V = x²h = 500. Solving for h gives h = 500/x².
h = 500 / x²
4
Step 4 — Substitute to One VariableReplace h in the objective function: S(x) = x² + 4x · (500/x²) = x² + 2000/x. The feasible domain is x > 0.
S(x) = x² + 2000/x, x > 0
5
Step 5 — DifferentiateTake the derivative: S'(x) = 2x − 2000/x². Set it equal to zero: 2x − 2000/x² = 0, so 2x = 2000/x², which gives x³ = 1000, and therefore x = 10.
x = 10 cm
6
Step 6 — Second Derivative TestCompute S''(x) = 2 + 4000/x³. At x = 10: S''(10) = 2 + 4000/1000 = 2 + 4 = 6 > 0. Since the second derivative is positive, the critical point at x = 10 is a local minimum. Because this is the only critical point on (0, ∞) and S(x) → ∞ as x → 0⁺ and as x → ∞, it must also be the absolute minimum.
S''(10) = 6 > 0 → confirmed minimum
7
Step 7 — Find All Dimensions & InterpretWith x = 10, the height is h = 500/10² = 500/100 = 5 cm. The minimum surface area is S(10) = 10² + 2000/10 = 100 + 200 = 300 cm². So the optimal box has a 10 cm × 10 cm base and is 5 cm tall, using 300 cm² of cardboard.
Dimensions: 10 cm × 10 cm × 5 cm, Minimum S = 300 cm²

Tips, Strengths, and Common Pitfalls

Optimization with calculus is incredibly powerful, but students frequently trip over the same handful of mistakes. The table below contrasts good habits with common errors so you can avoid them.

Comparison of good optimization habits and common pitfalls
Good Practice ✓Common Pitfall ✗
Draw a clear, labeled diagram before writing any equations.Jumping straight to algebra without visualizing the problem.
Determine the feasible domain (e.g., x > 0, x < 30) based on physical constraints.Ignoring the domain and accepting negative or impossibly large answers.
Verify with the second derivative test or endpoint check.Assuming a critical point is automatically the answer without confirmation.
Re-read the question to confirm whether you need a max or min.Finding a minimum when the problem asks for a maximum, or vice versa.
State the final answer in a complete sentence with units.Giving only the x-value of the critical point without computing the optimized quantity.
KEY TAKEAWAY
Think of solving an optimization problem like using a GPS. The constraint is like the road network — it limits where you can go. The objective function is your travel time. Calculus acts as the GPS algorithm, scanning every possible route (every x-value in the domain) and pinpointing the exact one that minimizes your time. Without calculus, you'd have to try each route one by one.

Connection to Advanced Optimization

The single-variable optimization you learn in Calculus 1 is the foundation for a vast landscape of more advanced techniques. In Calculus 3, you will optimize functions of two or more variables using partial derivatives and Lagrange multipliers — a method that handles constraints without substitution. In linear algebra and operations research, linear programming optimizes linear objective functions under linear constraints. Machine learning relies on gradient descent, which extends the idea of following the derivative to find a minimum — except with millions of variables.

Calculus 1 optimization versus advanced optimization techniques
FeatureCalculus 1 OptimizationAdvanced Optimization
Number of variablesOne (after substitution)Two or more, possibly millions
Constraint handlingSubstitute constraint into objectiveLagrange multipliers, penalty methods
Finding critical pointsSolve f'(x) = 0 algebraicallySolve systems of equations or use iterative algorithms
VerificationSecond derivative test, endpoint checkHessian matrix, bordered Hessian, computational checks
Typical applicationGeometry, basic engineeringMachine learning, economics, logistics

The good news is that every advanced technique is built on the same core idea you are mastering right now: set the rate of change to zero and check what kind of extreme point you've found. Master this principle in one variable, and the multi-variable versions will feel like natural extensions.

Practice Problems

PROBLEM 1CONCEPTUAL
Explain in your own words why, in an optimization problem, we set the derivative of the objective function equal to zero. What does the derivative being zero tell us about the graph of the function at that point?
PROBLEM 2BASIC CALCULATION
A farmer has 200 meters of fencing and wants to enclose a rectangular area along a straight river (no fencing needed on the river side). Let x be the width (perpendicular to the river). Write the area function A(x), find the critical point, and determine the maximum area.
PROBLEM 3INTERMEDIATE
An open-top cylindrical can must hold 1,000 cm³ of liquid. The surface area is S = πr² + 2πrh (base plus lateral surface). Find the radius r and height h that minimize the surface area.
PROBLEM 4APPLIED
A company sells handmade candles. Market research shows that if the price per candle is p dollars, the number of candles sold per month is q = 300 − 5p. Each candle costs $12 to make. Find the price that maximizes monthly profit.
PROBLEM 5CRITICAL THINKING
A wire of length L is cut into two pieces. One piece is bent into a square and the other into a circle. How should the wire be cut to minimize the total area enclosed by both shapes? Is there a cut that maximizes the total area? Justify your reasoning by analyzing the behavior of the total area function on its entire domain.

Lesson Summary

Solving optimization problems is one of the most practical applications of calculus. Every problem follows the same pattern: identify the objective function (what you want to maximize or minimize), write the constraint equation (the given limitation), and use substitution to reduce everything to a single-variable function. Then take the derivative, set it equal to zero to find critical points, and confirm your answer using the second derivative test or by checking endpoints.

Remember the key steps: draw a diagram, label all variables, write your equations, reduce to one variable, differentiate, solve, verify, and always interpret your answer in context with units. Whether you're minimizing material for a box, maximizing the area of a fence, or finding the most profitable price point, the strategy is the same. This framework connects directly to advanced topics like Lagrange multipliers and gradient descent that power modern engineering and data science.

Varsity Tutors • Calculus 1 • Solving Optimization Problems