← Back to Calculus

Setting up optimization problems

Word problems become calculus problems through one discipline: one objective function, one constraint, one derivative set to zero.

Four-step setup

First name the variables and draw a picture. Second, write the quantity to maximize or minimize as a function of one variable, using the constraint to eliminate the extra variable. Third, differentiate and set the derivative to zero to find critical numbers. Fourth, verify the answer with a test or the problem's context, then state it in words.

A = x y, \quad \text{constraint: } 2x + y = 120

Worked example

A farmer has 120 meters of fence for a rectangular pen along a river, needing no fence on the river side. With x the two widths and y the length, the constraint is 2x + y = 120, so y = 120 - 2x. The area A(x) = x(120 - 2x) = 120x - 2x^2 has derivative 120 - 4x, zero at x = 30. Then y = 60 and the largest area is 1800 square meters.

A(x) = 120x - 2x^2, \quad A'(x) = 120 - 4x = 0

Confirming the optimum

A critical number is only a candidate, so confirm it is the extremum you want. The second derivative test works here: A'' = -4 is negative, so x = 30 is a maximum. Context also helps, since area is zero at the fence running out, so the single interior critical point must be the peak.

A''(x) = -4 < 0

Flashcard

A'(x) = 0

Critical condition for the objective function

The optimum of a smooth objective on an open interval occurs where its derivative vanishes. Solve this equation, then use the second derivative or a sign chart to confirm it is a maximum or minimum.

Check your understanding

Two positive numbers have product 36. What is their smallest possible sum, and when does it occur?

Take the unit quiz

← Previous lesson Next lesson →