# How do you find the dimensions of the box that minimize the total cost of materials used if a rectangular milk carton box of width w, length l, and height h holds 534 cubic cm of milk and the sides of the box cost 4 cents per square cm and the top and bottom cost 8 cents per square cm?

Mar 11, 2015

Note that varying the length and width to be other than equal reduces the volume for the same total (length + width); or, stated another way, $w = l$ for any optimal configuration.

Using given information about the Volume, express the height ($h$) as a function of the width ($w$).

Write an expression for the Cost in terms of only the width ($w$).

Take the derivative of the Cost with respect to width and set it to zero to determine critical point(s).

Details:
Volume $= w \times l \times h = {w}^{2} h = 534$
$\rightarrow h = \frac{534}{{w}^{2}}$

Cost = (Cost of sides) + (Cost of top and bottom)
$C = \left(4 \times \left(4 w \times h\right)\right) + \left(8 \times \left(2 {w}^{2}\right)\right)$

= (4 xx (4w xx (534)/(w^2)) + (8 xx (2 w^2))

$= 8544 {w}^{- 1} + 16 {w}^{2}$

$\frac{d C}{\mathrm{dw}} = 0$ for critical points
$- 85434 {w}^{- 2} + 32 w = 0$
Assuming $w \ne 0$ we can multiply by ${w}^{2}$
and with some simple numeric division:
$- 267 + {w}^{3} = 0$
and
$w = {\left(267\right)}^{\frac{1}{3}}$
$= 6.44$ (approx.)

$\rightarrow l = 6.44$
and $h = 12.88$ (approx.)