AP® Calculus AB · Unit 5 · Topic 5.11

Optimization with a Constraint Equation

A constraint equation lets you rewrite one variable in terms of another, so a quantity that seems to depend on two things actually depends on only one. Then ordinary derivative tests find its max or min.

Most optimization problems hand you a quantity to maximize or minimize, like volume or area, that depends on two variables. You can't take a derivative with respect to two variables at once using single-variable calculus, so the constraint equation, some fixed relationship those variables must obey, does half the work. It lets you solve for one variable in terms of the other and substitute, collapsing the problem down to a single-variable function. Only then does d/dx mean anything.

Once you have one function of one variable, the rest is Unit 5 as usual: take the derivative, set it to zero, check it's a max using the first or second derivative test, and confirm the critical point actually sits inside the domain the problem allows. That last check matters more here than anywhere else, because the formula you built often stays defined for x values that make no physical sense, like a negative length or a cutout bigger than the sheet. The real domain comes from the situation, not the algebra.

This topic is where Unit 5's theory becomes a tool. Finding critical points and classifying them with derivative tests, from earlier in the unit, only becomes useful for real problems once you can reduce a two-variable setup to one variable. The next step after this is usually optimization without a tidy algebraic constraint, where the relationship between variables is implicit, but the core move, substitute, differentiate, check the domain, confirm the extremum, stays exactly the same.

Key terms

Constraint equation
A fixed relationship between the variables in a problem that lets you express one variable in terms of another.
Substitution
Replacing one variable with an equivalent expression from the constraint so the function depends on only one variable.
Critical point
A point where the derivative is zero or undefined, and a candidate for a maximum or minimum.
Domain restriction
Limits on the variable's possible values coming from the physical setup, not just where the formula is mathematically defined.

Watch it explained

  1. How it worksHow does substituting the constraint collapse two variables down to one?
  2. Worked exampleFind the largest volume of an open box cut from a 20 by 30 inch sheet with square corners removed.
  3. Common mistakeWhy isn't the domain of an optimization variable all of the real numbers?
  4. Ties togetherHow does substituting a constraint equation echo confirming that a critical point is optimal?

Check yourself

Your turn1 of 3
A 21 by 32 inch sheet has squares of side x cut from its corners and the sides folded up to form an open box. Find the value of x that maximizes the box's volume.

End of topic.