A rectangular box is to have a square base and a volume of 40 ft3. If the material for the base costs \$0.31 per square foot, the material for the sides costs $0.05 per square foot, and the material for the top costs \$0.19 per square foot, determine the dimensions of the box that can be constructed at minimum cost.

Ive been trying to solve this for a while but I can't figure out what the cost function should be. or even how i should construct the volume equation.

  • $\begingroup$ MSE uses Mathjax for formula editing. In it, a '\$' indicates begin/end equation. If you want to use a dollar sign in your question or answer, escape it as \\$. $\endgroup$ Jul 6, 2014 at 22:51

2 Answers 2


Let the width of the base be $x$ and the height of the box be $y$. The base is a square so its area is $x^2$. Then the volume of the box is "base area times height", so the volume is $V = x^2 y = 40 ft^3$.

The area of the base is $x^2$, so the cost of the base is $0.31 x^2$.
The area of each side is $xy$, so the cost of each side is $0.05 xy$, so the cost of all four sides is $4 \times 0.05xy = 0.2xy$.
The area of the top is $x^2$, so the cost of the top is $0.19 x^2$.

So the total cost is $C = 0.31 x^2 + 0.19 x^2 + 0.2 xy = 0.5 x^2 + 0.2 xy$.

Since $x^2 y = 40$, we have $y = 40/x^2$, so $C = 0.5 x^2 + 0.2 x\times\frac{40}{x^2} = 0.5 x^2 + \frac{8}{x}$. This we can optimise using derivatives.

Advice for similar problems:

A useful strategy is to give names (ie pronumerals) to all the unknowns in your problem. It is easier to talk about things if they have names. In particular, you can start writing down equations.

When contructing equations, a useful strategy is to organise the information you have on the page so that it is easier to see the connections. (I put each part of the box on a separate line, for example.)

Finally, if you know how to do a problem a certain way (using derivatives of a single variable, for example), then once you have everything written down, you can think about the goal you want to get to and see how to get there. We had to get to an equation for $C$ in terms of only $x$ or $y$, so we had to think of a way to make either the $x$ or the $y$ into something in terms of the other. The only other information we had was the volume, so it seemed like a reasonable thing to try.


Hint: Because the base is square, it's easiest to write $V=x^2y=40$. Now, we just need the cost equation, which will be $C=(0.31+0.19)x^2+4(0.05xy)$, can you work it out from here?


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .