Let x = length of a side of the bottom
y = height
Given: x2y = 40, so y = 40/(x2)
Minimize:
Cost of box = 5(area of top + area of bottom) + 8(area of sides)
= 5(2x2) + 8(4xy)
= 10x2 + 32xy = 10x2 + 32x(40/(x2)
= 10x2 + 1280/x
C(x) = 10x2 + 1280x-1, where x > 0
= cost of box as a function of x
To minimize C(x), first, set C'(x) = 0
20x - 1280x-2 = 0
(20x3 - 1280)/x2 = 0
20x3 = 1280
x3 = 64
x = 4
When 0<x<4, C'(x) < 0. So, C(x) is decreasing
When x > 4, C'(x) > 0. So, C(x) is increasing
Therefore, C(x) is minimized when x = 4 ft and y = 40/16 = 2.5 ft