Table of Contents
Understanding Optimization Problems
In this chapter you use derivatives to solve optimization problems: problems where something must be made as large or as small as possible, usually under some constraint.
Typical phrases that signal an optimization problem include:
- “maximize” or “minimize”
- “largest possible” or “smallest possible”
- “shortest distance”
- “least cost”, “greatest profit”, “maximum area”, etc.
The goal is to translate a word description into a function $f(x)$ and then choose $x$ so that $f(x)$ is as large or as small as possible on a given interval.
We will assume you already know what derivatives are and how to compute them; here we focus on how to set up and interpret optimization problems.
General Strategy for Solving Optimization Problems
Most single-variable optimization problems in calculus follow a standard pattern:
- Read and understand the problem.
Identify what quantity must be maximized or minimized (area, volume, cost, distance, etc.). - Choose a variable and draw a diagram (if helpful).
Pick a symbol (often $x$) for a key unknown quantity. A sketch with labels often clarifies relationships. - Express the quantity to optimize as a function.
- Write a formula for the quantity you’re optimizing in terms of one or more variables.
- Use given constraints (like fixed perimeter, fixed volume, fixed budget) to eliminate extra variables so you end up with a function of a single variable:
$$Q = f(x).$$ - Determine the domain.
Figure out for which $x$ values the problem makes sense (lengths must be nonnegative, dimensions must be positive, etc.). This gives you:
$$a \le x \le b \quad\text{or}\quad x > 0,\ \text{etc.}$$ - Find critical points.
Compute $f'(x)$ and find all $x$ in the domain where: - $f'(x) = 0$, or
- $f'(x)$ does not exist (but $f$ does).
- Test for maxima or minima.
Use one of the following (both rely on earlier derivative concepts): - First derivative test:
Examine the sign of $f'(x)$ just before and after each critical point. - If $f'$ changes from positive to negative → local maximum.
- If $f'$ changes from negative to positive → local minimum.
- Second derivative test:
If $f''(c)$ exists and $f'(c) = 0$: - $f''(c) > 0$ → local minimum at $x = c$.
- $f''(c) < 0$ → local maximum at $x = c$.
For problems on a closed interval $[a,b]$, you must also compare values at:
- the critical points in $(a,b)$, and
- the endpoints $x = a$ and $x = b$.
- Answer the original question in words.
State clearly: - which value of $x$ optimizes the quantity, and
- what the maximum or minimum value actually is (if asked).
Include units if the problem includes them.
Local vs Global Extrema in Optimization
Optimization problems in applications are usually about global (absolute) maxima or minima, not just local ones.
- A local maximum at $x = c$ means $f(c)$ is largest only near $c$.
- A global maximum at $x = c$ means $f(c)$ is larger than or equal to all other $f(x)$ values in the domain.
In practice:
- If you are optimizing on a closed and bounded interval $[a, b]$ and $f$ is continuous, then:
- A global max and a global min are guaranteed to exist.
- They occur either at critical points or at endpoints.
- If the domain is open or unbounded, a maximum or minimum may not exist, even if there are critical points.
Optimization problems usually have some physical, geometric, or practical constraint that effectively restricts the domain.
Common Types of Optimization Problems
Below are common patterns you will encounter, along with the key modeling idea for each. The calculus steps (taking derivatives, finding critical points, etc.) are the same; what changes is the function you build.
1. Geometric Optimization: Area and Perimeter
These problems involve shapes (rectangles, boxes, cylinders, etc.) where you maximize area or volume, or minimize perimeter, subject to constraints.
Example Pattern: Largest Area Rectangle with Fixed Perimeter
Suppose a rectangle has fixed perimeter $P$ and sides $x$ and $y$. Then:
- Perimeter constraint: $2x + 2y = P$.
- Area: $A = x y$.
Use the constraint to eliminate one variable:
$$y = \frac{P}{2} - x,\quad A(x) = x\left(\frac{P}{2} - x\right).$$
Then $A(x)$ is a quadratic function. To maximize $A$, you:
- find $A'(x)$,
- solve $A'(x) = 0$,
- check that this $x$ gives a maximum (e.g. $A''(x) < 0$ or first derivative test), and
- ensure $x$ lies in the allowed domain ($0 < x < P/2$).
A famous conclusion (which you should be able to derive) is that this rectangle is a square.
Example Pattern: Fencing Problems
You might be given:
- A fixed amount of fencing.
- Some side is along a river (no fence needed there).
- Possibly several adjacent pens.
You:
- Draw a diagram.
- Express the total fence length as a constraint equation.
- Express the area in terms of a single variable using that constraint.
- Maximize the area function with calculus.
2. Volume Optimization: Boxes and Containers
These problems involve maximizing the volume of a three-dimensional object given some material constraints.
Common Pattern: Open-Top Box from a Sheet
You start with a rectangular piece of material, cut equal squares of side $x$ from each corner, and fold up sides to form an open-top box.
- Base dimensions: $(L - 2x)$ by $(W - 2x)$.
- Height: $x$.
- Volume:
$$V(x) = x(L - 2x)(W - 2x).$$
The domain is limited by geometry: $0 < x < \min\{L/2,\, W/2\}$ so the dimensions remain positive.
Then you:
- Find $V'(x)$.
- Solve $V'(x) = 0$ in the domain.
- Use a derivative test to determine a maximum.
- State optimal $x$ and the maximum volume.
Other Container Problems
Similar structure appears with:
- Cylindrical cans with fixed surface area (minimize material for a given volume or maximize volume for a given surface area).
- Boxes with square bases.
- Tanks and silos with or without tops.
The key is always:
- Write the relevant geometric formulas (volume, surface area).
- Use constraints to reduce to one variable.
- Optimize that single-variable function.
3. Economic Optimization: Cost, Revenue, and Profit
In many applications, you want to:
- Minimize cost,
- Maximize revenue, or
- Maximize profit.
There is usually a demand relationship that connects price and quantity.
Basic Setup
Let:
- $q$ = quantity produced or sold.
- $R(q)$ = revenue function (often $R(q) = p(q)\,q$ where $p(q)$ is price).
- $C(q)$ = cost function.
- $P(q) = R(q) - C(q)$ = profit function.
To maximize profit, you:
- Differentiate: $P'(q)$.
- Solve $P'(q) = 0$ to find critical quantities.
- Check which give maxima.
Constraints might include maximum capacity, minimum orders, or nonnegative quantities ($q \ge 0$).
These problems do not usually require drawing physical diagrams but do require careful interpretation of functions and domains.
4. Distance and Shortest Path Problems
These problems ask for the shortest distance between a moving point and some fixed object, or for a path that minimizes distance or time.
Common Pattern: Shortest Distance to a Point or Line
Often you express the distance between objects as a function of a single variable.
For example, suppose a point $P$ moves along the $x$-axis and you want the minimal distance to a fixed point $Q$.
If $P(x, 0)$ and $Q$ has fixed coordinates $(a, b)$, the distance is:
$$D(x) = \sqrt{(x - a)^2 + b^2}.$$
Since the square root is an increasing function for positive inputs, minimizing $D(x)$ is equivalent to minimizing:
$$D^2(x) = (x - a)^2 + b^2,$$
which is often easier to differentiate.
So you:
- Work with $D^2(x)$ instead of $D(x)$.
- Find $(D^2)'(x)$ and set it to zero.
- Ensure the solution is in the allowed domain.
Shortest Time Problems
If speed is constant on each part of a path, then:
$$\text{time} = \frac{\text{distance}}{\text{speed}}.$$
For multiple segments with different speeds, total time is a sum of such fractions. Express that total time as a function of one variable and minimize using derivatives.
Working with Constraints and Domains
In real optimization problems, constraints are crucial. They:
- Restrict the possible values of your variable.
- Often determine whether a maximum/minimum actually exists.
Types of Constraints
- Physical constraints
- Lengths, areas, volumes must be nonnegative.
- Dimensions must be strictly positive to represent real objects.
- Resource constraints
- Limited material (e.g., fixed perimeter or surface area).
- Budget limits.
- Problem-specific constraints
- The object must fit in a given space.
- Angles or positions are limited by design.
Finding the Domain
For a function $f(x)$ from your model:
- Check the algebraic domain (where the formula makes sense).
- Then intersect with the practical domain from the context.
For example, for $V(x) = x(L - 2x)(W - 2x)$:
- Algebraic domain: any real $x$.
- Practical domain: $0 < x < \min\{L/2,\, W/2\}$.
When optimizing on a closed interval $[a,b]$:
- Always compute $f(a)$ and $f(b)$ as well as $f$ at critical points in $(a,b)$.
- Then choose the largest or smallest among those values.
Choosing and Testing Critical Points
Once you have a function $f(x)$ and its derivative $f'(x)$, you must decide which critical points actually solve the problem.
First Derivative Test (Applied)
For each critical point $c$:
- Evaluate the sign of $f'(x)$ for values just to the left and right of $c$.
- If $f'$:
- changes from $+$ to $-$: local maximum.
- changes from $-$ to $+$: local minimum.
- does not change sign: neither (often a plateau or inflection point).
This is especially important if the domain is not closed or if your formula describes a broad range but only part of it makes practical sense.
Second Derivative Test (Applied)
If you know $f''(x)$, then for a critical point $c$ with $f'(c) = 0$:
- If $f''(c) > 0$ → $f$ is concave up near $c$ → local minimum.
- If $f''(c) < 0$ → $f$ is concave down near $c$ → local maximum.
If $f''(c) = 0$, this test is inconclusive; you may need the first derivative test or another method.
Endpoints
Do not forget endpoints when the domain is closed:
- Even if $f'(x)$ never equals $0$, the maximum or minimum can occur at the endpoints.
- Always compare the function values at:
- endpoints
- interior critical points
Common Pitfalls in Optimization
When solving optimization problems, watch out for these frequent mistakes:
- Not clearly identifying what to optimize.
Determine first: Are you maximizing area, volume, profit, or something else? - Using too many variables.
Always aim to express the quantity to be optimized as a function of one variable, using constraints to eliminate others. - Ignoring the domain.
Solutions where dimensions are negative, or where a length exceeds some limit, are not physically meaningful even if they come from solving $f'(x)=0$. - Forgetting endpoints.
On a closed interval, endpoints must be checked along with critical points. - Misinterpreting the result.
- Label your answer: “The rectangle should be … by …” or “The maximum profit is …”.
- Include units (meters, dollars, seconds, etc.) if present.
- Assuming any critical point is a maximum or minimum.
Always verify using the first or second derivative test, or by comparing values.
Summary
Optimization with derivatives follows a consistent pattern:
- Translate a word problem into a function $f(x)$ that represents the quantity of interest.
- Use constraints to reduce to one variable and find the correct domain.
- Differentiate, find critical points, and use derivative tests (and possibly endpoint comparisons) to identify maxima or minima.
- Interpret the mathematical answer back in the language of the original problem, with correct units and context.
With practice, the main challenge becomes setting up the problem correctly; the calculus steps then follow the standard procedures you already know for derivatives.