Show that the height of the cylinder of maximum volume that can be inscribed a sphere of radius $R$ is $\frac{2 R}{\sqrt{3}}$.
Let the height and radius of the base of the cylinder be $h$ and $r$, respectively. Then,
$\frac{h^{2}}{4}+r^{2}=R^{2}$
$\Rightarrow h=2 \sqrt{R^{2}-r^{2}}$ ......(1)
Volume of cylinder, $V=\pi r^{2} h$
Squaring both sides, we get
$\Rightarrow V^{2}=\pi^{2} r^{4} h^{2}$
$\Rightarrow V^{2}=4 \pi^{2} r^{4}\left(R^{2}-r^{2}\right)$ [From eq. (1)]
Now,
$Z=4 \pi^{2}\left(r^{4} R^{2}-r^{6}\right)$
$\Rightarrow \frac{d Z}{d r}=4 \pi^{2}\left(4 r^{3} R^{2}-6 r^{5}\right)$
For maximum or minimum values of $Z$, we must have
$\frac{d Z}{d r}=0$
$\Rightarrow 4 \pi^{2}\left(4 r^{3} R^{2}-6 r^{5}\right)=0$
$\Rightarrow 4 r^{3} R^{2}=6 r^{5}$
$\Rightarrow 6 r^{2}=4 R^{2}$
$\Rightarrow r^{2}=\frac{4 R^{2}}{6}$
$\Rightarrow r=\frac{2 R}{\sqrt{6}}$
Substituting the value of $r$ in eq. (1), we get
$\Rightarrow h=2 \sqrt{R^{2}-\left(\frac{2 R}{\sqrt{6}}\right)^{2}}$
$\Rightarrow h=2 \sqrt{\frac{6 R^{2}-4 R^{2}}{6}}$
$\Rightarrow h=2 \sqrt{\frac{R^{2}}{3}}$
$\Rightarrow h=\frac{2 R}{\sqrt{3}}$
Now,
$\frac{d^{2} Z}{d r^{2}}=4 \pi^{2}\left(12 r^{2} R^{2}-30 r^{4}\right)$
$\Rightarrow \frac{d^{2} Z}{d r^{2}}=4 \pi^{2}\left(12\left(\frac{2 R}{\sqrt{6}}\right)^{2} R^{2}-30\left(\frac{2 R}{\sqrt{6}}\right)^{4}\right)$
$\Rightarrow \frac{d^{2} Z}{d r^{2}}=4 \pi^{2}\left(8 R^{4}-\frac{80 R^{4}}{6}\right)$
$\Rightarrow \frac{d^{2} Z}{d r^{2}}=4 \pi^{2}\left(\frac{48 R^{4}-80 R^{4}}{6}\right)$
$\Rightarrow \frac{d^{2} Z}{d r^{2}}=4 \pi^{2}\left(-\frac{16 R^{4}}{3}\right)<0$
So, volume of the cylinder is maximum when $h=\frac{2 R}{\sqrt{3}}$.
Hence proved.