Optimization Problems for MATH 139

Exam Relevance for MATH 139

Likelihood of appearing: High

Classic word problems. Set up constraint and objective function, substitute, differentiate, find critical points.

Lesson

What Are Optimization Problems?

Optimization problems ask you to find the best value of something — the maximum or minimum of a quantity subject to some constraint.

The key insight: If you can write a formula for what you want to optimize, calculus can find where it's maximized or minimized.


The General Strategy

  1. Draw a picture (if applicable) and label variables
  2. Write an equation for the quantity you want to optimize (call it $Q$)
  3. Use constraints to eliminate variables until $Q$ depends on only one variable
  4. Take the derivative and set it equal to zero
  5. Solve for the critical points
  6. Verify it's a max or min (using first or second derivative test, or domain analysis)
  7. Answer the question they actually asked!

Example 1: Classic Fencing Problem

A farmer has 100 meters of fencing to enclose a rectangular field against a barn (so only 3 sides need fencing). What dimensions maximize the area?

Step 1: Set up variables

Let $x$ = width (perpendicular to barn), $y$ = length (parallel to barn)

Step 2: Write constraint and objective

Constraint (fencing): $2x + y = 100$

Objective (area): $A = xy$

Step 3: Eliminate a variable

From constraint: $y = 100 - 2x$

Substitute: $A(x) = x(100 - 2x) = 100x - 2x^2$

Step 4: Find critical points

$$A'(x) = 100 - 4x = 0$$ $$x = 25$$

Step 5: Find the other dimension

$y = 100 - 2(25) = 50$

Step 6: Verify maximum

$A''(x) = -4 < 0$ → concave down → maximum ✓

$$\boxed{x = 25 \text{ m}, \quad y = 50 \text{ m}}$$


Example 2: Closest Point on a Parabola

What are the $x$-coordinates of the points on the parabola $x = 4 - y^2$ closest to the origin?

Step 1: Set up the distance

Distance from $(x, y)$ to origin: $D = \sqrt{x^2 + y^2}$

Step 2: Minimize $D^2$ instead (easier!)

$D^2 = x^2 + y^2$

Since we're on the parabola: $x = 4 - y^2$

So: $D^2 = (4 - y^2)^2 + y^2$

Step 3: Let $f(y) = (4-y^2)^2 + y^2$ and find critical points

$$f(y) = 16 - 8y^2 + y^4 + y^2 = y^4 - 7y^2 + 16$$

$$f'(y) = 4y^3 - 14y = 2y(2y^2 - 7)$$

$f'(y) = 0$ when $y = 0$ or $y^2 = \frac{7}{2}$

Step 4: Find corresponding $x$-values

For $y = 0$: $x = 4 - 0 = 4$

For $y^2 = \frac{7}{2}$: $x = 4 - \frac{7}{2} = \frac{1}{2}$

Step 5: Compare distances

At $(4, 0)$: $D^2 = 16$

At $(\frac{1}{2}, \pm\sqrt{7/2})$: $D^2 = \frac{1}{4} + \frac{7}{2} = \frac{15}{4}$

Since $\frac{15}{4} < 16$, the closest points have $x = \frac{1}{2}$.

$$\boxed{x = \frac{1}{2}}$$


Example 3: The Ladder Around a Corner

A ladder must be carried horizontally around a corner where a 3-foot-wide hallway meets a 4-foot-wide hallway. What is the maximum length ladder that can make the turn?

Step 1: Set up with angle

Let $\theta$ = angle the ladder makes with the 4-foot hallway.

The ladder touches both walls. Using similar triangles:

  • Part in narrow hallway: $\frac{3}{\sin\theta}$
  • Part in wide hallway: $\frac{4}{\cos\theta}$

Step 2: Total length

$$L(\theta) = \frac{3}{\sin\theta} + \frac{4}{\cos\theta} = 3\csc\theta + 4\sec\theta$$

We want the minimum of this (longest ladder that fits = minimum of all possible "blocking" positions).

Step 3: Find critical points

$$L'(\theta) = -3\csc\theta\cot\theta + 4\sec\theta\tan\theta$$

Set equal to zero: $$4\sec\theta\tan\theta = 3\csc\theta\cot\theta$$

$$\frac{4\sin\theta}{\cos^2\theta} = \frac{3\cos\theta}{\sin^2\theta}$$

$$4\sin^3\theta = 3\cos^3\theta$$

$$\tan^3\theta = \frac{3}{4}$$

$$\tan\theta = \sqrt[3]{\frac{3}{4}}$$

Step 4: Calculate length

Using $\tan\theta = \sqrt[3]{3/4} \approx 0.909$, we get $\theta \approx 42.3°$

$$L \approx 3(1.49) + 4(1.35) \approx 9.87 \text{ feet}$$

$$\boxed{L \approx 9.87 \text{ feet}}$$


Example 4: Minimizing Travel Time

You're 2 km offshore and need to reach a point 6 km down the shore. You can row at 3 km/h and walk at 5 km/h. Where should you land to minimize total travel time?

Step 1: Set up variables

Let $x$ = distance along shore from the nearest point to where you land.

Step 2: Write time function

Rowing distance: $\sqrt{4 + x^2}$ (by Pythagorean theorem, since you're 2 km offshore)

Walking distance: $6 - x$

Total time: $T(x) = \frac{\sqrt{4 + x^2}}{3} + \frac{6-x}{5}$

Step 3: Find critical points

$$T'(x) = \frac{x}{3\sqrt{4+x^2}} - \frac{1}{5} = 0$$

$$\frac{x}{3\sqrt{4+x^2}} = \frac{1}{5}$$

$$5x = 3\sqrt{4+x^2}$$

$$25x^2 = 9(4+x^2)$$

$$25x^2 = 36 + 9x^2$$

$$16x^2 = 36$$

$$\boxed{\text{Land 1.5 km down the shore from the nearest point}}$$


Example 5: Maximum Product with Fixed Sum

Find two positive numbers whose sum is 20 and whose product is as large as possible.

Step 1: Set up

Let the numbers be $x$ and $y$ with $x + y = 20$.

Step 2: Write objective

$P = xy$

From constraint: $y = 20 - x$

$P(x) = x(20 - x) = 20x - x^2$

Step 3: Optimize

$P'(x) = 20 - 2x = 0$

$x = 10$, so $y = 10$

$$\boxed{x = y = 10}$$

Insight: For a fixed sum, the product is maximized when the numbers are equal!


Tips for Optimization Problems

  1. Minimize $D^2$ instead of $D$ — avoids square roots, same critical points
  2. Draw a picture — label everything, find relationships
  3. Check your domain — physical constraints matter ($x > 0$, etc.)
  4. Verify max vs min — use second derivative or endpoint analysis
  5. Answer what they asked — they might want $x$, or $y$, or the max value itself

Common Mistakes and Misunderstandings

❌ Mistake: Forgetting to eliminate variables

Wrong: Trying to optimize $A = xy$ with two unknowns.

Why it's wrong: You can only take derivatives with respect to one variable.

Correct: Use the constraint to write everything in terms of one variable first.


❌ Mistake: Finding critical points but not verifying max/min

Wrong: "$x = 5$ is a critical point, so that's the maximum."

Why it's wrong: Critical points can be maxima, minima, or neither. Also, the max/min might be at an endpoint.

Correct: Use second derivative test, first derivative test, or compare endpoint values.


❌ Mistake: Answering the wrong question

Wrong: Finding $x = 10$ and writing that as the answer when they asked for the maximum area.

Why it's wrong: They might want the dimensions, or the maximum value, or something else.

Correct: Re-read the question. Plug your answer back in if they want the optimized value.

Formulas & Reference

Minimize Distance Squared

$$\text{Minimize } D = \sqrt{(x-a)^2 + (y-b)^2} \iff \text{Minimize } D^2 = (x-a)^2 + (y-b)^2$$

When minimizing distance, you can minimize the square of the distance instead. This avoids messy square roots and gives the same critical points (since the square root function is increasing).

Variables:
$D$:
Distance to the point (a, b)
$D^2$:
Distance squared (easier to work with)
Courses Using This Skill

This skill is taught in the following courses. Create an account to access practice exercises and full course materials.