Applied optimization
“…nothing at all takes place in the universe in which some rule of the maximum or minimum does not appear.”
The derivative cannot choose the model
A fencing problem may ask for the greatest area; a packaging problem may ask for the least material. Before differentiating, identify the quantity being optimized and the choices allowed. The same formula on a different domain can have a different best value, or no attained best value at all.
An objective function measures what we want to maximize or minimize. A constraint relates or restricts the choices. The feasible domain contains only choices that satisfy the problem’s requirements.
Example 1
A pen against a wall
There are \(40\text{ m}\) of fencing for three sides of a rectangular pen; the fourth side lies against a straight wall. Let \(x\) be each perpendicular side and \(y\) the fenced side parallel to the wall. Then
\[2x+y=40,\qquad A=xy.\]Use the constraint to remove \(y\):
\[A(x)=x(40-2x),\]with \(0<x<20\).
The strict inequalities require a pen with positive width and length.
Differentiate the area:
\[A^{\prime}(x)=40-4x.\]The only critical number is \(x=10\). The derivative is positive on \((0,10)\) and negative on \((10,20)\). Thus area increases all the way to this input and decreases all the way afterward: it is the absolute maximum on the feasible domain.
The dimensions are \(x=10\text{ m}\) and \(y=20\text{ m}\), giving \(A=200\text{ m}^2\). The endpoint limits are zero, consistent with a collapsed pen at either boundary.
The second derivative \(A^{\prime\prime}=-4\) would establish a local maximum, but the full-domain sign analysis explains why no other feasible pen does better.
Attention
A constraint can move the optimum
Suppose the pen’s depth is additionally limited to \(x\le8\text{ m}\). The old critical number \(10\) is now infeasible. Since \(A^{\prime}>0\) throughout \(0<x\le8\), the best allowed design has \(x=8\) and \(y=24\), with area \(192\text{ m}^2\). A boundary introduced by the problem can determine the answer.
A reusable modelling sequence
- Name the objective and define variables with units.
- Write the constraints and eliminate variables where possible.
- State the feasible domain before solving derivative equations.
- Find interior critical numbers and assess boundaries as appropriate.
- Justify the best value globally and translate it back to the requested design.
A stationary point is a candidate. A global comparison makes it a solution to the design problem.
Example 2
Cutting an open box
Remove squares of side \(x\) from the four corners of a \(12\text{ cm}\) square sheet, then fold up its sides. The resulting box has height \(x\) and base sides \(12-2x\). Therefore
\[V(x)=x(12-2x)^2,\]with \(0<x<6\).
Differentiate using the product and chain rules:
\[\begin{aligned} V^{\prime}(x)&=(12-2x)^2\\ &\quad-4x(12-2x)\\ &=(12-2x)(12-6x). \end{aligned}\]The roots are \(2\) and \(6\), but \(6\) is excluded and gives a collapsed base. The derivative is positive on \((0,2)\) and negative on \((2,6)\). Thus the unique global maximum occurs at \(x=2\).
The box is \(8\times8\times2\text{ cm}\), with volume \(128\text{ cm}^3\). The limiting volume at either excluded endpoint is zero.
Example 3
A closed cylinder with the least surface area
A closed cylindrical container holds \(54\pi\text{ cm}^3\). Assume uniform material thickness and ignore seams and waste, so the material used is proportional to the surface area. Minimize that area.
For radius \(r>0\) and height \(h>0\),
\[\pi r^2h=54\pi,\] \[S=2\pi r^2+2\pi rh.\]The constraint gives \(h=54/r^2\), so
\[\begin{aligned} S(r)&=2\pi r^2+\frac{108\pi}{r},\\ S^{\prime}(r)&=\frac{4\pi(r^3-27)}{r^2}. \end{aligned}\]The denominator is positive. The numerator changes from negative to positive at \(r=3\), giving a global minimum on \(r>0\). The required height is \(h=6\text{ cm}\), and the minimum area is \(54\pi\text{ cm}^2\).
The area tends to infinity as \(r\to0^+\) and as \(r\to+\infty\). Very narrow containers need a large side area; very wide ones need large ends. The optimal design balances these costs.
Warning
On an open or unbounded domain, the extreme-value theorem is not an existence guarantee. For example, minimizing \(1/x\) over \(x>0\) has no solution: its values approach zero without attaining it. Report an attained design only after establishing that one exists.