Dove's LibraryDove's Library

5.11 - Solving Optimization Problems

The Complete Process

This lesson picks up at Steps 4 and 5, building on the setup from last lesson.
Step 4: Take the derivative and set it equal to zero to find critical points.
Step 5: Determine max or min using the candidates test (evaluate at critical points and endpoints) or the first derivative test.

The Full Five Steps

  1. Draw a picture (if applicable)
  1. Write the equation to optimize
  1. Express it in one variable
  1. Take the derivative, set it to zero, solve
  1. Test the critical points and endpoints

Example 1: Distance to a Curve

Problem: What point on the graph y=xy = \sqrt{x} is closest to the point (5,0)(5, 0)?
Set it up the same way as Example 2 in 5.10, but with the point (5,0)(5, 0):
d=(x−5)2+xd = \sqrt{(x-5)^2 + x}
Step 4: Take the derivative with the chain rule.
d′(x)=12(x−5)2+x⋅[2(x−5)+1]=2x−92(x−5)2+xd'(x) = \frac{1}{2\sqrt{(x-5)^2 + x}} \cdot [2(x-5) + 1] = \frac{2x - 9}{2\sqrt{(x-5)^2 + x}}
Set equal to zero. A fraction equals zero only when the numerator equals zero:
2x−9=0⇒x=92=4.52x - 9 = 0 \quad \Rightarrow \quad x = \frac{9}{2} = 4.5
Check that it’s a minimum. The denominator of d′(x)d'(x) is always positive, so the sign of d′(x)d'(x) matches the sign of 2x−92x - 9: negative for x<4.5x < 4.5 and positive for x>4.5x > 4.5. So dd changes from decreasing to increasing at x=4.5x = 4.5, which makes it a minimum. Since dd is continuous for x≥0x \geq 0 and this is its only critical point, it’s the absolute minimum (5.7).
Step 5: Find the point. The y-coordinate is y=4.5≈2.12y = \sqrt{4.5} \approx 2.12.
Answer: the point (4.5,4.5)\left(4.5, \sqrt{4.5}\right), roughly (4.5,2.12)(4.5, 2.12), is the closest point to (5,0)(5, 0).
5.11 - Solving Optimization Problems

Example 2: Wire Between Towers (Calculator Method)

Problem: Two vertical poles stand 30 feet apart. One is 28 feet tall, the other is 12 feet tall. A wire runs from the top of each pole to a single stake on the ground between them. Where should the stake go to use the least wire?
Set it up the same way as Example 4 in 5.10 (with new heights and distance), measuring xx from the 12-foot pole:
W=784+(30−x)2+144+x2W = \sqrt{784 + (30-x)^2} + \sqrt{144 + x^2}
Step 4: Take the derivative.
W′(x)=−(30−x)784+(30−x)2+x144+x2W'(x) = \frac{-(30-x)}{\sqrt{784 + (30-x)^2}} + \frac{x}{\sqrt{144 + x^2}}
This is nasty to solve algebraically, so use the calculator.

Using the TI-84 to Solve

Enter the derivative:
  1. Press Y=
  1. Enter the derivative equation (use ALPHA + F1 for the fraction template)
  1. Set the window: WINDOW with Xmin⁡=0X_{\min} = 0 and Xmax⁡=30X_{\max} = 30 (that’s the domain)
  1. Press GRAPH
Find the zero:
  1. Press 2ND then CALC (above TRACE)
  1. Choose 2:zero
  1. Move the cursor left of the crossing and press ENTER for the left bound (or just type a number like 1)
  1. Move right of the crossing and press ENTER for the right bound (or type 25)
  1. Press ENTER for the guess
Result: x=9x = 9
Answer: the stake goes 9 feet from the 12-foot tower, which is 21 feet from the 28-foot tower.
5.11 - Solving Optimization Problems
Check that it’s a minimum. On the calculator graph of W′(x)W'(x), the curve crosses the xx-axis from below to above at x=9x = 9, so WW changes from decreasing to increasing there. That makes x=9x = 9 the minimum. The shortest possible wire is:
W(9)=784+212+144+92=1225+225=35+15=50 feetW(9) = \sqrt{784 + 21^2} + \sqrt{144 + 9^2} = \sqrt{1225} + \sqrt{225} = 35 + 15 = 50 \text{ feet}

Example 3: Particle Motion with Endpoints

Problem: A particle moves along the x-axis with position function
s(t)=t3−15t2+72t+10s(t) = t^3 - 15t^2 + 72t + 10
on the interval [3,9][3, 9].

Part A: When is the particle farthest to the right?

Step 1: Velocity.
v(t)=s′(t)=3t2−30t+72v(t) = s'(t) = 3t^2 - 30t + 72
Step 2: Critical points.
3(t2−10t+24)=0⇒(t−4)(t−6)=03(t^2 - 10t + 24) = 0 \quad \Rightarrow \quad (t - 4)(t - 6) = 0
Critical points: t=4t = 4 and t=6t = 6
Step 3: Evaluate position at all candidates (endpoints t=3,9t = 3, 9 and critical points t=4,6t = 4, 6):
tt
s(t)s(t)
Calculation
33
118118
27−135+216+10=11827 - 135 + 216 + 10 = 118
44
122122
64−240+288+10=12264 - 240 + 288 + 10 = 122
66
118118
216−540+432+10=118216 - 540 + 432 + 10 = 118
99
172172
729−1215+648+10=172729 - 1215 + 648 + 10 = 172
Using the calculator table:
  1. Enter s(t)s(t) into Y1
  1. Press 2ND then TBLSET, set “Indpnt: Ask”
  1. Press 2ND then TABLE
  1. Enter 3, 4, 6, 9
  1. Read the values from the Y1 column
Answer: the particle is farthest to the right at t=9t = 9 seconds, at position 172172.

Part B: What is the particle’s maximum speed?

Remember, speed is ∣v(t)∣|v(t)|, the absolute value of velocity.
Step 1: Acceleration.
a(t)=v′(t)=6t−30a(t) = v'(t) = 6t - 30
Step 2: Critical points of velocity.
6t−30=0⇒t=56t - 30 = 0 \quad \Rightarrow \quad t = 5
Step 3: Evaluate velocity at the candidates (endpoints t=3,9t = 3, 9 and critical point t=5t = 5):
tt
v(t)v(t)
Calculation
33
99
27−90+72=927 - 90 + 72 = 9
55
−3-3
75−150+72=−375 - 150 + 72 = -3
99
4545
243−270+72=45243 - 270 + 72 = 45
Step 4: Max speed.
Speeds: ∣9∣=9|9| = 9, ∣−3∣=3|-3| = 3, ∣45∣=45|45| = 45
Answer: the maximum speed is 4545 units per second, at t=9t = 9.
Note that even though v(5)=−3v(5) = -3 is negative, the speed there is only 3. The max speed happens at t=9t = 9, where the velocity is positive and biggest in magnitude.

Example 4: Box with Maximum Volume

Problem: Finish the cardboard box from 5.10 (Example 3). Squares of side xx inches are cut from the corners of a 20 inch by 32 inch sheet. What size squares give the box with the largest volume, and what is that volume?
From the setup in 5.10:
V(x)=4x3−104x2+640x,0<x<10V(x) = 4x^3 - 104x^2 + 640x, \quad 0 < x < 10
Step 4: Take the derivative.
V′(x)=12x2−208x+640=4(3x2−52x+160)=4(3x−40)(x−4)V'(x) = 12x^2 - 208x + 640 = 4(3x^2 - 52x + 160) = 4(3x - 40)(x - 4)
Setting V′(x)=0V'(x) = 0 gives x=4x = 4 or x=403≈13.3x = \frac{40}{3} \approx 13.3. Only x=4x = 4 is in the domain, since you can’t cut a 13.3-inch square from each corner of a 20-inch side.
Step 5: Test the candidates. The endpoints x=0x = 0 and x=10x = 10 don’t make real boxes, but they’re still worth checking. The volume is 00 at both, since the box would have no height or no width.
xx
V(x)V(x)
Calculation
00
00
(32)(20)(0)=0(32)(20)(0) = 0
44
11521152
(24)(12)(4)=1152(24)(12)(4) = 1152
1010
00
(12)(0)(10)=0(12)(0)(10) = 0
Answer: Cut 4-inch squares from each corner. The box is 24 inches long, 12 inches wide, and 4 inches tall, and its maximum volume is 11521152 cubic inches.
Notice the question asked for two things. “What size squares” asks for the input, x=4x = 4 inches. “What is that volume” asks for the output, V(4)=1152V(4) = 1152 cubic inches.

The Candidates Test

On a closed interval [a,b][a, b]:
  1. Find all critical points in the interval (where f′(x)=0f'(x) = 0 or doesn’t exist)
  1. Evaluate f(x)f(x) at all critical points AND both endpoints
  1. The largest value is the absolute max
  1. The smallest value is the absolute min
Why include endpoints? Because the max or min might sit right at the boundary instead of at a critical point.

Calculator Techniques

Method 1: Graphing and Finding Zeros

For derivatives that are ugly to solve by hand:
  1. Enter the derivative in Y=
  1. Set a sensible window using the domain constraints
  1. Graph it
  1. Use 2ND → CALC → 2:zero to find where the derivative crosses the x-axis

Method 2: Table of Values

To evaluate a function at several points quickly:
  1. Enter the function in Y=
  1. 2ND → TBLSET, set “Indpnt: Ask”
  1. 2ND → TABLE
  1. Type each value and read the outputs
Tip: press ALPHA + F1 to get a fraction template (numerator over denominator) instead of fighting with parentheses and division.

Interpreting Max and Min Values in Context

In a word problem, a maximum or minimum always means something specific. Your final answer should say what it means in a full sentence, with units.
Function
Its maximum means
Its minimum means
Position s(t)s(t)
Farthest right (or highest)
Farthest left (or lowest)
Speed ∣v(t)∣|v(t)|
Moving fastest
Moving slowest
Distance d(x)d(x) to a point
Farthest away
Closest
Volume or area
Biggest box or region
Smallest box or region
Cost C(x)C(x)
Most expensive
Cheapest
Profit P(x)P(x)
Largest profit
Smallest profit (or biggest loss)
Input vs. output: the input tells you when or where the max or min happens (a time, a cut size, a stake location). The output is the max or min value itself (a position, a volume, a wire length). In Example 3, the particle is farthest right at t=9t = 9 seconds, and its position at that time is 172172. Read the question to see which one it wants.

Common Pitfalls

  • Forgetting endpoints. Always test them.
  • Ignoring domain restrictions. Some values aren’t physically meaningful, like negative lengths.
  • Confusing speed and velocity. Speed is the absolute value of velocity. Negative velocity doesn’t mean slow.
  • Not answering the actual question. The problem might ask “when” (time), “where” (position), or “what value” (the max or min itself). Read carefully.

Solving Checklist

  • Take the derivative of the optimization equation
  • Set the derivative equal to zero
  • Solve for critical points (use a calculator if needed)
  • Identify domain and interval restrictions
  • Evaluate at ALL candidates (critical points plus endpoints)
  • Compare the values to find the max or min
  • Answer the specific question asked (when? where? what value?)
  • Include appropriate units

Key Takeaways

  • Step 4: take the derivative, set it to zero, solve for critical points
  • Step 5: use the candidates test with critical points AND endpoints
  • A fraction equals zero only when the numerator is zero (the denominator can’t be zero)
  • For messy algebra, use the calculator to find the zeros of the derivative
  • Calculator zeros: graph the derivative, then 2ND → CALC → 2:zero
  • The table method evaluates a function at multiple points fast
  • Always test endpoints on a closed interval [a,b][a, b]
  • Speed is ∣v(t)∣|v(t)|, so take absolute values
  • Read the question to figure out if it wants a time, a position, or the max/min value itself
  • Domain matters, use physical constraints to set your window and bounds
  • Compare all candidates: largest is the max, smallest is the min

AP® is a registered trademark of the College Board, which is not affiliated with Dove's Library and was not involved in the production of, and does not endorse, this website.

Providing free, high-quality AP notes to help students succeed, earn college credit, and reach their educational goals, ensuring everyone has access to the resources they need.

© 2026 Standard Learning Group, Inc., which operates Dove's Library. All rights reserved.