# Solving Optimization Problems

> AP Calculus AB · Analytical Applications of Differentiation
> Source: https://www.owlsprep.com/study/ap-calculus-ab-u5-solving-optimization-problems/

This module covers core techniques for solving AP Calculus AB optimization problems, including setting up objective functions, applying domain restrictions, using the Closed Interval Method, and testing extrema for both MCQ and FRQ questions.

**Prerequisites:** Computing first and second derivatives of common functions; [Finding critical points of functions](https://www.owlsprep.com/study/ap-calculus-ab-u5-extreme-value-theorem/); [Testing for local and absolute extrema](https://www.owlsprep.com/study/ap-calculus-ab-u5-extreme-value-theorem/)

## Learning objectives

- Translate contextual optimization word problems into single-variable objective functions with valid domains
- Apply the Closed Interval Method to find absolute extrema on closed intervals
- Use first and second derivative tests to find absolute extrema on open intervals
- Identify and avoid common exam pitfalls in AP-style optimization problems

## 1. Introduction to Optimization Problems

Optimization problems are applied absolute extrema problems that ask you to find the maximum or minimum possible value of a real-world quantity (area, volume, profit, time) under given constraints. Unlike abstract extrema problems where you are given a function directly, optimization requires you to first translate a word problem into a single-variable objective function before finding the absolute extremum.

This topic appears regularly on both multiple-choice and free-response sections of the AP Calculus AB exam, often as a multi-part FRQ worth multiple points, and counts as part of the 15-18% of Unit 5 exam score.

**Optimization Problem** — An applied extrema problem that requires finding the maximum or minimum value of a contextual quantity subject to fixed constraints.

*Example:* Finding the maximum area of a rectangle with a fixed perimeter is a common optimization problem.

## 2. Setting Up the Objective Function and Constraint

The most challenging step of any optimization problem is correctly translating the verbal problem into mathematical equations. Every optimization problem has two key non-negotiable components.

1. Explicitly define all variables, labeling what each represents (include units where applicable)
2. Write the objective quantity as a function of all your variables
3. Use the constraint to solve for one variable in terms of the other, substitute into the objective function to get a single-variable function
4. Find the valid domain of the objective function based on physical constraints of the problem

**Worked example:** 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.

1. Define variables: Let $x$ = the length of each side perpendicular to the river, $y$ = length parallel to the river. All lengths are positive: $x>0, y>0$.
2. Objective: Maximize area $A = xy$.
3. Constraint: Total fencing is 120 ft, so $2x + y = 120$.
4. Solve constraint for $y$:
5. $$y = 120 - 2x$$
6. Substitute to get single-variable objective function:
7. $$A(x) = x(120 - 2x) = 120x - 2x^2$$
8. Find domain: Since $x>0$ and $y=120-2x>0$, we get $0 < x < 60$.
9. Final result: Objective function $A(x) = 120x - 2x^2$, domain $(0, 60)$.

> **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 $[a,b]$, 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, reliable technique for finding these absolute extrema, and it is the most commonly tested method on the AP exam.

1. Confirm the objective function is continuous on $[a,b]$ (almost always true for AP problems)
2. Find all critical points of $f(x)$ on the open interval $(a,b)$
3. Evaluate $f(x)$ at each critical point and at both endpoints $x=a$ and $x=b$
4. The largest value is the absolute maximum, the smallest value is the absolute minimum

**Worked example:** Using the fencing pen problem from the previous section: $A(x) = 120x - 2x^2$ over $[0,60]$, find the maximum possible area of the pen.

1. Confirm continuity: $A(x)$ is a polynomial, so it is continuous on $[0,60]$, so the Extreme Value Theorem applies.
2. Find critical points: Compute first derivative:
3. $$A'(x) = 120 - 4x$$
4. Set equal to zero:
5. $$120 - 4x = 0 \implies x=30$$
6. One critical point at $x=30$, inside the interval.
7. Evaluate $A(x)$ at all candidates: $A(0) = 0$, $A(30) = 1800$, $A(60) = 0$
8. The largest value is 1800, so maximum 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., $0 < x < \infty$) or has only one endpoint. In these cases, the Extreme Value Theorem does not guarantee an absolute extremum, but for almost all AP contextual problems, there will be exactly one critical point in the domain. We can use the First or Second Derivative Test to confirm this critical point is the absolute extremum.

- **First Derivative Test**: If increasing before $c$ and decreasing after $c$ → absolute maximum; if decreasing before $c$ and increasing after $c$ → absolute minimum
- **Second Derivative Test**: If $f''(c) < 0$ (concave down) → absolute maximum; if $f''(c) > 0$ (concave up) → absolute minimum

**Worked example:** A small business sells custom phone cases, and daily profit from producing $x$ cases is given by $P(x) = -0.5x^2 + 35x - 150$, for $x>0$. Find the maximum possible daily profit.

1. Domain is $(0, \infty)$, an open interval, so we use the Second Derivative Test.
2. Find critical points: First derivative:
3. $$P'(x) = -x + 35$$
4. Set equal to zero:
5. $$-x + 35 = 0 \implies x=35$$
6. $x=35$ is the only critical point in the domain.
7. Second derivative:
8. $$P''(x) = -1$$
9. $P''(x) < 0$ for all $x$, so $x=35$ is a local maximum. Since it is the only critical point, it is the absolute maximum.
10. Calculate profit:
11. $$P(35) = -0.5(35)^2 + 35(35) - 150 = 462.5$$
12. Final result: 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.

## 5. Additional AP-Style Worked Examples

**Worked example:** 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?<br>A) $200 \text{ m}^2$ B) $300 \text{ m}^2$ C) $400 \text{ m}^2$ D) $1600 \text{ m}^2$

1. Define variables: $x$ = length of one side, $y$ = adjacent side. Objective: Maximize $A = xy$. Constraint: Perimeter = 80 → $y = 40 - x$. Domain $[0,40]$.
2. Objective function:
3. $$A(x) = x(40 - x) = 40x - x^2$$
4. Find critical point:
5. $$A'(x) = 40 - 2x = 0 \implies x=20$$
6. Evaluate candidates: $A(0)=0$, $A(20)=400$, $A(40)=0$. Maximum area is $400 \text{ m}^2$, correct answer is C.

**Worked example:** An open-top cardboard box is made by cutting equal squares of side $x$ from each corner of a 10in × 15in cardboard sheet, then folding up sides. (a) Write $V(x)$ and state its domain. (b) Find and classify critical points. (c) Find maximum volume and justify.

1. Part (a): After cutting, base dimensions are $(15-2x)$ × $(10-2x)$, height $x$. Volume:
2. $$V(x) = x(15-2x)(10-2x) = 4x^3 - 50x^2 + 150x$$
3. All sides positive → domain $[0, 5]$.
4. Part (b): First derivative:
5. $$V'(x) = 12x^2 - 100x + 150$$
6. Quadratic formula gives roots $x = \frac{25 \pm 5\sqrt{7}}{6}$, only $x \approx 1.96$ is inside the domain. $V''(1.96) \approx -53 < 0$, so it is a local maximum. Endpoints are minima with $V=0$.
7. Part (c): By Closed Interval Method, $V(1.96) \approx 132$ cubic inches, which is larger than endpoints. Maximum volume is ~132 cubic inches.

**Worked example:** A hiker is 2 miles off a straight paved road. They hike 4 mph off-road and 5 mph on-road. They want to reach a parking lot 6 miles down the road from the nearest point. Find the minimum possible travel time.

1. Let $x$ = distance along road from nearest point to exit point. Off-road distance: $\sqrt{x^2 + 4}$, on-road distance: $6-x$. Domain $[0,6]$.
2. Time = distance/speed, so:
3. $$T(x) = \frac{\sqrt{x^2 + 4}}{4} + \frac{6-x}{5}$$
4. Derivative set to zero: $\frac{x}{4\sqrt{x^2+4}} = \frac{1}{5}$ → solving gives $x = \frac{8}{3} \approx 2.67$, inside domain.
5. Evaluate candidates: $T(0) = 1.7$ hours, $T(8/3) = 1.5$ hours, $T(6) \approx 1.58$ hours. Minimum time is 1.5 hours (90 minutes).

## Common pitfalls

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

## Cheatsheet

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

## 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 topic, 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 it prepares you for integration applications like finding total profit from marginal cost functions later in the AP Calculus AB course.

- [Mean Value Theorem](https://www.owlsprep.com/study/ap-calculus-ab-u5-mean-value-theorem/)
- [Behaviors of implicit relations](https://www.owlsprep.com/study/ap-calculus-ab-u5-behaviors-of-implicit-relations/)
- [Integration and Accumulation of Change Overview](https://www.owlsprep.com/study/ap-calculus-ab-u6-overview/)

---

From [OwlsPrep](https://www.owlsprep.com) — free study guides for A-Level, IB, AP and IGCSE, written against the official syllabus. Canonical page: https://www.owlsprep.com/study/ap-calculus-ab-u5-solving-optimization-problems/
