AP Calculus BC · Study guide

Introduction to Optimization Problems

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

Setting Up Optimization Problems

Optimization means finding the best value: the most area, the least cost, the biggest volume. Most of the work is building the right function. This guide shows how to turn a word problem into a one-variable function with a domain.

The idea in one paragraph

Name the quantity you want to make largest or smallest, and write a formula for it. If the formula has two variables, use the constraint (the fixed amount of fence, material or money) to replace one of them. Find the domain the situation allows. Then this becomes a closed-interval extreme-value problem: find critical points, compare candidates, and answer the question that was asked, with units.

1The setup routine

StepAsk yourself
1. PictureWhat does it look like? Label every length with a letter.
2. ObjectiveWhat is being maximized or minimized? Write its formula.
3. ConstraintWhat is fixed? Use it to write one variable in terms of the other.
4. One variableSubstitute to get a function of one variable.
5. DomainWhich values make physical sense?
6. SolveCritical points and endpoints; compare.

2Fencing

Figure 1. Making x bigger lengthens the two short sides but shortens the long side. The area is largest in between, at x = 150 m, where the field is 150 m by 300 m.
Worked Example 1 Set up and solve

Fence along a river

A farmer has 600 m of fence to enclose a rectangular field along a straight river; no fence is needed along the river. What dimensions give the largest area?

  1. 1
    Quantity to optimize: area \(A\). Variables: side \(x\) perpendicular to the river, side \(y\) along it.
  2. 2
    Constraint: \(2x + y = 600\), so \(y = 600 - 2x\). One-variable function: \(A(x) = x(600 - 2x) = 600x - 2x^2\).
  3. 3
    Domain: lengths cannot be negative, so \(0 \le x \le 300\).
  4. 4
    \(A'(x) = 600 - 4x = 0\) at \(x = 150\). Candidates: \(A(0) = 0\), \(A(150) = 45{,}000\), \(A(300) = 0\).
Answer: x = 150 m and y = 300 m, for a maximum area of 45,000 m².
Write it like this

“\(A'(x) = 600 - 4x\) changes sign from positive to negative at \(x = 150\), and this is the only critical point in \((0, 300)\), so the area is a maximum when \(x = 150\) m. The field should be 150 m by 300 m.”

Common Mistake 1 · Optimizing the constraint

The fence length, 600, is fixed; it is not the thing being maximized. The area is the objective. Writing the derivative of \(2x + y\) leads nowhere.

Common Mistake 2 · Forgetting the domain

Without a domain you cannot check endpoints, and you might report an impossible answer, such as a negative length. Here \(x\) must be between 0 and 300.

3Boxes and numbers

Figure 2. Cutting a square of side x from each corner and folding up the flaps gives a box x tall with a base 12 − 2x on each side. The cut must satisfy 0 ≤ x ≤ 6.
Worked Example 2 A box

Largest volume

Squares of side \(x\) are cut from the corners of a 12-inch by 12-inch sheet, and the sides are folded up to make an open box. Find the largest possible volume.

  1. 1
    \(V(x) = x(12 - 2x)^2\), with domain \(0 \le x \le 6\).
  2. 2
    \(V'(x) = (12 - 2x)^2 + x \cdot 2(12 - 2x)(-2) = (12 - 2x)(12 - 6x)\).
  3. 3
    Zeros: \(x = 6\) (an endpoint) and \(x = 2\). Candidates: \(V(0) = 0\), \(V(2) = 2 \cdot 8^2 = 128\), \(V(6) = 0\).
Answer: Cut 2-inch squares; the maximum volume is 128 in³.
Worked Example 3 Numbers

Largest product with a fixed sum

Two nonnegative numbers add to 20. What is the largest possible product?

  1. 1
    Numbers \(x\) and \(20 - x\); product \(P(x) = x(20 - x)\), domain \(0 \le x \le 20\).
  2. 2
    \(P'(x) = 20 - 2x = 0\) at \(x = 10\). \(P(10) = 100\); endpoints give 0.
Answer: 10 and 10, product 100.
Worked Example 4 A rectangle under a curve

Largest rectangle under \(y = 12 - x^2\)

A rectangle has its base on the x-axis and its top two corners on the parabola \(y = 12 - x^2\). Find the largest possible area.

  1. 1
    By symmetry, put the corners at \((\pm x, 12 - x^2)\). Width \(2x\), height \(12 - x^2\): \(A(x) = 2x(12 - x^2) = 24x - 2x^3\).
  2. 2
    Domain: the height must not be negative, so \(0 \le x \le \sqrt{12}\).
  3. 3
    \(A'(x) = 24 - 6x^2 = 0\) at \(x = 2\). Candidates: \(A(0) = 0\), \(A(2) = 4 \cdot 8 = 32\), \(A(\sqrt{12}) = 0\).
Answer: Width 4, height 8, maximum area 32.
Common Mistake 3 · Answering a different question

If the question asks for the dimensions, give the dimensions (150 m by 300 m), not just \(x = 150\). If it asks for the maximum volume, give 128 in³, not \(x = 2\).

Quick reference

ProblemObjectiveConstraint
Fence, 3 sidesA = xy2x + y = fence length
Open box from a sheetV = x(s − 2x)²0 ≤ x ≤ s/2
Fixed sumP = x(S − x)x + y = S