# How do you maximize the volume of a right-circular cylinder that fits inside a sphere of radius 1 m?

Mar 9, 2015

Determine the formula for the Volume of the cylinder contained within a 1 m radius sphere relative to the radius of the cylinder.
Differentiate to establish critical points.

Volume of cylinder ($V$) $= \pi {r}^{2} h = 2 \pi {r}^{2} s$
where $s$ is the semi-height.

${r}^{2} + {s}^{2} = 1 \rightarrow s = \sqrt{1 - {r}^{2}}$
so
$V \left(r\right) = 2 \pi {r}^{2} \cdot {\left(1 - r\right)}^{\frac{1}{2}}$

$\frac{d V \left(r\right)}{\mathrm{dr}} = 2 \pi \left(\frac{d {r}^{2}}{\mathrm{dr}} \cdot {\left(1 - {r}^{2}\right)}^{\frac{1}{2}} + {r}^{2} \frac{d {\left(1 - {r}^{2}\right)}^{\frac{1}{2}}}{\mathrm{dr}}\right)$

Since
$\frac{d {r}^{2}}{\mathrm{dr}} = 2 r$
and
$\frac{d {\left(1 - {r}^{2}\right)}^{\frac{1}{2}}}{\mathrm{dr}} = \frac{d {\left(1 - {r}^{2}\right)}^{\frac{1}{2}}}{d \left(1 - {r}^{2}\right)} \cdot \frac{d \left(1 - {r}^{2}\right)}{\mathrm{dr}}$
$= \left(- r\right) {\left(1 - {r}^{2}\right)}^{- \frac{1}{2}}$

$\frac{d V \left(r\right)}{\mathrm{dr}} = 2 \pi \left(2 r {\left(1 - {r}^{2}\right)}^{\frac{1}{2}} + {r}^{2} \left(\frac{- r}{\sqrt{1 - {r}^{2}}}\right)\right)$

$= 2 \pi \left(2 r \sqrt{1 - {r}^{2}} - \frac{{r}^{3}}{\sqrt{1 - {r}^{2}}}\right)$

Set $\frac{d V \left(r\right)}{\mathrm{dr}} = 0$ for critical points
$2 \pi \left(2 r \sqrt{1 - {r}^{2}} - \frac{{r}^{3}}{\sqrt{1 - {r}^{2}}}\right) = 0$

If $r \ne 0$ we can divide by $2 \pi r$
$2 \sqrt{1 - {r}^{2}} - \frac{{r}^{2}}{\sqrt{1 - {r}^{2}}} = 0$

If $r \ne 1$ we can multiply by $\sqrt{1 - {r}^{2}}$
$2 \left(1 - {r}^{2}\right) - {r}^{2} = 0$
$2 - 3 {r}^{2} = 0$
$r = \sqrt{\frac{2}{3}}$

Substituting we can find
$s = {\left(1 - \frac{2}{3}\right)}^{\frac{1}{2}} = \sqrt{\frac{1}{3}}$
and
$h = 2 \sqrt{\frac{1}{3}}$

Note the extraneous possibilities $r = 0$ and $r = 1$ give the minimum cylinder size (which should be obvious from observation).