| Study Guides
AP · Solving optimization problems · 14 min read · Updated 2026-05-10

Solving optimization problems — AP Calculus AB Study Guide

For: AP Calculus AB candidates sitting AP Calculus AB.

Covers: Setting up contextual objective functions, domain restriction for applied problems, the closed interval method, first derivative test for absolute extrema, and second derivative test for optimization, all core techniques for AP exam maximum/minimum problems.

You should already know: How to compute first and second derivatives of common function types; how to find critical points of a function; how to test for local and absolute extrema.

A note on the practice questions: All worked questions in the "Practice Questions" section below are original problems written by us in the AP Calculus AB style for educational use. They are not reproductions of past College Board / Cambridge / IB papers and may differ in wording, numerical values, or context. Use them to practise the technique; cross-check with official mark schemes for grading conventions.


1. What Is Solving optimization problems?

Optimization problems are applied absolute extrema problems that ask you to find the maximum or minimum possible value of a quantity (area, volume, profit, distance, time) under a given set of constraints. According to the AP Calculus AB Course and Exam Description (CED), this topic is part of Unit 5: Analytical Applications of Differentiation, which counts for 15-18% of the total AP exam score. Optimization problems appear regularly on both multiple-choice (MCQ) and free-response (FRQ) sections, most often as a multi-part contextual FRQ that tests both derivative computation and conceptual understanding of extrema. Unlike abstract extrema problems where you are given a function over an interval, optimization requires you to first translate a word problem into a mathematical function (called the objective function) and eliminate extra variables using the given constraint, then find the absolute maximum or minimum over the valid domain of the problem. Synonyms for this topic include "applied extrema problems" and "max/min word problems."

2. Setting up the objective function and constraint

The most challenging step of any optimization problem is translating the verbal problem into correct mathematical equations. Every optimization problem has two key non-negotiable components: 1) The objective function: this is the function whose value you want to maximize or minimize. For example, if the problem asks for the maximum area of a rectangle, your objective function is , the area written as a function of a single variable. 2) The constraint: this is a fixed relationship between the variables in the problem that allows you to reduce the objective function to a single variable. For example, if you have a rectangle with a fixed perimeter, the perimeter equation is your constraint.

The step-by-step process for setup is: first, explicitly define all variables, labeling what each represents (including units if applicable). Second, write the objective quantity as a function of all your variables. Third, use the constraint to solve for one variable in terms of the other, then substitute back into the objective function to get a function of a single variable. Finally, find the valid domain of the objective function based on the physical constraints of the problem (e.g., a length can never be negative, so always for length variables).

Worked Example

Problem: You have 120 feet of fencing to enclose a rectangular pen along a straight river, with no fencing needed along the river. Set up the objective function for the maximum area of the pen, with correct domain.

Solution:

  1. Define variables: Let = the length of each side of the pen perpendicular to the river, = the length of the side parallel to the river. All lengths are positive, so .
  2. Objective: Maximize area .
  3. Constraint: Total fencing used is 120 ft, so .
  4. Solve constraint for : .
  5. Substitute into area: .
  6. Find domain: Since and , we get .

Final result: Objective function , domain .

Exam tip: Always explicitly find the domain before taking derivatives. Contextual problems almost always have domain restrictions that are critical to your final answer, and skipping this step can lead to invalid results.

3. The Closed Interval Method for Optimization

If your objective function is continuous over a closed, bounded interval , the Extreme Value Theorem guarantees that the function has both an absolute maximum and an absolute minimum on the interval. The Closed Interval Method is the most straightforward, foolproof technique to find these absolute extrema, and it is the most commonly tested method on the AP exam for optimization problems.

The steps of the method are: 1. Confirm the objective function is continuous on (it almost always is for AP problems, as most objective functions are polynomials, roots, or exponentials). 2. Find all critical points of on by solving or finding where does not exist (these are the interior critical points). 3. Evaluate at each critical point and at both endpoints and . 4. The largest value is the absolute maximum, the smallest value is the absolute minimum. This method works because it checks every candidate for the absolute extremum, so you never miss the correct answer.

Worked Example

Problem: Using the fencing pen problem from Section 2: over , find the maximum possible area of the pen.

Solution:

  1. Confirm continuity: is a polynomial, so it is continuous on the closed interval , so the Extreme Value Theorem applies.
  2. Find critical points: Compute the first derivative: . Set equal to 0: . There is one critical point at , which lies inside the interval.
  3. Evaluate at all candidates: , , .
  4. The largest value is 1800, so the maximum possible area is 1800 square feet.

Exam tip: Even if the critical point is obviously the maximum, you must still evaluate the endpoints to earn full credit on FRQs. AP graders require explicit confirmation that the interior point is larger than the endpoints.

4. Optimization on open intervals

Many optimization problems have a domain that is open (e.g., ) or has only one endpoint. In these cases, the Extreme Value Theorem does not guarantee an absolute extremum, but for almost all contextual AP problems, there will be exactly one critical point in the domain, so we can use the First or Second Derivative Test to confirm that it is the absolute extremum.

The rule for one critical point: If there is exactly one critical point in the domain, and the function is increasing before and decreasing after (per the First Derivative Test), then is the absolute maximum. If the function is decreasing before and increasing after , then is the absolute minimum. For the Second Derivative Test: if (concave down at ), then is a local maximum, and since it is the only critical point, it is the absolute maximum. If (concave up at ), it is the absolute minimum.

Worked Example

Problem: A small business sells custom phone cases, and daily profit from producing cases is given by , for . Find the maximum possible daily profit.

Solution:

  1. Domain is , an open interval, so we use the Second Derivative Test here.
  2. Find critical points: First derivative . Set equal to 0: , which is the only critical point in .
  3. Test concavity: Second derivative , which is less than 0 for all , so the function is concave down everywhere, so is a local maximum.
  4. Since this is the only critical point, it is the absolute maximum. Compute profit: .

Final result: The maximum daily profit is $462.50.

Exam tip: If you have only one critical point in the domain, always explicitly state that it is the absolute extremum because of the test result — this is a required step for full credit on FRQs.

Common Pitfalls (and how to avoid them)

  • Wrong move: Forgetting to restrict the domain of the objective function to physically valid values, e.g., keeping negative lengths or allowing a negative side length in the fencing problem. Why: Students rush to take derivatives after setting up the function and skip the domain step, leading to testing invalid -values. Correct move: Always write the domain explicitly after setting up the objective function, before proceeding to find critical points.
  • Wrong move: Stopping at finding the critical point and not confirming it is the absolute maximum/minimum, especially on open intervals. Why: Students assume any critical point is the desired extremum without justifying it, which loses points on FRQs. Correct move: For closed intervals, evaluate at endpoints and critical points; for open intervals, apply the first or second derivative test and explicitly state the conclusion that it is the absolute extremum.
  • Wrong move: Maximizing or minimizing the wrong quantity, e.g., maximizing side length instead of area in a fencing problem. Why: Students misread the problem statement and mix up the objective and the constraint. Correct move: Underline the quantity the problem asks you to maximize/minimize when you first read the problem, and label your objective function clearly with that quantity.
  • Wrong move: Leaving the objective function as a function of two variables after substitution. Why: Students are careless with substitution and don't check that all extra variables are eliminated. Correct move: After substitution, confirm that your objective function only has one independent variable, with no other variables remaining.
  • Wrong move: Forgetting that the absolute extremum can occur at an endpoint of the domain, even if it is not a critical point. Why: Students only test critical points and skip endpoints, leading to the wrong answer when the maximum/minimum is at the boundary. Correct move: For closed intervals, always add endpoints to your list of candidate points to evaluate.
  • Wrong move: Using the second derivative test when or does not exist. Why: Students overgeneralize the second derivative test and forget its limitations. Correct move: If or does not exist, use the first derivative test to classify the critical point instead.

Practice Questions (AP Calculus AB Style)

Question 1 (Multiple Choice)

You have 80 meters of fencing to enclose a rectangular garden, with fencing required on all four sides. What is the maximum possible area of the garden? A) B) C) D)

Worked Solution: First, define variables = length of one side, = length of the adjacent side. The objective is to maximize area . The constraint is a fixed perimeter of 80 meters, so , which simplifies to . The domain is , so the objective function becomes . Find the critical point: . Evaluate candidates: , , . The maximum area is . Correct answer: C.


Question 2 (Free Response)

A cardboard box with an open top is constructed by cutting equal-sized squares of side length out of each corner of a 10 inch by 15 inch rectangular sheet of cardboard, then folding up the sides. (a) Write the volume of the box as a function of , and state its domain. (b) Find all critical points of on the domain, and classify each as a maximum, minimum, or neither. (c) Find the maximum possible volume of the box, and justify your answer.

Worked Solution: (a) After cutting out squares of side , the base of the box has dimensions inches by inches, and height inches. Volume is length × width × height, so: All sides must be positive, so and . Domain: .

(b) First derivative: . Use the quadratic formula to find roots: Only is inside , the other root is outside the domain. Second derivative , so , so is a local maximum. Endpoints and are local minima (volume = 0 at both).

(c) Use the Closed Interval Method: , , cubic inches. Since is larger than the endpoint values, it is the absolute maximum. The maximum possible volume is approximately 132 cubic inches.


Question 3 (Application / Real-World Style)

A hiker is 2 miles away from the nearest point on a straight paved road. They can hike at 4 miles per hour off-road on grass, and 5 miles per hour on the paved road. They want to reach a parking area 6 miles down the road from that nearest point. What is the minimum possible time for the hiker to reach the parking area? Include units in your answer.

Worked Solution: Let = distance along the road from the nearest point to where the hiker exits grass onto the road. Off-road distance is , on-road distance is , domain . Time is distance divided by speed, so: Derivative: . Set to zero: (inside domain). Evaluate candidates: hours, hours, hours. The minimum possible time is 1.5 hours (1 hour 30 minutes). In context: The hiker minimizes their total travel time by exiting the grass 8/3 of a mile down the road from the nearest point, for a total trip time of 90 minutes.

Quick Reference Cheatsheet

Category Formula / Steps Notes
Objective Function = quantity to maximize/minimize Must be a function of a single variable after substitution using the constraint
Constraint Fixed relationship between variables Used to eliminate extra variables; never confuse with the objective
Closed Interval Method 1. Find critical points; 2. Evaluate at critical points + endpoints; 3. Select largest/smallest value Only applies to continuous functions on closed bounded intervals; required for full AP FRQ credit
First Derivative Test (Open Interval) Increasing before , decreasing after → absolute max; decreasing before, increasing after → absolute min Use when there is exactly one critical point in the open domain
Second Derivative Test (Open Interval) → absolute max; → absolute min Only works if and ; use first derivative test if
Domain Restriction must satisfy physical constraints All lengths, areas, and counts are positive; domain is required before finding extrema
Extreme Value Theorem Continuous on has an absolute max and absolute min on Guarantees extrema exist for closed interval optimization problems

What's Next

Solving optimization problems is the capstone applied skill for Unit 5: Analytical Applications of Differentiation. After mastering optimization, you will next apply the same core skills of translating context to mathematical equations to related rates problems, which require implicit differentiation to solve for unknown rates of change. Without mastering variable definition, equation setup, and derivative-based extrema classification from this chapter, related rates and other applied derivative problems will be significantly harder to solve correctly. Optimization also builds on the extrema concepts you learned earlier in Unit 5, and feeds into integration applications like finding total profit from marginal cost functions later in the course.

Follow-on topics to study next: Related Rates Extreme Value Theorem Mean Value Theorem Curve Sketching

← Back to topic

Stuck on a specific question?
Snap a photo or paste your problem — Ollie (our AI tutor) walks through it step-by-step with diagrams.
Try Ollie free →