← MATH 161 MathScape 0 MATH161

Solving Optimization Problems

5 min read

Jump to a section
Reference: Stewart §3.7

Textbook Reference

Primary source OpenStax Calculus Volume 1, Section 4.7: “Applied Optimization Problems”
Direct link https://openstax.org/books/calculus-volume-1/pages/4-7-applied-optimization-problems
Textbook used in class Stewart, Calculus, Section 3.7: “Optimization Problems”

Opening Scenario

This lesson picks up where the setup lesson ended. You have a single-variable function $f(x)$ on a domain $D$, and you want to find the value of $x$ in $D$ where $f$ is largest (or smallest). The method is just the Closed Interval Method or the derivative tests, applied to the setup function.

The new challenge is that optimization problems often have open or half-open domains (not closed intervals), so the Closed Interval Method does not always apply directly.


Quick Reference

If the domain is a closed interval $[a, b]$: use the Closed Interval Method.

  1. Find all critical numbers in $(a, b)$.
  2. Evaluate $f$ at the critical numbers and at $a$ and $b$.
  3. The largest value is the absolute maximum; the smallest is the absolute minimum.

If the domain is open (e.g., $(0, \infty)$) with only one critical number $c$:


Key Concepts

1. Completing the Box Problem

From the setup lesson: maximize $V(x) = 4x^3 - 48x^2 + 144x$ on $(0, 6)$.

Find critical numbers.

$V'(x) = 12x^2 - 96x + 144 = 12(x^2 - 8x + 12) = 12(x - 2)(x - 6)$.

$V'(x) = 0$ at $x = 2$ and $x = 6$.

Only $x = 2$ is in the open interval $(0, 6)$; $x = 6$ is the endpoint.

Classify $x = 2$.

The domain is open, so the Closed Interval Method does not apply directly. Use the Second Derivative Test (or reason about end behavior).

$V''(x) = 24x - 96$. $V''(2) = 48 - 96 = -48 < 0$.

Concave down at $x = 2$: the critical number is a local maximum.

Is it the absolute maximum? As $x \to 0^+$ and $x \to 6^-$: $V(0) = 0$ and $V(6) = 4(216) - 48(36) + 144(6) = 864 - 1728 + 864 = 0$. The volume approaches $0$ at both ends.

Since $V$ is positive on the interior (try $x = 2$: $V(2) = 4(8) - 48(4) + 144(2) = 32 - 192 + 288 = 128 > 0$) and the function vanishes at both endpoints, the single interior local maximum at $x = 2$ is the absolute maximum on $(0, 6)$.

Compute the maximum volume.

$V(2) = 2(12 - 4)^2 = 2 \cdot 64 = 128$ cubic inches.

Answer the question. Cut $x = 2$-inch squares from each corner. The maximum volume is $128$ cubic inches. The base dimensions are $8 \times 8$ inches and the height is $2$ inches.

Boxed answer: Maximum volume of $128 \text{ in}^3$ when $x = 2$ inches.


2. The Farmer’s Fence (Closed Domain)

From the setup lesson: maximize $A(w) = 150w - w^2$ on $(0, 150)$.

Note: the domain is open because the dimensions must be strictly positive. However, $A$ is a polynomial, so we can analyze it on the closed interval $[0, 150]$ (including the endpoints, even though they give zero area) and then interpret.

$A'(w) = 150 - 2w = 0 \Rightarrow w = 75$.

$A''(w) = -2 < 0$: the critical number $w = 75$ is a local (and absolute) maximum.

$A(75) = 150(75) - 75^2 = 11{,}250 - 5{,}625 = 5{,}625 \text{ m}^2$.

$l = 150 - 75 = 75$ m. The optimal enclosure is a square.

Boxed answer: Maximum area of $5{,}625 \text{ m}^2$ when $l = w = 75$ meters.

Recap. This problem’s objective is a downward-opening parabola with a single interior maximum. Many “maximize with a fixed perimeter” problems have this structure: the optimum is a square or circle (the most symmetric shape).


3. Verifying the Answer Makes Sense

After computing, always check:

Common misconception

“The only critical number must be the answer.” Not necessarily. If the domain is a closed interval, the endpoints might give larger values. If the domain is open and the function is not positive throughout (or not going to zero at the endpoints), a more careful comparison is needed. Always check the behavior at the boundary of the domain.


4. Using the First Derivative Test on an Open Domain

An alternative to the Second Derivative Test when the domain is open:

Reasoning. For the box problem, $V'(x) = 12(x-2)(x-6)$.

Interval $x-2$ $x-6$ $V'$
$0 < x < 2$ $-$ $-$ $+$
$2 < x < 6$ $+$ $-$ $-$

$V'$ goes from $+$ to $-$ at $x = 2$: the function increases then decreases. So $x = 2$ gives a local maximum, and since the function vanishes at both endpoints, it is the absolute maximum.

The First Derivative Test approach is often cleaner than the second derivative approach, especially when $f''$ is complicated.


Common Errors Summary

Error Example Correction
Applying Closed Interval Method to an open domain Evaluating $V(6)$ and claiming it competes for the maximum On an open domain, endpoint values are limits, not attained values; use derivative tests instead
Forgetting to answer the original question Reporting “the critical number is $x = 2$” State what $x$ represents physically, compute the optimal value, and state units
Finding a local min when asked for a max Checking $V''(c) > 0$ and concluding “the maximum is $V(c)$” $V''(c) > 0$ means a local minimum; $V''(c) < 0$ means a local maximum

Leveled Practice

Level 1 -- Finish a Given Setup

Problem 1. The objective function from the setup problem on the can is $C(r) = 1000/r + 2\pi r^2$ (with $c = 1$), for $r > 0$. Find the value of $r$ that minimizes $C$.

Show answer

$C'(r) = -1000/r^2 + 4\pi r$. Setting $C'(r) = 0$: $$4\pi r = \frac{1000}{r^2} \Rightarrow r^3 = \frac{1000}{4\pi} = \frac{250}{\pi}.$$

$r = \left(\dfrac{250}{\pi}\right)^{1/3}$.

$C''(r) = 2000/r^3 + 4\pi > 0$: concave up. So this is a local (and absolute) minimum on $(0, \infty)$.

Boxed answer: $r = (250/\pi)^{1/3} \approx 4.30$ cm minimizes the cost.


Level 2 -- Full Problem

Problem 2. A rancher wants to fence a rectangular pasture with an area of $800 \text{ m}^2$. The north and south sides use premium fencing at \$8 per meter; the east and west sides use standard fencing at \$5 per meter. Find the dimensions that minimize the total fencing cost.

Show answer

Let the north/south sides have length $l$ (horizontal, expensive) and the east/west sides have length $w$ (vertical, cheap).

Objective: minimize cost $C = 2 \cdot 8l + 2 \cdot 5w = 16l + 10w$.

Constraint: $lw = 800$, so $l = 800/w$.

$C(w) = 16 \cdot (800/w) + 10w = 12800/w + 10w$.

$C'(w) = -12800/w^2 + 10 = 0 \Rightarrow w^2 = 1280 \Rightarrow w = \sqrt{1280} = 16\sqrt{5}$.

$l = 800/w = 800/(16\sqrt{5}) = 50/\sqrt{5} = 10\sqrt{5}$.

$C''(w) = 25600/w^3 > 0$: minimum.

Boxed answer: East/west sides $w = 16\sqrt{5} \approx 35.8$ m; north/south sides $l = 10\sqrt{5} \approx 22.4$ m. Minimum cost: $C = 12800/(16\sqrt{5}) + 10 \cdot 16\sqrt{5} = 800/\sqrt{5} + 160\sqrt{5} = 160\sqrt{5} + 160\sqrt{5} = 320\sqrt{5} \approx \$715$.


Mastery Checklist


Mental Model

The solving step is the payoff for the setup. You have one function and one domain. The Extreme Value Theorem (for closed domains) or the derivative tests (for open domains) tell you where the maximum or minimum is.

The one extra step compared to abstract calculus is the physical check: the answer must describe a real object. Negative lengths, zero volumes, and units that do not match are signs that something went wrong in the setup. If the answer fails the physical check, return to the setup step.


Back to Applications of Differentiation | Previous: Setting Up Optimization | Next: Geometric Optimization