AP® Calculus AB & BC · Unit 5

How Do You Solve an Optimization Problem in AP Calculus?

Optimization problems ask for the maximum or minimum value of some quantity. Write it as a function of one variable, using a constraint to eliminate extra variables, find where its derivative is zero, and use a derivative test — or the domain’s endpoints — to confirm which critical point gives the desired max or min.

The optimization process

Write the quantity to optimize as Q(x)Q(x), a function of one variable, using any given constraint to eliminate extra variables. Solve Q′(x)=0Q'(x)=0 for critical points, then confirm each one is a max or min with Q′′(x)Q''(x) (or the First Derivative Test), checking the domain’s endpoints too if it is closed and bounded.

Step-by-Step Method

  1. Identify the quantity to maximize or minimize, and write an expression for it.
  2. If the expression has more than one variable, use a given constraint equation to eliminate all but one variable.
  3. Restrict the domain of that one variable to physically meaningful values (lengths and areas can’t be negative, a cut can’t exceed the material available, and so on).
  4. Differentiate, set the derivative equal to zero, and solve for the critical point(s) within the domain.
  5. Confirm which critical point gives the desired max or min using the first or second derivative test, and check the domain’s endpoints if it is closed and bounded.

Worked Examples

Foundational — maximizing area, checked by a vertex formulaA farmer has 100 meters of fencing to build a rectangular pen against an existing straight wall, so only three sides need fencing. Find the dimensions that maximize the area.
  1. Let xx be the width of each of the two sides perpendicular to the wall, and yy the length of the side parallel to it. The fencing constraint is 2x+y=1002x+y=100, so y=100−2xy=100-2x.
  2. Area: A(x)=xy=x(100−2x)=100x−2x2A(x) = xy = x(100-2x) = 100x-2x^2, for 0<x<500<x<50.
  3. A′(x)=100−4x=0⇒x=25A'(x)=100-4x=0 \Rightarrow x=25, giving y=50y=50. Since A′′(x)=−4<0A''(x)=-4<0, this is a maximum. Max area =25(50)=1250= 25(50) = 1250 m².
  4. Check with pure algebra: A(x)=−2x2+100xA(x)=-2x^2+100x is a downward parabola, whose vertex (maximum) occurs at x=−b2a=−1002(−2)=25x=-\dfrac{b}{2a}=-\dfrac{100}{2(-2)}=25 — the same critical point, found without calculus.
Harder — maximizing volume, checked by direct comparisonAn open-top box is made from a square piece of cardboard with side 1212 inches, by cutting a square of side xx from each corner and folding up the sides. Find the value of xx that maximizes the box’s volume.
  1. The base of the box has side 12−2x12-2x, and height xx, so V(x)=x(12−2x)2V(x) = x(12-2x)^2 for 0<x<60<x<6.
  2. V′(x)=144−96x+12x2=12(x−2)(x−6)V'(x) = 144-96x+12x^2 = 12(x-2)(x-6), zero at x=2x=2 and x=6x=6. Since x=6x=6 makes the base side 00 (zero volume), only x=2x=2 is a candidate.
  3. V′′(x)=24x−96V''(x)=24x-96, so V′′(2)=−48<0V''(2)=-48<0 — confirms a maximum. V(2)=2(12−4)2=2(64)=128V(2) = 2(12-4)^2 = 2(64) = 128 cubic inches.
  4. Check by comparing to nearby values directly: V(1)=100V(1)=100 and V(3)=108V(3)=108, both less than V(2)=128V(2)=128 — confirming x=2x=2 really does give a larger volume than its neighbors, independent of the derivative test.

Common Mistakes on the AP Exam

How This Appears on the AP Exam

Try a timed AP-style question on this topic — free.

Start Free

Frequently Asked Questions

What are the general steps for solving an optimization problem?

Write the quantity to optimize as a function of one variable (using a constraint to eliminate extras), find where its derivative is zero, and confirm which critical point gives the desired max or min with a derivative test or by checking the domain’s endpoints.

How do you know if a critical point is a maximum or a minimum?

Use the First or Second Derivative Test at that point, or compare the function’s value there to its values at the domain’s endpoints if the domain is closed and bounded.

What do you do if the domain of the problem is a closed interval?

Check the function’s value at both endpoints in addition to any critical points inside the interval — the absolute maximum or minimum could occur at an endpoint instead of a critical point.

Why is it important to reduce the objective function to one variable?

Because the derivative tests used to find a maximum or minimum only work for a function of a single variable — a given constraint equation is what lets you eliminate the extra variables first.

What's a common type of optimization problem on the AP Calculus exam?

Maximizing an area or volume given a fixed amount of material or fencing, or minimizing a cost or surface area given a required volume — both types appear regularly.

Related Topics

Keep going with timed tests & full mocks, study materials for every unit, DME Nova — your AI tutorthat won't make up an answer, and FRQ feedback scored against an exam-style rubric.

Start Free

Written by the DME AP Calculus team — 20+ years of AP & STEM teaching.

Last updated: 2026-10-08

AP® is a registered trademark of the College Board, which is not affiliated with, and does not endorse, this site.