A standard soda can is roughly cylindrical and holds 355cm^3
of liquid. What dimensions should the cylinder be to min-
imize the material needed to produce the can? Based on
your dimensions, determine whether or not the standard
can is produced to minimize the material costs.

\[ \begin{aligned} V = \pi r^2h = 355cm^3 \end{aligned} \]

(material needed) and find the radius r and height h to make the soda can given the

volume of the standard soda can.

\[ \begin{aligned} A = 2\pi r^2 + 2\pi rh \end{aligned} \]

and then plug it into the equation for A

\(h = 355/(\pi r^2)\)

\[ \begin{aligned} A = 2\pi r^2 + 2\pi r(355/(\pi r^2)) \\ = 2\pi r^2 + 710/r \end{aligned} \] - Now we have A as a function of r that is \(A(r)\)

to r and set it to 0

to find r such that the Area is minimal:

\[ \begin{aligned} A(r) = 2\pi r^2 + 710/r \\ A^{'}(r) = 4\pi r - 710/r^2 \\ \text{set A'(r) = 0} \\ 0 = 4\pi r - 710/r^2 \\ 710/r^2 = 4\pi r \\ r = \sqrt[3]{(710/4\pi)} \end{aligned} \]

comupte A(r,h) to find the minimum surface area or material.

# Compute the surface area of a cylinder with given radius r and height h
A <- function(r,h){
  surfacearea <- (2*pi*r^2) + (2*pi*r*h)
  return(surfacearea)
}

# value of r that minimizes A
r_min_A <- (710/(4*pi))^(1/3)
r_min_A
## [1] 3.837215
# value of h that minimizes A given r
h_min_A <- 355/(pi*(r_min_A^2))
h_min_A
## [1] 7.67443
# plug in the values or r and h that minimize the surface area A
min_A <- A(r_min_A, h_min_A)
min_A
## [1] 277.545

is about \(277.54cm^2\). To determine whether or not the standard can is produced to minimize the material costs we compute \(V=\pi r^2h\) with the given r and h.

V <- (pi*r_min_A^2)*h_min_A
V
## [1] 355