What Makes a Constraint Problem Different?
Optimization problems ask you to find the largest or smallest possible value of some quantity. In many AP Calculus problems, however, the variables are not independent. A condition in the problem tells you how they are related.
That condition is called a constraint. Your job is to use the constraint to rewrite the quantity you want to optimize in terms of a single variable.
For example, suppose a rectangle has a fixed perimeter. You cannot choose its length and width independently. If the perimeter is 40, then the dimensions must satisfy a relationship such as . That relationship is the constraint.
The Basic Structure
Almost every constrained optimization problem can be organized into two equations:
The objective function is what you are trying to maximize or minimize. The constraint equation tells you how the variables are related.
The key idea is simple: use the constraint to eliminate one variable from the objective function. Once the objective is a function of one variable, ordinary calculus takes over.
A Reliable Step-by-Step Method
- Identify the quantity being optimized. Is the problem asking for maximum area, minimum cost, maximum volume, minimum distance, or something else?
- Define your variables. Give every important dimension or quantity a variable and include units when helpful.
- Write the objective function. Express the quantity you want to maximize or minimize.
- Write the constraint equation. Translate the information that restricts the variables.
- Solve the constraint for one variable.
- Substitute into the objective function. You should now have a one-variable function.
- Find critical points. Differentiate the objective function and solve , including any points where the derivative is undefined.
- Check the domain and endpoints. A critical point is a candidate, not automatically the answer.
- State the answer in context. Give the requested quantity and appropriate units.
Worked Example 1: Maximum Area with a Fixed Perimeter
A rectangular garden has a perimeter of 40 meters. What dimensions maximize its area?
Worked Example 2: Minimizing Material
An open-top box has a square base. The box must have a volume of 32 cubic inches. Find the dimensions that minimize the amount of material used.
Worked Example 3: Minimum Distance
Find the point on the parabola that is closest to the point .
Why We Often Optimize the Square of a Distance
Distance formulas frequently contain a square root. For example:
Because the square-root function is increasing for nonnegative inputs, minimizing the distance is equivalent to minimizing the expression inside the square root.
This is an important AP Calculus technique. It avoids unnecessary chain-rule algebra while giving exactly the same location of the minimum.
How to Recognize the Constraint
The constraint is usually hidden in the wording of the problem. Look for phrases such as:
- "has a fixed perimeter" → write a perimeter equation.
- "has a fixed volume" → write a volume equation.
- "uses a total of 100 feet of fencing" → write a fencing constraint.
- "must contain 500 square centimeters" → write an area constraint.
- "lies on the curve" → use the equation of the curve as the constraint.
- "costs a total of..." → write an equation connecting the quantities.
One Variable Is the Goal
The most important structural step is reducing the objective function to one variable. If you reach a derivative such as , you have probably not used the constraint completely.
For example, suppose you want to maximize but your constraint says . Solve the constraint:
Then substitute into the objective:
Now the optimization problem is a standard one-variable calculus problem.
Common Mistakes
The objective is what you are trying to maximize or minimize. The constraint is the restriction that connects your variables. Write both separately before doing any calculus.
If your objective still contains two independent variables, you are not ready to differentiate in a typical AP Calculus optimization problem. Use the constraint first.
A critical point is only a candidate. Use the first derivative test, second derivative test, endpoint comparison, or another valid argument to establish that it actually produces the requested maximum or minimum.
Lengths, widths, heights, and distances cannot normally be negative. The algebraic equation may allow values that make no physical sense, so always consider the context.
If the question asks for the dimensions, do not stop after finding the maximum area. If it asks for the minimum cost, do not report only the dimensions. Answer exactly what the problem asks.
Practice Problems
A rectangle has a perimeter of 60 meters. What dimensions maximize its area?
Show answer
An open-top box has a square base and volume 108 cubic inches. Find the dimensions that minimize its surface area.
Show answer
A farmer has 200 meters of fencing and wants to enclose a rectangular field along a straight river. No fencing is needed along the river. What dimensions maximize the area?
Show answer
Find the point on that is closest to the point .
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.
Get the Calc Pass App
Scan to download and practice on the go, with instant scoring.
Vol. 1: 1,114 Questions
The complete practice question bank, organized by AB & BC topic.
View on Amazon