AP Calculus AB and BC
Optimization Word Problems: Setup, Constraint, Solve
Solve an optimization problem by using the constraint (the fixed limitation) to rewrite the objective (the quantity you are maximizing or minimizing) as a function of one variable, setting its derivative equal to zero, and justifying the extreme value with a derivative test.
Spotting an optimization problem
Optimization problems ask for the single best value of something: the largest area, the smallest cost, the most volume, the shortest distance, the least material. That superlative is the tell. Topics 5.10 and 5.11 build directly on the extrema work from Topics 5.2 through 5.7, so once the function is written down, the calculus is the max/min routine you already know. The hard part, and the part almost every missed problem comes down to, is turning the sentence into that function.
Two quantities are always in play: one varies and one is pinned down. The quantity that varies and that you want at its extreme is the objective. The quantity that is fixed (a set amount of fencing, a required volume, a sheet of a given size) is the constraint. Read the problem once just to name these two before you write any math.
Objective vs constraint: the setup that trips everyone
The objective function is the thing the question asks you to make as big or as small as possible. If the sentence ends in maximize the area, the objective is area; if it ends in minimize the cost, the objective is cost. Write it as a formula: , , . It usually starts with two variables, and that is fine for now.
The constraint is the fixed number the problem hands you. The sentence 'you have 400 feet of fencing' is a constraint for a three-sided pen (one side runs along a river and needs no fence): . The sentence 'the box must hold 32,000 cubic centimeters' is a constraint: . The constraint is almost always an equation, and its job is to connect the two variables that appear in the objective.
Here is the move that solves every one of these problems: solve the constraint for one variable and substitute it into the objective. That collapses the objective to a function of a single variable, which is exactly what a derivative test needs. If you ever find yourself trying to differentiate a formula that still has two variables in it, you skipped this step.
Reading the constraint out of a fence problem versus a box problem works the same way. In a fence problem the fixed total length of fencing is the constraint and the enclosed area is the objective. In a box built from a flat sheet, the sheet size is baked into the dimensions themselves, so there may be no separate constraint equation to write; in a box of required volume, that volume is the constraint and the surface area (material) is the objective.
Quick test: which is which?
You optimize the objective; you never optimize the constraint. The objective is what the question asks for (largest, smallest, most, least). The constraint is a fixed fact about the situation, stated as a given number.
The method, step by step
Every optimization problem follows the same five moves. Do them in order and the setup stops being the scary part.
- Draw and label. Assign a variable to every unknown length and sketch the figure. A picture prevents almost every setup error.
- Write the objective function: the quantity to be maximized or minimized, as a formula.
- Write the constraint equation, solve it for one variable, and substitute so the objective depends on one variable only. State the domain (the values that make physical sense).
- Differentiate and find the critical points: set the derivative equal to zero and solve, and note anywhere it fails to exist.
- Justify that the critical point gives the extreme value you want, then answer the actual question with units.
Do not skip the domain in step three. Physical quantities cannot be negative, and a length like in a by sheet cannot exceed once you cut squares from both ends. The domain tells you which critical points to throw out and, when it is a closed interval, which endpoints you must check.
Justifying the max or min (AP requires it)
Finding the critical point is not the answer. The exam awards a specific point for showing that the critical point is actually the maximum or minimum you claim, and a numeric answer with no justification loses it. You have three legitimate tools.
- First derivative test: show changes from positive to negative at the critical point (a maximum) or from negative to positive (a minimum).
- Second derivative test: show is negative at the critical point (concave down, a maximum) or positive (concave up, a minimum).
- Candidates test: if the domain is a closed interval, evaluate the objective at every critical point and at both endpoints, then pick the largest or smallest value.
There is a shortcut worth knowing from Topic 5.5: if the objective is continuous and has exactly one critical point on the interval, and that point is a local extremum, then it is the global extremum too. That single-critical-point argument is enough justification on its own, and most optimization problems are built to have exactly one critical point in their domain.
Common mistakes
Differentiating the objective before substituting, so it still has two variables. Forgetting the domain, then reporting a critical point that is negative or otherwise impossible. Answering the wrong quantity: the problem asks for the maximum area and you stop at the value of . Skipping the justification. On free-response that is a lost point every single time.
Worked examples
Worked example
Fence against a river: maximize area
A farmer has 400 feet of fencing to build a rectangular pen along a straight river. The side along the river needs no fence. What dimensions give the largest area?
- Let be the length of each side perpendicular to the river and the side parallel to it. Only three sides are fenced, so the fencing used is .
- Constraint (fixed fencing): . Solve for : .
- Objective (area to maximize): . Substitute the constraint: .
- Domain: forces , so .
- Differentiate and find the critical point: . Set , so and .
- Justify the maximum with the second derivative test: , so the graph is concave down and is a maximum.
- Answer the question: and . The pen is 100 ft by 200 ft.
100 ft by 200 ft, giving a maximum area of 20,000 square feet.
Worked example
Open-top box from a sheet: maximize volume
An open-top box is made from a 12-inch by 12-inch sheet of cardboard by cutting equal squares of side from each corner and folding up the sides. What value of maximizes the volume?
- Let be the side of each square cut from the corners. After folding, the base is by and the height is .
- Objective (volume to maximize): . There is no separate constraint equation here: the sheet size is already built into the dimensions.
- Domain: the base side must be positive, so , giving .
- Expand: , so .
- Differentiate: .
- Critical points: or . Since is outside the domain (it gives zero volume), the only candidate is .
- Justify with the first derivative test: for , so ; for , so . changes from positive to negative at , a maximum.
- Answer: . Cut 2-inch squares.
Cut squares of side 2 inches, giving a maximum volume of 128 cubic inches.
Worked example
Box of fixed volume: minimize material
A box with a square base and an open top must hold 32,000 cubic centimeters. Find the dimensions that use the least material.
- Let be the side of the square base and the height. The volume is , and with a base plus four sides (open top) the surface area is .
- Constraint (fixed volume): . Solve for : .
- Objective (material to minimize): . Substitute: .
- Domain: .
- Differentiate: . Set : .
- Solve: , so and .
- Justify the minimum: for all , so the graph is concave up and the single critical point is the absolute minimum.
- Answer: and .
A 40 cm by 40 cm base with height 20 cm, using 4,800 square centimeters of material.
Frequently asked questions
How do I tell the objective from the constraint?
The objective is the quantity the problem asks you to maximize or minimize; the constraint is the fixed amount you are given. You optimize the objective and use the constraint to eliminate a variable. If a sentence says find the largest volume, volume is the objective; if it says using 60 feet of wire, that 60 is the constraint.
Do I have to justify the maximum or minimum on the AP exam?
Yes. On free-response, a correct answer with no justification does not earn full credit. Show a first derivative test, a second derivative test, or a candidates test, or argue that a single critical point on the interval must be the global extremum.
What if the problem has no closed interval?
Use the first or second derivative test, or the single-critical-point argument. The candidates test needs endpoints; when the domain is open (like ), rely on the sign of or instead.
Is optimization on both AP Calculus AB and BC?
Yes. Topics 5.10 and 5.11 are part of Unit 5, which both AB and BC cover, so optimization can appear on either exam.