Question
Minimizing the cost of an open-top rectangular box
Original question: You Try:
- Consider an open-top box which is to have a volume of 216 cubic inches. Suppose the material for the base is 20 cents/in and the cost of the material for the sides is 30 cents/in. What are the dimensions of the box that would minimize the cost to build the box?
Cost =
2nd -> trace -> min
Expert Verified Solution
Key concept: This is a classic constrained optimization problem: one variable determines the box dimensions, and the cost function is minimized with calculus.
Step by step
Set up the constraint and cost function
Let the square base have side length and height . Since the volume is fixed at 216 cubic inches,
so
The cost is different for the base and the sides. The base costs 20 cents per square inch, so its cost is
The sides have total area , and they cost 30 cents per square inch, so the side cost is
That gives the cost function
Differentiate and find the critical point
Differentiate with respect to :
Set the derivative equal to zero:
Multiply by :
So
and therefore
Since the cost function has a positive second derivative for , this critical point gives a minimum.
Compute the height and interpret the result
Now substitute into the volume equation:
So the dimensions that minimize cost are
This makes sense physically: when side material is more expensive than base material, the optimal box is relatively wider and shorter rather than tall and narrow.
Common calculus takeaway
The key idea is to rewrite the cost in one variable before differentiating. If you leave both and in the expression, you cannot minimize efficiently. The volume equation is what lets you eliminate and build a single-variable optimization problem.
Pitfall alert
A common mistake is treating the side area as instead of . The sides are rectangles, not squares, so each side has area , and there are four of them. Another frequent error is forgetting to convert cents into dollars consistently. The units do not change the minimizing dimensions, but they do matter if you want a correct cost function. Finally, some students stop after finding a critical point without checking whether it is a minimum; here, the second derivative test or the shape of the cost graph confirms the result.
Try different conditions
If the box were not square-based and instead had a rectangular base with length and width , the setup would change to and the cost would depend on both and . For example, if the problem became: "An open-top box has base dimensions by with volume 216," then the single-variable cost function would be different, and the minimizing dimensions would not be equal on the base. The optimization method is the same, but the algebra changes because the geometry of the base changes.
Further reading
constrained optimization, cost function, open-top box
FAQ
How do you build the cost function for an open-top box with a fixed volume?
Use the volume equation to write the height in terms of the base side length, then express the base cost and side cost with that single variable. Add them to form one cost function before differentiating.
Why does the derivative give the box dimensions with minimum cost?
Critical points of the cost function occur where the slope is zero. For this problem, the cost function is convex for positive dimensions, so the critical point corresponds to the minimum cost box.