The formula for the volume of a rectangular prism is
V= l•w•h
Since the bottom is square, therefore l=w. We can rewrite the equation:
V= w2•h
The volume is 4 cubic feet:
4 = w2•h
h = 4/w2
The cost of the bottom = 5w2
The cost of the 4 rectangle sides = 2•4wh = 8wh
The total cost (C) will be:
C = 5w2 + 8wh
Substitute the value of h in terms of w:
C = 5w2 + 8w(4/w2)
C = 5w2 + 32/w
Get the derivative of C with respect to w:
dC/dw = 10w - 32/w2
To minimize, dC/dw = 0
10w - 32/w2 = 0
(10w3 -32)/w2 = 0
10w3 -32 = 0
10w3 = 32
w3 = 32/10 = 16/5 = 3.2
w = (3.2)1/3 ≈ 1.47
h = 4/(3.2)2/3 ≈ 1.84
The length and width should be both approximately equal to 1.47 ft. and the height should be approximately equal to 1.84 ft.