Laboratory 5
Optimization

Introduction

Calculus can be used to find maxima and minima of many functions of practical interest. In this laboratory, we shall investigate the most economical shape for a can.

5.1  Optimization Problem Example

We wish to make a cylindrical can of fixed volume (Subscript[v, 0]) with height h and radius r at with the smallest possible cost. We begin by assuming that the cost of the can is directly proportional to the surface area of the can.

The surface area can be found by adding together the area of the two lids to the area of the lateral side. Since the lids are disks of radius r, each has an area of π (r^2). The lateral side of the can is formed by bending a rectangular piece of metal. The height of this piece is h, while its length is the same as the circumference of the lid, namely 2π r. The surface area of the lateral side is then 2π r h. Adding these, we find that the surface area of the can is 2π (r^(2 ))+2π r h, so that the cost of the can is proportional to this expression. For simplicity, we shall assume that the constant of proportionality is 1, so that the cost of the can is equal to 2π (r^(2 ))+2π r h.

Clear[c,r,h,cost,r0,h0,ratio]  
c[r_,h_]:=2 Pi r^2 + 2 Pi r h

We would like to find the minimum value of the function c(r,h), subject to the constraint that the can has the fixed volume (Subscript[v, 0]), given by (Subscript[v, 0])=π (r^2) h. We can solve this for h to discover that h=(Subscript[v, 0])/(π (r^2)). Substituting this value of h into our expression, we find that the cost of the can is

cost[r_]:=c[r,(Subscript[v, 0])/(Pi r^2)]

To find the minimum value of the cost, we must minimize this function. To do so, we shall first find the critical numbers of the cost function. In Mathematica we can do this as follows.

D[cost[r],r]
Solve[D[cost[r],r]==0,r]

Of these solutions, only the second one is positive, so our critical number (Subscript[r, 0]) is

r0=(((Subscript[v, 0])^(1/3))/(((2 π))^(1/3)))

Next, we check that the critical value (Subscript[r, 0]) actually minimizes our function by using the second derivative test. We can do this with the aid of the Mathematica command  Evaluate. Given a function f[x] and a number c, we tell Mathematica to give us the value of f(c) by giving it the command  Evaluate[f[x] /. x->c ]. In our case, we want to find the value of the second derivative of the function cost(r) when r=(Subscript[r, 0]), so we give Mathematica the command

Evaluate[D[D[cost[r],r],r] /.r->r0]

Because this is positive, the second derivative test tells us that there is a local minimum at r=(Subscript[r, 0]).

There is one other critical number, where the derivative is not defined, at r = 0. Our function cost(r) is defined and differentiable for r>0, so by Rolle’s Theorem and the fact that we only have one positive critical number, there is an absolute minimum at r =(Subscript[r, 0]). 

To visualize the above (for the special case (Subscript[v, 0])=8) consider the following graph of cost[r].

Plot[2 Pi r^2 + 2*8/r,{r,0,15},PlotStyle->Red]

Because of the relationship (Subscript[v, 0])=π (r^2) h between h and r, we find that the height (Subscript[h, 0]) corresponding to the critical value (Subscript[r, 0]) is

h0=(Subscript[v, 0])/(Pi r0^2)

and thus the ratio (Subscript[h, 0])/(Subscript[r, 0]) is given by

ratio=h0/r0

This gives us the relative sizes of the height and radius of the can of minimal cost.

Experiment 5.1a

In real cans, the tops and bottoms are often thicker than the sides. Show that if the top and bottom of the can costs twice as much as the sides, then the dimensions of the can of minimum cost satisfy h/r=4.

Experiment 5.1b

When a real can is made, the metal for the cans must be cut from sheets. The cylindrical sides can be formed by bending rectangles, with little or no waste. If we cut the top and bottom from square blanks however, then a considerable amount of metal is wasted.

Unfortunately for our company, the wasted metal has no value, and thus increases the costs of making our cans. Under this more realistic assumption for the cost of making cans, find the dimensions of the can of minimal cost. Show that in this instance we must have h/r=8/π≈2.55.

Experiment 5.1c

In many cans, the tops and bottoms are thicker than the sides. Suppose that we still cut our tops and bottoms from square blanks, but that the metal for this process cost twice as much as the metal for the lateral sides. In this case, find the value of h/r for the can of minimum cost.

Experiment 5.1d

There are more efficient ways to cut disks from a sheet of metal than simply using square blanks. The most efficient method is to cut the disks from staggered hexagons, as we see in the following figure.

The dimensions of each hexagon can be found with the aid of a little trigonometry; this information is summarized in the following graph.

A clever company would use this technique to cut the discs for the top and bottom of the can, rather than cutting them from squares as did above. However, although cutting our tops and bottoms from hexagons reduces waste, it does not eliminate it, and this wasted material still has no value. For this more realistic model, find the dimensions of the can of minimal cost, and find the corresponding value of h/r.

Credits

These laboratories were created by Raouf Boules, Geoff Goodson, Ohoe Kim and Mike O'Leary for use in the Calculus courses of Towson University. Commercial use is prohibited without permission of the authors. Non-commercial use is permitted, provided this credit section is retained.