Optimization Problems

Optimization means finding the best possible value of something — the largest area, the smallest cost, the biggest volume. Calculus is built for this: the best value almost always sits at a local maximum or minimum, where the derivative is zero.

The recipe is always the same:

  1. Model the quantity to optimize as a function of one variable.
  2. Differentiate and set the derivative to zero.
  3. Solve for the critical point, and confirm it's a max or min.

The classic box problem

Take a 12 \times 12 sheet of card. Cut a square of side x from each corner and fold up the flaps to make an open box. How big should the cut be to hold the most?

The base is (12-2x) on each side and the height is x, so:

V(x) = x(12 - 2x)^2, \qquad 0 < x < 6

Drag the slider: the box starts flat (no height), grows to a peak, then collapses (no base). The volume curve below tops out at a single best cut.

Solve it with calculus

Expand and differentiate:

V(x) = 144x - 48x^2 + 4x^3, \qquad V'(x) = 144 - 96x + 12x^2 = 12(x-2)(x-6)

Setting V'(x)=0 gives x=2 or x=6. Only x=2 is inside the allowed range, and there V'' = -96 + 24x = -48 < 0 — concave down, a maximum. The best cut is x = 2, giving

V(2) = 2(12-4)^2 = 2 \cdot 64 = 128 \text{ cm}^3.

A second classic: the fence

With 100 m of fencing against a river (no fence needed on the river side), what rectangle encloses the most area? If the two sides are x and the far side is 100-2x:

A(x) = x(100 - 2x), \quad A'(x) = 100 - 4x = 0 \;\Rightarrow\; x = 25,\; A = 1250 \text{ m}^2.

Same three steps: model, differentiate, solve. Drag below to watch the area peak at x=25.

Watch it on Khan Academy