01 / 21

Intro to
Optimization

Learn how to use derivatives to find maximum and minimum values of functions in real-world scenarios.

Calculus 1

What is Optimization?

Optimization is the process of finding the best possible value of a function: either the maximum or minimum. In calculus, we use derivatives to locate these extreme values precisely.

Key Vocabulary

Objective Function
The function you want to maximize or minimize, e.g., area, volume, or cost.
Constraint
A condition that limits your variables, e.g., fixed perimeter or budget.
Critical Point
Where \( f'(x) = 0 \) or is undefined: candidates for max/min values.

Visualizing a Maximum

\(x\) \(y\) Maximum \( \text{slope} = 0 \) \( x^* \) \( f(x) \)

The Closed Interval Method

To find the absolute maximum and absolute minimum of a continuous function \( f \) on a closed interval \( [a, b] \):

1
Find critical points: Solve \( f'(x) = 0 \) and find where \( f'(x) \) is undefined on \( (a, b) \).
2
Evaluate: Compute \( f \) at each critical point and at the endpoints \( f(a) \) and \( f(b) \).
3
Compare: The largest value is the absolute maximum; the smallest is the absolute minimum.

The Extreme Value Theorem

\(a\) \(b\) Abs. Max Abs. Min \(f(a)\) \(f(b)\)

This theorem guarantees that extreme values exist: we just need to find them among the critical points and endpoints.

First vs Second Derivative Test

First Derivative Test Second Derivative Test
Condition \( c \) is a critical point \( f'(c) = 0 \)
Local Max \( f' \) changes from \( + \) to \( - \) at \( c \) \( f''(c) < 0 \)
Local Min \( f' \) changes from \( - \) to \( + \) at \( c \) \( f''(c) > 0 \)
Inconclusive \( f' \) doesn't change sign \( f''(c) = 0 \)
Best for All critical points Easy-to-differentiate functions

The Optimization Framework

1
Draw a picture and introduce variables for all unknown quantities.
2
Write the objective function: express the quantity to optimize in terms of your variables.
3
Use the constraint to reduce to one variable: substitute to eliminate extra unknowns.
4
Differentiate the objective function and set \( f'(x) = 0 \).
5
Verify your answer is a max or min (use the first or second derivative test) and answer the question.

Example 1: Maximum Area

A farmer has \( 200 \text{ m} \) of fencing to enclose a rectangular field along a river. The river side needs no fence. What dimensions maximize the area?

RIVER (no fence) \( y \) \( y \) \( x \)

Example 1: Solution

1
Substitute constraint: \( y = \frac{200 - x}{2} \), so \( A(x) = x \cdot \frac{200 - x}{2} = 100x - \frac{x^2}{2} \).
2
Differentiate: \( A'(x) = 100 - x \).
3
Set to zero: \( 100 - x = 0 \implies x = 100 \).
4
Verify: \( A''(x) = -1 < 0 \), confirming a maximum.
5
Answer: \( x = 100 \text{ m} \), \( y = 50 \text{ m} \), giving \( A = \) \( 5000 \text{ m}^2 \).

Example 2: Minimum Distance

Find the point on the parabola \( y = x^2 \) that is closest to the point \( (0, 1) \).

\(x\) \(y\) \(1\) \(-1\) \(1\) \((0, 1)\) \( (x, x^2) \) \(d\) \( y = x^2 \)

Example 2: Solution

1
Objective: \( D^2 = f(x) = x^2 + (x^2 - 1)^2 = x^4 - x^2 + 1 \).
2
Differentiate: \( f'(x) = 4x^3 - 2x = 2x(2x^2 - 1) \).
3
Solve: \( 2x(2x^2 - 1) = 0 \implies x = 0 \) or \( x = \pm \frac{1}{\sqrt{2}} \).
4
Evaluate: \( f(0) = 1 \), \( f\!\left(\pm\frac{1}{\sqrt{2}}\right) = \frac{3}{4} \). Minimum is \( \frac{3}{4} \).
5
Answer: Closest points are \( \left(\pm\frac{1}{\sqrt{2}},\, \frac{1}{2}\right) \) at distance \( \frac{\sqrt{3}}{2} \).

Example 3: Maximum Volume Box

An open-top box is made from a \( 24 \text{ cm} \times 24 \text{ cm} \) sheet of metal by cutting equal squares of side \( x \) from each corner and folding up. Find \( x \) to maximize volume.

\( x \) \( x \) \(24\text{ cm}\) \(24\text{ cm}\) Base after folding

Example 3: Solution

1
Expand: \( V(x) = x(24-2x)^2 = 4x^3 - 96x^2 + 576x \).
2
Differentiate: \( V'(x) = 12x^2 - 192x + 576 \).
3
Solve \( V'(x) = 0 \): Factor out 12: \( 12(x^2 - 16x + 48) = 0 \). This factors to \( 12(x-4)(x-12) = 0 \), giving critical points \( x=4 \) and \( x=12 \).
4
Check domain: The domain is \( (0, 12) \). \( x=12 \) is not in the domain (and gives zero volume). So \( x=4 \) is our solution.
5
Answer: Cut squares of side \( x = 4 \text{ cm} \). The maximum volume is \( V(4) = 4 \cdot (24-8)^2 = 4 \cdot 16^2 = \) \( 1024 \text{ cm}^3 \).

Common Mistakes

✕ Forgetting the Domain
Critical points outside the feasible domain are invalid. Always check that \( x \) makes physical sense.
✕ Not Verifying Max/Min
Setting \( f'(x) = 0 \) alone doesn't tell you whether it's a max, min, or neither. Confirm with a derivative test.
✕ Wrong Variable Eliminated
Substituting incorrectly from the constraint or leaving two variables in the objective function.

Optimization Summary

Step Action Key Question
1. Setup Define variables, draw diagram What am I optimizing?
2. Objective Write \( f(x) \) to maximize/minimize What quantity matters?
3. Constraint Eliminate extra variables What's fixed or limited?
4. Solve Find \( f'(x) = 0 \), check domain Where is the slope zero?
5. Verify Derivative test or endpoint check Is it max or min?

Question 1 of 5

A farmer has \( 120 \text{ m} \) of fencing to enclose a rectangular area against a barn wall (no fence needed on the barn side). What is the maximum area?

Question 2 of 5

To find the absolute maximum of \( f(x) = x^3 - 3x \) on \( [-2, 2] \), which values must you evaluate?

Question 3 of 5

If \( f''(c) > 0 \) at a critical point \( c \), then \( f(c) \) is a:

Question 4 of 5

In the open-top box problem (sheet \( s \times s \), corner cut \( x \)), the volume function is:

Question 5 of 5

When minimizing distance, why do we often minimize \( D^2 \) instead of \( D \)?