AP-CALCBC-5.10-5.11

U5.10 Optimization Problems

Master AP Calculus BC optimization: identify the quantity to optimize, use a constraint to reduce to one variable, and find extrema with critical points.

What you'll do in this lesson

A voice-first session with the Crimsora tutor on U5.10 Optimization Problems, then targeted practice and FRQs — with the tutor adapting to where you get stuck.

What this lesson covers

Optimization problems ask you to find the biggest or smallest possible value of something real — the largest area, the cheapest box, the shortest distance. They are word problems wearing a calculus disguise, and they reward students who can translate English into a function and then hunt down its extreme value.

In this lesson you will build a reliable four-step routine: name the quantity to optimize, write it using the variables in the problem, use a constraint equation to eliminate all but one variable, and then apply the derivative tools you already know from earlier in Unit 5. The hardest part is almost never the calculus — it is the setup and confirming that your critical point really gives a maximum or minimum on the allowed domain.

The Optimization Workflow

Every optimization problem follows the same skeleton. First, identify the objective function — the quantity you must maximize or minimize (area, volume, cost, distance). Second, identify the constraint — an equation that ties your variables together (a fixed perimeter, a fixed surface area, a fixed budget). Third, use the constraint to rewrite the objective as a function of a single variable. Fourth, differentiate, find critical points, and test them.
StepWhat you doExample phrase
1Define variables, draw a picturelet xx = width, yy = height
2Write the objectivemaximize A=xyA = xy
3Write the constraint2x+2y=402x + 2y = 40
4Substitute to one variableA(x)=x(20x)A(x) = x(20 - x)
5OptimizeA(x)=0A'(x)=0, then test
The objective is what the question asks you to make extreme. The constraint is the fixed condition, usually signaled by words like "fixed," "total," "available," or a given number. Keep them straight: mixing them up is the most common setup error.

Reducing to One Variable

Calculus tools like the first and second derivative tests work on single-variable functions, so you must eliminate every variable except one. The constraint equation is your tool for this. Solve the constraint for one variable and substitute it into the objective.

Suppose you want to maximize area A=xyA = xy subject to 2x+2y=402x + 2y = 40. Solve the constraint: y=20xy = 20 - x. Substitute: A(x)=x(20x)=20xx2A(x) = x(20 - x) = 20x - x^2. Now AA is a clean function of xx alone.

Before differentiating, determine the domain of the reduced function from the physical situation. Lengths cannot be negative, so x0x \ge 0; and since y=20x0y = 20 - x \ge 0, we need x20x \le 20. The domain is 0x200 \le x \le 20. This closed interval matters: the Extreme Value Theorem guarantees a max and min exist, and you may need to check endpoints as well as interior critical points.

A misconception to avoid: students sometimes substitute the constraint into the wrong equation or forget to substitute at all and try to differentiate a two-variable expression. Always end Step 4 with a function that depends on exactly one letter.

Finding and Justifying the Extremum

Once you have a single-variable objective, set the derivative equal to zero to find critical points. Then justify that the critical point is the max or min the problem wants — the AP exam frequently docks points for an unjustified answer.

There are three standard justifications. The First Derivative Test checks the sign of ff' on either side of the critical point: if ff' changes ++ to -, that point is a local max. The Second Derivative Test checks ff'' at the critical point: f<0f'' < 0 means a local max, f>0f'' > 0 means a local min. The Closed Interval (Candidates) Test evaluates the objective at every critical point and every endpoint, then compares values.

For A(x)=20xx2A(x) = 20x - x^2: A(x)=202x=0A'(x) = 20 - 2x = 0 gives x=10x = 10. Since A(x)=2<0A''(x) = -2 < 0, the graph is concave down everywhere, so x=10x = 10 is a maximum. Then y=2010=10y = 20 - 10 = 10, giving maximum area A=100A = 100.

Always answer the actual question. If it asks for the dimensions, report xx and yy; if it asks for the maximum area, report 100100 square units. State units and confirm the answer makes physical sense.

How the Exam Tests Optimization

On multiple-choice questions, optimization often appears compressed: you are handed the objective already reduced, or given a formula and asked for the value of xx that maximizes it. Speed matters, so recognize that you usually just need f(x)=0f'(x) = 0 plus a quick concavity check.

Free-response optimization questions demand full communication. A typical rubric awards points for the correct objective function, the correct use of the constraint, the derivative and critical point, and — crucially — a justification that the critical point produces the desired extremum. Writing "A(x)=0A'(x)=0 at x=10x=10" is not enough; you must add why x=10x = 10 gives a maximum.
Common pitfallFix
No justificationState sign of ff' or ff''
Wrong domainDerive domain from physical limits
Answered wrong quantityReread what is asked
Forgot endpointsUse candidates test on closed intervals
Many optimization scenarios involve minimizing distance. A useful trick: minimizing distance d=f(x)d = \sqrt{f(x)} is equivalent to minimizing d2=f(x)d^2 = f(x), because the square root is increasing. Optimizing d2d^2 avoids messy derivatives and yields the same xx.

Key terms

Objective function.
The quantity being maximized or minimized, expressed as a formula (for example area, volume, cost, or distance).
Constraint.
A fixed condition relating the variables, such as a set perimeter or surface area, used to eliminate variables.
Critical point.
A value in the domain where the derivative equals zero or is undefined; a candidate for a local extremum.
Second Derivative Test.
A method that classifies a critical point using concavity: f<0f''<0 indicates a local max, f>0f''>0 a local min.
Closed Interval (Candidates) Test.
Evaluating the objective at all critical points and endpoints to find the absolute extremum on a closed interval.
Domain restriction.
The set of input values allowed by the physical situation, such as nonnegative lengths, which bounds the search for extrema.
Extreme Value Theorem.
Guarantees a continuous function on a closed interval attains an absolute max and min, ensuring optimization has a solution.

Worked example

A rancher has 400 meters of fencing and wants to enclose a rectangular field along a straight river, using the river as one full side (so no fence is needed there). What dimensions maximize the enclosed area, and what is that maximum area?
Draw the rectangle with the river as the top side. Let xx be the length of each of the two sides perpendicular to the river, and let yy be the side parallel to the river.

Objective: maximize area A=xyA = xy.

Constraint: only three sides need fencing (two of length xx, one of length yy), so 2x+y=4002x + y = 400.

Solve the constraint for yy: y=4002xy = 400 - 2x. Substitute into the objective: A(x)=x(4002x)=400x2x2A(x) = x(400 - 2x) = 400x - 2x^2.

Domain: x0x \ge 0 and y=4002x0y = 400 - 2x \ge 0 give 0x2000 \le x \le 200.

Differentiate: A(x)=4004xA'(x) = 400 - 4x. Set equal to zero: 4004x=0400 - 4x = 0, so x=100x = 100.

Justify: A(x)=4<0A''(x) = -4 < 0, so the function is concave down and x=100x = 100 is a maximum.

Find the other dimension: y=4002(100)=200y = 400 - 2(100) = 200.

Maximum area: A=(100)(200)=20000A = (100)(200) = 20000 square meters. The optimal field is 100 m deep and 200 m along the river, enclosing 2000020000 square meters.

Practice questions

An open-top box is made from a square base of side length xx and height hh, with a fixed volume of 3232 cubic units. The material cost is proportional to the surface area S=x2+4xhS = x^2 + 4xh. Which equation, after using the constraint, gives SS as a function of xx alone?
  1. S(x)=x2+128xS(x) = x^2 + \frac{128}{x}
  2. S(x)=x2+32xS(x) = x^2 + \frac{32}{x}
  3. S(x)=x2+128xS(x) = x^2 + 128x
  4. S(x)=4x2+32x2S(x) = 4x^2 + \frac{32}{x^2}

Answer: S(x)=x2+128xS(x) = x^2 + \frac{128}{x}

The volume constraint is x2h=32x^2 h = 32, so h=32x2h = \frac{32}{x^2}. Substitute into S=x2+4xh=x2+4x32x2=x2+128xS = x^2 + 4xh = x^2 + 4x \cdot \frac{32}{x^2} = x^2 + \frac{128}{x}. The key move is solving the constraint for hh and substituting, which reduces two variables to one.
A company models profit as P(x)=2x2+240x1000P(x) = -2x^2 + 240x - 1000 dollars, where xx is the number of units produced (in hundreds). Find the production level that maximizes profit and justify that it is a maximum.

Answer: x=60x = 60 (that is, 6000 units), giving maximum profit of $6200.

Differentiate: P(x)=4x+240P'(x) = -4x + 240. Set P(x)=0P'(x) = 0: 4x+240=0-4x + 240 = 0, so x=60x = 60. Justify with the second derivative: P(x)=4<0P''(x) = -4 < 0, so PP is concave down and x=60x = 60 yields a maximum. Evaluate: P(60)=2(3600)+240(60)1000=7200+144001000=6200P(60) = -2(3600) + 240(60) - 1000 = -7200 + 14400 - 1000 = 6200 dollars. Always state both the location and the justification for full credit.
Find the point on the line y=2x+1y = 2x + 1 that is closest to the origin.

Answer: (25,15)\left(-\frac{2}{5}, \frac{1}{5}\right)

Distance from the origin to (x,y)(x, y) is d=x2+y2d = \sqrt{x^2 + y^2}. Minimize d2=x2+y2d^2 = x^2 + y^2 instead. Substitute the constraint y=2x+1y = 2x + 1: D(x)=x2+(2x+1)2=5x2+4x+1D(x) = x^2 + (2x+1)^2 = 5x^2 + 4x + 1. Then D(x)=10x+4=0D'(x) = 10x + 4 = 0 gives x=25x = -\frac{2}{5}. Since D(x)=10>0D''(x) = 10 > 0, this is a minimum. Then y=2(25)+1=15y = 2(-\frac{2}{5}) + 1 = \frac{1}{5}. The closest point is (25,15)\left(-\frac{2}{5}, \frac{1}{5}\right).

FAQ

How do I know which quantity is the objective and which is the constraint?
The objective is what the problem asks you to make as large or as small as possible — look for words like maximize, minimize, largest, smallest, or cheapest. The constraint is the fixed condition, usually a specific number attached to a total: a fixed amount of fencing, a set volume, or a given budget. The objective becomes the function you optimize; the constraint becomes the equation you use to eliminate a variable.
Do I have to use the Second Derivative Test to justify my answer?
No. Any valid justification earns credit: the First Derivative Test (sign change of ff'), the Second Derivative Test (sign of ff''), or the Candidates Test on a closed interval. Choose whichever is easiest for your function. The Second Derivative Test is fast when ff'' is simple, but if ff'' is messy, the First Derivative Test may be cleaner.
Why can I minimize distance squared instead of distance?
Because the square root function is strictly increasing, f(x)\sqrt{f(x)} and f(x)f(x) reach their minimum at the same input. Minimizing d2d^2 instead of dd produces the identical optimal xx while avoiding the chain rule on a square root, which keeps the derivative much simpler and reduces algebra errors.
What should I do if the critical point falls outside the physical domain?
Discard it and check the endpoints. The physical domain (nonnegative lengths, realistic quantities) restricts valid answers. If the only critical point is outside the domain, the extremum must occur at an endpoint. This is exactly why you should determine the domain before optimizing and use the Candidates Test on closed intervals.

Learn this with a teacher, not a page

The Crimsora tutor teaches U5.10 Optimization Problems live — explaining on a whiteboard, asking you questions, and adapting to where you get stuck.