# 6.2 The Most Economical Tin Can # Art Belmonte, Summer 1996 # These are the shaded gray examples which appear in Section 6.2. # In-line plots have been removed to conserve disk space. > restart; s:=2*Pi*r^2 + 2*Pi*r*h; 2 s := 2 Pi r + 2 Pi r h > l:=4*Pi*r + h; l := 4 Pi r + h > c:=a*s + b*l; a:=0.01; b:=0.2; 2 c := a (2 Pi r + 2 Pi r h) + b (4 Pi r + h) a := .01 b := .2 > h:=1000 / (Pi*r^2); c; 1000 h := ----- 2 Pi r 2 20.00 200.0 .02 Pi r + ----- + .8 Pi r + ----- r 2 Pi r > plot(c, r=1..10); > Dc:=diff(c, r); rbest:=fsolve(Dc=0, r=3..5); 20.00 400.0 Dc := .04 Pi r - ----- + .8 Pi - ----- 2 3 r Pi r rbest := 4.104217144 > evalf(subs(r=rbest, h)); 18.89685223 >