## Optimization

### Calculus Optimization Problem:

What dimensions minimize the cost of an open-topped can?

An open-topped cylindrical can must contain *V* cm$^3$ of liquid. (A typical can of soda, for example, has *V* = 355 cm$^3$.) What dimensions will minimize the cost of metal to construct the can?

### Calculus Solution

We’ll use our standard Optimization Problem Solving Strategy to develop our solution. (Link will open in a new tab.)

*Stage I: Develop the function*.

Your first job is to develop a function that represents the quantity you want to optimize. It can depend on only *one* variable. The steps:

**1. Draw a picture of the physical situation.**

See the figure. We’ve called the radius of the cylinder *r*, and its height *h*.

**2. Write an equation that relates the quantity you want to optimize in terms of the relevant variables.**

We want to minimize the amount of metal we use, which is to say we want to minimize the area of the can. The can consists of a cylinder of surface area $A_\text{cylinder} = (2\pi r)(h)$, and a bottom piece that has area $A_\text{bottom} = \pi r^2$. The can has no top. Its total area is thus:

\begin{align*}

A &= A_\text{cylinder} + A_\text{bottom}\\[4px]
&= 2\pi rh + \pi r^2

\end{align*}

**3. If necessary, use other given information to rewrite your equation in terms of a single variable.**

The can’s area *A* currently depends on two variables, *r* and *h*. In order to proceed, we must use other information we’re given to rewrite the area in terms of just *one* of those variables. Let’s choose *r* as that single variable.

We must then eliminate the height *h* as a variable. To do so, we note that the can must hold volume *V* of liquid. Since the volume of a cylinder of radius *r* and height *h* is

$$V = \pi r^2 h$$

We can therefore solve for *h*:

$$h = \dfrac{V}{\pi r^2}$$

Substituting this expression for *h* into the expression for the can’s surface area:

\begin{align*}

A &= 2\pi rh + \pi r^2 \\[8px]
&= 2\pi r\left( \dfrac{V}{\pi r^2} \right) + \pi r^2 \\[8px]
&= 2\cancel{\pi} \cancel{r}\left( \dfrac{V}{\cancel{\pi} r\cancel{^2}} \right) + \pi r^2 \\[8px]
&= \frac{2V}{r} + \pi r^2

\end{align*}

The expression for *A* is now a function of the single variable *r*. (Remember that *V* is a constant that just tells us how much liquid the can must hold.)

We’ve graphed the function (with $V = 355 \text{ cm}^3$), a step you probably wouldn’t do yourself — but we want to emphasize that everything you’ve done so far is to create a function that you’re now going to minimize. One choice would be to closely examine the graph to determine the value of *r* that minimizes *A* . . . but instead we’re going to use the max/min techniques you learned recently!

*Stage II: Maximize or minimize the function.*

You now have a standard max/min problem to solve.

**4. Take the derivative of your equation with respect to your single variable. Then find the critical points.**

\begin{align*}

\frac{dA}{dr} &= \frac{d}{dr} \left[ \frac{2V}{r} + \pi r^2 \right] \\ \\

&= -\frac{2V}{r^2} + 2\pi r

\end{align*}

The critical points occur when $\dfrac{dA}{dr} = 0$:

\begin{align*}

\frac{dA}{dr} = 0 &= -\frac{2V}{r^2} + 2\pi r \\ \\

\frac{2V}{r^2} &= 2\pi r \\

r^3 &= \frac{V}{\pi} \\ \\

r &= \sqrt[3]{\frac{V}{\pi}}

\end{align*}

**5. Justify your maxima or minima either by reasoning about the physical situation, or with the first derivative test, or with the second derivative test.**

Let’s examine the second derivative. Above we found the first derivative:

$$\frac{dA}{dr} = -\frac{2V}{r^2} + 2\pi r $$

So

\begin{align*}

\dfrac{d^2A}{dr^2} &= \dfrac{d}{dr}\left( -\frac{2V}{r^2} + 2\pi r\right) \\[8px]
&= -2 \left(-\frac{2V}{r^3} \right) + 2\pi \\[8px]
&= \dfrac{4V}{r^3} + 2\pi

\end{align*}

Since $r > 0$, this second derivative $\left( \dfrac{d^2A}{dr^2} = \dfrac{4V}{r^3} + 2\pi\right)$ is always positive $\left(\dfrac{d^2A}{dr^2} > 0 \right)$. Hence this single critical point gives us a minimum:

The minimum area occurs when $r = \sqrt[3]{\dfrac{V}{\pi}}$.

**6. Determine the maxima and minima as necessary. Remember to check the endpoints if there are any.**

Recall that we found above $h = \dfrac{V}{\pi r^2}$. Hence when $r = \sqrt[3]{\frac{V}{\pi}}$, the cylinder’s height is

\begin{align*}

h &= \dfrac{V}{\pi r^2} \\ \\

&= \dfrac{V}{\pi \left(\sqrt[3]{\frac{V}{\pi}}\right)^2} \\ \\

&= \frac{V}{\pi} \frac{\pi^{2/3}}{V^{2/3}} \\ \\

&= \sqrt[3]{\frac{V}{\pi}}

\end{align*}

Hence we obtain the minimum area for this open-topped can when the cylinder’s height equals its radius, and the dimensions are:

$$ h = r = \sqrt[3]{\dfrac{V}{\pi}} \quad \cmark$$

**7. Finally, check to make sure you have answered the question as asked: $x$ or $y$ values, or coordinates, or a maximum area, or a shortest time, or . . . .**

The question asked us to specify the cylinder’s dimensions, which we have provided. $\checkmark$

Return to Optimization Problems

Want access to *all* of our Calculus problems and solutions? Buy full access now — it’s quick and easy!

Why choose to write the equation in terms of r and not h?

Great question — thanks for asking!

That’s an arbitrary choice: we could have just as easily written the equation for h instead, and then found dA/dh in Step 4. The final answers for the values of r and h that minimize the cost would of course turn out the same as above, as you can verify if you’d like!