After having done a number of problems of this type, I realized there was a generalization that could be made on minimizing the cost for a given volume: the total cost of top and bottom should equal the total cost of front and back and also equal the total cost of the left and right sides.
Let d, w and h be the depth, width and height respectively.
5 dw = 8 hw = 4 dh
(two of the dimension-pairs' costs have been doubled from the material costs as opposite faces are considered together; the bottom is not matched with a top, however, so the 5 cents / cm^2 stands.)
5 dw = 8 hw
5 d = 8 h
8 hw = 4 dh
8 w = 4 d
2 w = d
5 dw = 4 dh
5 w = 4 h
also, wdh = 2500
Converting the last to just w:
w(2w)(5w/4) = 2500
10 w^3 / 4 = 2500
w^3 = 1000
w = 10
d = 20
h = 50/4 = 12.5
The check below of the vicinity (w and d at the given values surrounded by +/- 1 mm) of the answer in terms of dollar cost shows indeed a local minimum of cost here:
30.00176 30.00101 30.00076
30.00025 30.00000 30.00025
30.00074 30.00099 30.00174
DEFDBL A-Z
FOR w = 9.9# TO 10.11# STEP .1#
FOR d = 19.9# TO 20.11# STEP .1#
h = 2500 / (w * d)
PRINT USING "#####.#####"; (5 * w * d + 8 * w * h + 4 * d * h) / 100;
NEXT d
PRINT
NEXT w
PRINT
So the box is 10 cm wide, 20 cm deep and 12.5 cm high.
|
Posted by Charlie
on 2009-05-15 14:09:30 |