4.7 Optimization Problems

Intuition (The Geometry of Optimization).

Optimization translates geometric or physical constraints into the language of differential calculus. By expressing a quantity of interest as a single-variable function subject to bounded or physical domains, the Fermat interior extremum principle (f′⁢(x)=0f^{\prime}(x)=0) and monotonicity analysis reveal maximal configurations and fundamental analytic inequalities.

Example 4.7.1 (Isoperimetric Problem for Rectangles).

A rod of fixed length 2020 is bent to form the perimeter of a rectangle with dimensions x≥0x\geq 0 and y≥0y\geq 0. Find the dimensions that maximize the enclosed area.

Solution.

The perimeter constraint is given by

2⁢(x+y)=20⟹x+y=10⟹y=10−x.2(x+y)=20\implies x+y=10\implies y=10-x.

Since both dimensions must be non-negative, the permissible domain for the width xx is the closed interval [0,10][0,10]. The enclosed area function A:[0,10]→ℝA\colon[0,10]\to\mathbb{R} is

A⁢(x)=x⁢y=x⁢(10−x)=10⁢x−x2.A(x)=xy=x(10-x)=10x-x^{2}.

Differentiating with respect to xx via the product rule:

A′⁢(x)=(x)′⁢(10−x)+x⁢(10−x)′=1⁢(10−x)+x⁢(−1)=10−2⁢x.A^{\prime}(x)=(x)^{\prime}(10-x)+x(10-x)^{\prime}=1(10-x)+x(-1)=10-2x.

Setting the derivative equal to zero to find the critical points:

A′⁢(x)=0⇔10−2⁢x=0⇔x=5.A^{\prime}(x)=0\iff 10-2x=0\iff x=5.

We construct the sign table for A′⁢(x)A^{\prime}(x) on the interval [0,10][0,10] in Figure 4.14.

A sign and variation table for an area function A. The
top row lists equidistant values: 0, 5, and 10. Row 2 lists the
signs of the derivative A': positive between 0 and 5, 0 at 5, and
negative between 5 and 10. Row 3 shows the variation of A: an upward
arrow representing an increase from 0 to the local maximum A(5) at x
= 5, followed by a downward arrow representing a decrease towards
10.
Figure 4.14: Sign table for the area function AA.

Since A′⁢(x)>0A^{\prime}(x)>0 on (0,5)(0,5) and A′⁢(x)<0A^{\prime}(x)<0 on (5,10)(5,10), the first derivative test guarantees that x=5x=5 achieves the absolute maximum:

maxx∈[0,10]⁡A⁢(x)=A⁢(5)=5⁢(10−5)=25.\max_{x\in[0,10]}A(x)=A(5)=5(10-5)=25.

Substituting back into the constraint yields y=10−5=5y=10-5=5. Thus, the maximum area is attained when the rectangle transforms into a square with side lengths x=y=5x=y=5. ∎

Example 4.7.2 (Calculus Proof of the AM–GM Inequality for Two Variables).

Suppose a,b≥0a,b\geq 0. Prove the Arithmetic Mean–Geometric Mean (AM–GM) inequality:

a+b2≥a⁢b,\frac{a+b}{2}\geq\sqrt{ab},

with equality holding if and only if a=ba=b.

Proof via Single-Variable Calculus.

Without loss of generality, assume 0≤a≤b0\leq a\leq b. If a=0a=0, the inequality simplifies to b/2≥0b/2\geq 0, which holds trivially. Hence, we may assume a>0a>0.

To show that a+b2−a⁢b≥0\frac{a+b}{2}-\sqrt{ab}\geq 0, consider the auxiliary function f:[a,∞)→ℝf\colon[a,\infty)\to\mathbb{R} defined by

f⁢(x)≔a+x2−a⁢x.f(x)\coloneqq\frac{a+x}{2}-\sqrt{ax}.

Differentiating ff with respect to xx for x≥ax\geq a:

f′⁢(x)=(a+x2)′−(a⁢x)′=12−12⁢(a⁢x)−1/2⋅(a⁢x)′=12−a2⁢a⁢x=12⁢(1−ax)=x−a2⁢x.\begin{split}f^{\prime}(x)&{}=\left(\frac{a+x}{2}\right)^{\prime}-(\sqrt{ax})^% {\prime}\\ &{}=\frac{1}{2}-\frac{1}{2}(ax)^{-1/2}\cdot(ax)^{\prime}\\ &{}=\frac{1}{2}-\frac{a}{2\sqrt{ax}}\\ &{}=\frac{1}{2}\left(1-\frac{\sqrt{a}}{\sqrt{x}}\right)=\frac{\sqrt{x}-\sqrt{a% }}{2\sqrt{x}}.\end{split}

Multiplying the numerator and denominator by the conjugate (x+a)(\sqrt{x}+\sqrt{a}), we may also express the derivative as

f′⁢(x)=x−a2⁢x⁢(x+a).f^{\prime}(x)=\frac{x-a}{2\sqrt{x}(\sqrt{x}+\sqrt{a})}.

We analyze the sign of f′⁢(x)f^{\prime}(x) on [a,∞)[a,\infty) in Figure 4.15.

A sign and variation table for a function f. The top row lists equidistant values: a and infinity. Row 2 lists the signs of the derivative f': 0 at a, and positive between a and infinity. Row 3 shows the variation of f starting at f(a) under a, followed by a long upward arrow pointing towards infinity.
Figure 4.15: Sign table for the function ff on [a,∞)[a,\infty).

For all x>ax>a, we have x−a>0x-a>0, whence f′⁢(x)>0f^{\prime}(x)>0. Therefore, ff is strictly increasing on [a,∞)[a,\infty), implying that ff attains its unique absolute minimum at x=ax=a:

f⁢(x)≥f⁢(a)=a+a2−a2=a−a=0for all ⁢x≥a.f(x)\geq f(a)=\frac{a+a}{2}-\sqrt{a^{2}}=a-a=0\quad\text{for all }x\geq a.

In particular, choosing x=b≥ax=b\geq a yields

f⁢(b)≥0⇔a+b2−a⁢b≥0⇔a+b2≥a⁢b.f(b)\geq 0\iff\frac{a+b}{2}-\sqrt{ab}\geq 0\iff\frac{a+b}{2}\geq\sqrt{ab}.

Equality holds if and only if b=ab=a. ∎

Remark 4.7.3 (Algebraic Alternative).

The two-variable case admits an immediate algebraic verification by expanding the non-negative square:

(a−b)2≥0⇔a−2⁢a⁢b+b≥0⇔a+b2≥a⁢b.(\sqrt{a}-\sqrt{b})^{2}\geq 0\iff a-2\sqrt{ab}+b\geq 0\iff\frac{a+b}{2}\geq% \sqrt{ab}.

The variational calculus perspective developed above, however, extends naturally to higher dimensions.


Exercise 4.7.4 (Three-Variable AM–GM Inequality).

Show that for all non-negative real numbers a,b,c≥0a,b,c\geq 0,

a+b+c3≥a⁢b⁢c3.\frac{a+b+c}{3}\geq\sqrt[3]{abc}.
Hint.

Fix a,b≥0a,b\geq 0 and define either the auxiliary function

f⁢(x)≔a+b+x3−a⁢b⁢x3for ⁢x≥0,f(x)\coloneqq\frac{a+b+x}{3}-\sqrt[3]{abx}\quad\text{for }x\geq 0,

or its cubic variant g⁢(x)≔1x⁢(a+b+x3)3−a⁢bg(x)\coloneqq\frac{1}{x}\left(\frac{a+b+x}{3}\right)^{3}-ab, and establish the minimum using calculus. ∎

Exercise 4.7.5 (General AM–GM Inequality).

Prove by mathematical induction, or via variational calculus, that for any finite collection of non-negative real numbers a1,a2,…,an≥0a_{1},a_{2},\dots,a_{n}\geq 0,

a1+a2+⋯+ann≥(a1⁢a2⁢⋯⁢an)1/n,\frac{a_{1}+a_{2}+\cdots+a_{n}}{n}\geq(a_{1}a_{2}\cdots a_{n})^{1/n},

with equality holding if and only if a1=a2=⋯=ana_{1}=a_{2}=\cdots=a_{n}.