Example: You build open-topped boxes and you want to keep your costs down.
You need a box with volume 32 cubic units, and you need the base of the box
to be at least
Rectangular boxes (no top)
Volume 32
Base at least 2 x 2
Height at least 1
Find dimensions
Use least material
Some possibilities include a2 x 2 x 8 box, a4 x 4 x 2 bnox, and a4 x 8 x 1 box.
The width, depth and height are varying, so we let x be the width, y be the depth and z be the height of the box, and draw anx x y x z box.
Maximize materials. (I.e., minimize the area of the materials used.)
Let A = area of materials.
Then A = xy + 2xz + 2yz
We know that the volume is 32. Soxyz = 32 since the volume is width times depth times height. Solving for z we getz = 32/xy , which we can plug into the formula for area to eliminate one variable. So A= xy + 2x(32/xy) + 2y(32/xy) , or
A(x,y) = xy + 64/y + 64/x is the function to be minimized.
We know the base must be at least2 x 2 , sox > 2 andy > 2 . We also know thatz > 1 , so(32/xy) > 1 , or32 > xy (since x and y are both positive the inequality doesn't change). Sincex > 2 , we knowxy > 2y , so32 > xy > 2y , or32 > 2y , which meansy < 16 . Similarly,x < 16 . Thus the region is the square pictured.
We need to find whereGrad(A) = (0,0) . First, we compute the gradient:Grad(A) (x,y) = (y - 64/x2, x - 64/y2) and this equals (0,0) when
y - 64/x2 = 0 andx - 64/y2 = 0 . That is, wheny = 64/x2 andx = 64/y2 . The latter becomesxy2 = 64 , into which we substitute the former to getx(64/x2)2 = 64 , which becomes64 = x3 , orx = 4 . Sincey = 64/x2 , this meansy = 4 as well.Thus
Grad(A) = (0,0) at (4,4) and no other point. This point is inside the region R, so it is one of our candidates for the minimum value of A.
Since R is a square, we can parameterize each edge separately. For example, the bottom edge goes through the point (2,2) and has direction vector <1,0>, so it can be parameterized byL1(t) = (2,2) + t <1,0> = (2+t,2). Similarly the other edges are
L2(t) = (2,2+t)
L3(t) = (2+t,16)
L4(t) = (16,2+t)
For line L1, we obtainF1(t) = A(g(t)) = A(2+t,2) = (2+t)(2) + 64/(2+t) + 84/2 = 2t + 64/(2+t) + 36 .Note that the interval of t values for this line is
0 < t < 14 .The other lines work similarly.
For our F1,F1'(t) = 2 - 64/(2+t)2 . This is undefined when (2+t)2 = 0; i.e., whent = -2 . This is outside of our interval of t values, so we discard it.To find where the derivative is 0, we solve for t in
2 - 64/(2+t)2 = 2 , so(2+t)2 = 32 , ort = sqrt(32) - 2 , which is approximately 3.66. This produces the point L1(3.66) = (5.66,2) as a candidate for the minimum value of A, togehter with the two endpoints of the edge at (2,2) and (16,2).The other three sides can be treated similarly.
We need to check the points (4,4), (5.66,2), (2,2), (2,16) and the other points obtained from the three other line segments that form the edges of R.A(4,4) = (4)(4) + 64/4 + 64/4 = 16 + 16 + 16 = 48Notice that the smallest of these is the first one. If you do the other three edges of R you will find that they are larger than 48, so this is the minimum value of A.
A(5.66,2) = (5.66)(2) + 64/5.66 + 64/2 = 54.63 (about)
A(2,2) = (2)(2) + 64/2 + 64/2 = 4 + 32 + 32 = 68
A(2,16) = (2)(16) + 64/16 + 64/2 = 32 + 4 + 32 = 68
Of course, we are looking for the dimensions of the box that yield the minimum area, so we still need to find these. We already have
x = 4 andy = 4 , so we still need to get z. Since we found above thatz = 32/xy , we can use this to findz = 32/(4x4) = 32/16 = 2 . Thus the optimal box has a4 x 4 base and is 2 units tall.