Chapter 4: Applications of Derivatives
4.7 Applied Optimization Problems
Study guide for Calculus Volume 1 (Gilbert Strang, 2016 edition)
Independent study guide. Not affiliated with OpenStax or Rice University.
Big idea
The machinery for finding extreme values is already built. What remains is the translation: taking a situation described in words and producing a single function of a single variable whose maximum or minimum answers the question. That translation is where nearly all the difficulty in these problems lives, and it is a skill separate from differentiating.
Every one of these problems has the same two ingredients. There is an objective, the quantity you want to make as large or as small as possible, and there is a constraint, a relation that the variables must satisfy. The objective usually starts out with two variables in it. The constraint lets you solve for one in terms of the other and substitute, collapsing the objective to one variable.
Once you have one variable, you also have a domain, and the domain is not an afterthought. Lengths cannot be negative, a cut cannot exceed half the sheet, and those restrictions decide which critical points are admissible and whether the endpoints need checking. Many wrong answers come from a correct derivative evaluated at a value the geometry forbids.
Finally, decide the question you actually asked. A problem asking for the dimensions wants lengths, not the value of the objective; a problem asking for the largest area wants a number with square units. State the conclusion in the language of the original situation.
Decoder
Write the quantity to be optimized as a function of one variable, restrict it to the domain the situation allows, and then find the absolute extremum of that function on that domain.
The first clause is the modelling step, and the constraint is the tool that makes it possible. The second clause is often skipped and should not be: the interval you are optimizing over is part of the problem statement even when the words do not mention it.
The third clause is a specific request. You want an absolute extremum, not merely a local one, so a critical point is not by itself an answer. When the domain is a closed interval, evaluate at the critical points and the endpoints and compare, which needs no test at all. When the domain is open, use the sign of the first derivative across the whole interval, or the second derivative at the critical point, to argue that the single candidate really is the global answer.
The classic mistake is substituting the constraint in the wrong direction and ending up optimizing the constraint rather than the objective. A quick check prevents it: after substitution, the function you are about to differentiate should be the thing the problem asked to make large or small, and it should change when the variable changes.
Definitions and results
Objective function. The quantity to be maximized or minimized, written as a formula. Name it with a letter that reminds you of its meaning, such as $A$ for area or $C$ for cost.
Constraint equation. A relation the variables must satisfy for reasons of geometry, budget or physics. Solve it for one variable and substitute into the objective.
Reduction to one variable. After substitution the objective is a function of a single variable. Only now is it something calculus can handle.
The feasible domain. The set of inputs the situation permits, usually determined by requiring every length, area and quantity in the picture to be positive. Write it down before differentiating.
Closed interval case. If the feasible domain is a closed bounded interval and the objective is continuous, evaluate at every critical point inside and at both endpoints, then compare. The comparison settles the matter with no test.
Open interval case. If the domain is open or unbounded and there is exactly one critical point, you must argue that it is global. The cleanest arguments are: the derivative changes sign once, from positive to negative for a maximum or negative to positive for a minimum; or the second derivative has the appropriate sign throughout the interval.
Degenerate endpoints. Endpoints often correspond to degenerate configurations, such as a rectangle with zero width, where the objective takes an obviously extreme and uninteresting value. That is a sign your model is right, and it also rules those endpoints out as answers.
Reporting. Give the quantity asked for, with units, and give the dimensions that achieve it if the problem asked for a design.
Worked examples
The largest field against a river
You have $400$ m of fencing and want to enclose a rectangular field along a straight river, with no fence needed on the river side. What dimensions give the largest area?
Let $x$ be the length of each of the two sides perpendicular to the river and $y$ the length of the side parallel to it. The constraint is the fencing used, $2x + y = 400$, so $y = 400 - 2x$. The objective is the area:
$$ A(x) = x(400 - 2x) = 400x - 2x^{2} $$
The feasible domain is $0 \le x \le 200$, since both $x$ and $y$ must be at least zero. Differentiate:
$$ A'(x) = 400 - 4x = 0 \qquad \Longrightarrow \qquad x = 100 $$
Compare the three candidates: $A(0) = 0$, $A(100) = 100(200) = 20000$, $A(200) = 0$. The largest area is $20000$ m$^2$, achieved with the two perpendicular sides $100$ m each and the side along the river $200$ m. The degenerate endpoints give zero area, as they should.
A box from a square sheet
A square sheet of cardboard $24$ in on a side has equal squares cut from the corners, and the flaps are folded up to make an open box. What cut size gives the largest volume?
Let $x$ be the side of the cut square. The height is $x$ and the base is a square of side $24 - 2x$, so
$$ V(x) = x(24-2x)^{2} $$
on the domain $0 \le x \le 12$. Differentiate with the product and chain rules, then factor:
$$ V'(x) = (24-2x)^2 + x\cdot 2(24-2x)(-2) = (24-2x)\big[(24-2x) - 4x\big] = (24-2x)(24-6x) $$
The zeros are $x = 12$, which is the degenerate endpoint, and $x = 4$. Compare: $V(0) = 0$, $V(4) = 4(16)^2 = 1024$, $V(12) = 0$. The maximum volume is $1024$ in$^3$, from a $4$ in cut, giving a box $16$ in by $16$ in by $4$ in.
Check by testing nearby cuts: $V(3) = 3(18)^2 = 972$ and $V(5) = 5(14)^2 = 980$, both smaller.
The cheapest can
A cylindrical can must hold $500$ cm$^3$. What radius and height use the least metal?
Let $r$ be the radius and $h$ the height. The constraint is the volume, $\pi r^2 h = 500$, so $h = 500/(\pi r^2)$. The objective is the total surface area of top, bottom and side:
$$ S = 2\pi r^2 + 2\pi r h = 2\pi r^2 + 2\pi r\cdot\frac{500}{\pi r^{2}} = 2\pi r^{2} + \frac{1000}{r} $$
The domain is $r > 0$, an open interval, so compare against the ends by behavior: $S \to \infty$ both as $r \to 0^{+}$ and as $r \to \infty$. Differentiate:
$$ S'(r) = 4\pi r - \frac{1000}{r^{2}} = 0 \qquad \Longrightarrow \qquad 4\pi r^{3} = 1000 \qquad \Longrightarrow \qquad r^{3} = \frac{250}{\pi} $$
So $r = \sqrt[3]{250/\pi} \approx 4.30$ cm. Since $S''(r) = 4\pi + 2000/r^{3}$ is positive for every $r > 0$, the function is concave up on the whole domain and this single critical point is the absolute minimum.
The height is worth computing exactly. From $\pi r^3 = 250$ we get $\pi r^2 = 250/r$, so
$$ h = \frac{500}{\pi r^{2}} = \frac{500r}{250} = 2r $$
The cheapest can is as tall as it is wide, about $4.30$ cm in radius and $8.60$ cm tall, using about $349$ cm$^2$ of metal. That $h = 2r$ relation holds for any target volume, which is the kind of result worth remembering.
The nearest point on a curve
Find the point on the parabola $y = x^2$ closest to $(0,3)$.
The objective is distance, but minimizing the square of the distance gives the same location and avoids a root, because squaring is increasing on nonnegative numbers. With $y = x^2$ as the constraint,
$$ D(x) = x^{2} + (x^{2} - 3)^{2} $$
Substitute $u = x^2$, with $u \ge 0$, to get $g(u) = u + (u-3)^2 = u^2 - 5u + 9$. Then $g'(u) = 2u - 5 = 0$ at $u = 5/2$, and $g''(u) = 2 > 0$, so this is the minimum.
Therefore $x = \pm\sqrt{5/2}$, and the two closest points are $\big(\pm\sqrt{5/2},\ 5/2\big)$, roughly $(\pm 1.58, 2.5)$. The minimum squared distance is $g(5/2) = 25/4 - 25/2 + 9 = 11/4$, so the distance is $\sqrt{11}/2 \approx 1.66$. Compare with the vertex: the distance from $(0,0)$ to $(0,3)$ is $3$, so the answer is genuinely closer, as it must be.
Practice
These drills run the full modelling cycle: name the variables, write the constraint, reduce the objective to one variable, find the feasible domain, and produce the extreme value together with the dimensions that achieve it.
Practice
Generated problems for this section, graded instantly.
Quiz
Five items on building the objective, using the constraint, choosing the right domain, and confirming that a critical point gives the absolute extremum.
Quiz
5 problems with a score at the end.