AP Calculus BC · Study guide

Solving Optimization Problems

AP® Calculus BC · Unit 5 · Analytical Applications of Differentiation

Solving Optimization Problems

Once a problem is set up as a function of one variable, calculus finds the best value. This guide solves three classic problems in full, including the justification that the answer really is a maximum or minimum.

The idea in one paragraph

After building the function and its domain, find the critical points. Then prove which one is the answer: compare values at critical points and endpoints (closed interval), or show it is the only critical point and use the first or second derivative test (open interval). Finally answer the question asked, with units and in context. A shortcut for distances: minimize the squared distance instead.

1Justifying the answer

DomainJustify with
Closed intervalCandidates test: compare f at critical points and endpoints
Open interval, one critical pointFirst or second derivative test at that point; then it is absolute
Open interval, several critical pointsCompare values and check the behavior near the ends
Write it like this

“\(S'(r)\) changes sign from negative to positive at \(r \approx 4.30\), and this is the only critical point for \(r \gt 0\), so \(S\) has its absolute minimum there.”

2Least material

Worked Example 1 Least material

A can holding 500 cm³

A closed cylindrical can must hold 500 cm³. What radius and height use the least metal (smallest surface area)?

  1. 1
    Objective: \(S = 2\pi r^2 + 2\pi rh\) (two lids plus the side). Constraint: \(\pi r^2h = 500\), so \(h = \dfrac{500}{\pi r^2}\).
  2. 2
    Substitute: \(S(r) = 2\pi r^2 + \dfrac{1000}{r}\), domain \(r \gt 0\).
  3. 3
    \(S'(r) = 4\pi r - \dfrac{1000}{r^2} = 0\) gives \(r^3 = \dfrac{250}{\pi}\), so \(r \approx 4.301\) cm.
  4. 4
    \(S''(r) = 4\pi + \dfrac{2000}{r^3} \gt 0\) for all \(r \gt 0\), and this is the only critical point, so it gives the absolute minimum.
  5. 5
    Height: \(h = \dfrac{500}{\pi(4.301)^2} \approx 8.602\) cm, which is \(2r\).
Answer: r ≈ 4.30 cm and h ≈ 8.60 cm, using about 348.7 cm² of metal.
Figure 1. Thin, tall cans have small lids but a huge side; short, wide cans have a small side but huge lids. The least material is used in between, at r ≈ 4.30 cm, where the height equals the diameter.
Common Mistake 1 · Stopping at the critical point

Finding \(r \approx 4.30\) does not yet show it is a minimum. Give a reason (sign change of \(S'\), \(S'' \gt 0\), or a comparison) and state that it is the only critical point.

3Shortest distance

Worked Example 2 Shortest distance

Closest point on \(y = \sqrt{x}\) to \((4, 0)\)

  1. 1
    Distance from \((x, \sqrt{x})\) to \((4, 0)\): \(D = \sqrt{(x - 4)^2 + x}\). Minimizing \(D\) is the same as minimizing \(D^2\), which avoids the root.
  2. 2
    \(D^2(x) = (x - 4)^2 + x\), so \(\dfrac{d}{dx}D^2 = 2(x - 4) + 1 = 0\) at \(x = 3.5\).
  3. 3
    The derivative goes from negative to positive at 3.5 (it is a line with positive slope), so this is the minimum.
  4. 4
    Point: \((3.5, \sqrt{3.5}) \approx (3.5, 1.871)\). Distance: \(\sqrt{0.25 + 3.5} = \sqrt{3.75} \approx 1.936\).
Answer: The closest point is about (3.5, 1.871), at distance about 1.936.
Figure 2. Gray dashed segments to other points of the curve are longer. The shortest one meets the curve at a right angle, at (3.5, √3.5).
Common Mistake 2 · Differentiating the square root

Minimizing \(D\) directly works, but the quotient from the square root is messy. \(D\) and \(D^2\) are smallest at the same \(x\), because squaring keeps the order of positive numbers.

4Least cost

Worked Example 3 Least cost

A field with an expensive side

A 1,800 m² rectangular field lies along a road. Fencing along the road costs $20 per meter; the other three sides cost $10 per meter. Minimize the cost.

  1. 1
    Let \(x\) = side along the road, \(y\) = the other side. Constraint: \(xy = 1800\), so \(y = \dfrac{1800}{x}\).
  2. 2
    Cost: road side \(20x\), opposite side \(10x\), two other sides \(2 \cdot 10y\): \(C = 30x + 20y = 30x + \dfrac{36{,}000}{x}\), \(x \gt 0\).
  3. 3
    \(C'(x) = 30 - \dfrac{36{,}000}{x^2} = 0\) at \(x^2 = 1200\), \(x \approx 34.64\) m; then \(y \approx 51.96\) m.
  4. 4
    \(C''(x) = \dfrac{72{,}000}{x^3} \gt 0\): the only critical point is a minimum. Cost \(\approx\) $2,078.46.
Answer: About 34.64 m along the road and 51.96 m deep, for a minimum cost of about $2,078.46.
Common Mistake 3 · Giving x when the question asks for something else

The question asks for the minimum cost or the dimensions. “\(x = 34.64\)” alone answers neither. Report what was asked, with units.

5Largest area

Worked Example 4 Largest area on a closed interval

A pen against a wall

A farmer has 240 m of fencing for a rectangular pen along a barn wall; the wall side needs no fence. What is the largest possible area?

  1. 1
    Let \(x\) be the length of each side touching the wall. The side parallel to the wall is \(240 - 2x\), so \(A(x) = x(240 - 2x)\).
  2. 2
    Domain: lengths cannot be negative, so \(0 \le x \le 120\), a closed interval.
  3. 3
    \(A'(x) = 240 - 4x = 0\) at \(x = 60\).
  4. 4
    Candidates test: \(A(0) = 0\), \(A(60) = 60 \cdot 120 = 7200\), \(A(120) = 0\).
Answer: The largest area is 7,200 m², with sides 60 m and 120 m (the 120 m side parallel to the wall).
Common Mistake 4 · Leaving out the endpoints

On a closed interval the largest or smallest value can sit at an endpoint. Here the endpoints give area 0, but always list them in the candidates table, because in other problems they win.

Quick reference

StepCheck
Function of one variableConstraint used to remove the other variable
DomainPhysical limits on the variable
Critical pointsSolve f′ = 0; note where f′ is undefined
JustificationCandidates test, or one critical point with a derivative test
AnswerThe quantity asked for, with units