Tutorials › AP Calculus › Solving Optimization Problems: An Introduction
← All AP Calculus Tutorials
AP Calculus AB & BC Intermediate

Solving Optimization Problems: An Introduction

Learn how to turn a real-world problem into a function, use derivatives to find its maximum or minimum, and justify why your answer is actually optimal.

What an Optimization Problem Is

An optimization problem asks you to find the largest or smallest possible value of some quantity. In calculus, that usually means finding a maximum or minimum of a function.

The challenge is that an optimization problem often does not give you the function directly. Instead, you are given a situation involving lengths, areas, volumes, distances, costs, or other quantities. Your first job is to translate the situation into mathematics.

Once you have written the quantity you want to maximize or minimize as a function of one variable, the calculus part is familiar: find critical points, check endpoints when appropriate, and determine which candidate produces the desired maximum or minimum.

The Basic Optimization Strategy

Most AP Calculus optimization problems can be organized into the same sequence:

  1. Identify what must be maximized or minimized. This is your objective quantity.
  2. Write an equation for the objective quantity.
  3. Use the given information to eliminate extra variables. This is the constraint step.
  4. Rewrite the objective as a function of one variable.
  5. Find the critical points by solving where the derivative is zero or undefined.
  6. Check the relevant endpoints or boundaries.
  7. Determine the answer in the context of the problem.

The important idea is that the derivative does not usually give you the final answer by itself. It gives you the locations where a maximum or minimum might occur. You still need to evaluate the candidates and interpret the result.

Objective Function vs. Constraint

Two equations are especially important in optimization problems: the objective function and the constraint.

The Objective Function

The objective function describes the quantity you are trying to maximize or minimize. For example, if the problem asks for the largest possible area, then area is the objective.

The Constraint

The constraint is the information that limits the possible values of the variables. For example, if a rectangle has a fixed perimeter, that perimeter equation connects its length and width.

The constraint is often what allows you to turn a two-variable objective function into a one-variable function that can actually be differentiated.

Worked Example 1: Maximum Area with a Fixed Perimeter

Example 1: Rectangle Optimization

A rectangle has a perimeter of 40 units. What dimensions give the rectangle the maximum possible area?

Step 1 — Identify the objective: We want to maximize the area:
Step 2 — Write the constraint: The perimeter is 40:
Step 3 — Solve the constraint for one variable:
Step 4 — Substitute into the objective:
Step 5 — Differentiate:
Step 6 — Find the critical point:
Step 7 — Find the other dimension:
Result: The rectangle with maximum area is a square with dimensions .

Notice what happened: the original area formula contained two variables, but the perimeter constraint allowed us to rewrite it using only one variable. That is the key setup step in many optimization problems.

Why Critical Points Matter

Suppose the objective function is . At an interior maximum or minimum, the graph must temporarily stop increasing or decreasing. For a differentiable function, that means the derivative is zero.

These values are called critical points. They are candidates for local maxima or minima, but a critical point is not automatically the answer to an optimization problem.

You must also consider the domain of the problem. If the variable is a length, for example, negative values usually make no physical sense. The relevant interval may have endpoints that also need to be checked.

Worked Example 2: Minimum Distance

Example 2: Distance Optimization

Find the point on the parabola that is closest to the point .

Step 1 — Choose a point on the parabola: Let the point be .
Step 2 — Write the distance function: The distance between two points is .
Step 3 — Simplify the objective: Because the square-root function is increasing, minimizing distance is equivalent to minimizing squared distance: .
Step 4 — Differentiate:
Step 5 — Find the critical point:
Step 6 — Find the corresponding y-value:
Result: The closest point is .

This example illustrates an important optimization trick: sometimes you can optimize a simpler function instead of the original quantity. Since squaring preserves which nonnegative distance is smaller, minimizing distance and minimizing squared distance produce the same point.

Worked Example 3: Maximum Volume

Example 3: Open-Top Box

A rectangular piece of cardboard is 20 units by 30 units. Equal squares of side length are cut from each corner, and the sides are folded upward to create an open-top box. What value of gives the maximum volume?

Step 1 — Identify the objective: Volume equals length times width times height: .
Step 2 — Express each dimension: After cutting out squares of side , the box dimensions are .
Step 3 — Write the volume function: .
Step 4 — Expand and differentiate:
Step 5 — Find critical points:
Step 6 — Use the physical domain: For the box to exist, . Therefore, only the critical point inside the valid interval is relevant.
Result: The value of that produces the maximum volume is approximately units.

Worked Example 4: Optimization with a Cost Function

Example 4: Minimum Cost

A company wants to build a rectangular enclosure against a straight wall. The wall forms one side, so fencing is needed for only the other three sides. The company has 200 meters of fencing. What dimensions maximize the enclosed area?

Step 1 — Define variables: Let be the width perpendicular to the wall and be the length along the wall.
Step 2 — Write the constraint: Only three sides require fencing: .
Step 3 — Solve for one variable: .
Step 4 — Write the objective: .
Step 5 — Substitute and differentiate: .
Step 6 — Find the critical point: .
Result: The maximum-area enclosure has width and length .

Finding the Maximum or Minimum Correctly

Once you have found critical points, there are several ways to determine whether a candidate gives the desired optimum.

For AP Calculus optimization problems, the safest approach is to use the actual domain and compare the relevant candidates. Do not simply solve and stop.

Common Mistakes

Writing the wrong objective function

Before differentiating anything, ask exactly what the problem wants to maximize or minimize. If it asks for maximum area, your objective must be an area function. If it asks for minimum cost, your objective must represent cost.

Forgetting the constraint

The constraint is what connects the variables. If your objective still contains two independent variables when you are ready to differentiate, you probably have not used the constraint yet.

Ignoring the domain

Algebra may produce critical points that make no physical sense. A length cannot be negative, and an expression representing a box dimension cannot be allowed to become zero or negative if the problem requires a three-dimensional box.

Assuming every critical point is the answer

A critical point is a candidate, not a guarantee. Evaluate the objective at the relevant candidates and endpoints, or use an appropriate derivative test to establish the maximum or minimum.

Giving only a number without units or context

Optimization problems are applications. State what your numerical answer represents and include appropriate units. For example, say "the maximum area is 1,000 square meters" rather than simply writing "1,000."

A Reliable AP Calculus Checklist

If you can consistently follow these steps, optimization problems become much less mysterious. The calculus itself is usually straightforward; the real skill is translating the words of the problem into the correct objective function and constraint.

Practice Problems

Question 1

A rectangle has a perimeter of 60 meters. Find the dimensions that maximize its area.

Show answer
Question 2

An open-top box is made by cutting equal squares from the corners of a 16-by-24-inch sheet of cardboard. Find the cut size that maximizes the volume.

Show answer
Question 3

Find the point on the parabola closest to the point .

Show answer
Question 4 — AP-Style Setup

A farmer has 240 meters of fencing and wants to enclose a rectangular region along a straight river. No fence is needed along the river. What dimensions maximize the enclosed area?

Show answer

Test yourself: AP Calculus practice exams

Ready to check what you know? Work an AP-style practice exam, then open the full solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon