Answer
The greatest possible volume of the cylinder must be $\begin{equation}
\frac{4\pi r^{3}}{3\sqrt{3}}
\end{equation}$, or $\begin{equation}\frac{1}{\sqrt{3}}\end{equation}$ times the volume of the sphere.
Work Step by Step
Let the letter R represent the radius of the cylinder, and let the letter h represent its height.
$\begin{equation}
V_{cylinder}=\pi R^{2}h\\
0\geq R=h\geq r
\end{equation}$
The radius of the sphere and the radius of the cylinder and half the height of the cylinder form a right triangle, with the radius of the sphere being the hypotenuse. So
$\begin{equation}
R^{2}+\left(\frac{h}{2}\right)^{2}=r^{2}\\
R^{2}=r^{2}-\frac{h^{2}}{4}.
\end{equation}$
Therefore the volume of the cylinder is, by substitution,
$\begin{equation}
V_{cylinder}=\pi\left(r^{2}-\frac{h^{2}}{4}\right)h=\pi r^{2}h-\frac{\pi h^{3}}{4}=\frac{4\pi r^{2}h-\pi h^{3}}{4}
\end{equation}$
Since r is a given in the problem, the volume is now expressed as a function of h. We now take the derivative to find critical values.
$\begin{equation}
\frac{dV}{dh}=\frac{4\pi r^{2}-3\pi h^{2}}{4}
\end{equation}$
Set to 0 to find critical values.
$\begin{equation}
0=\frac{4\pi r^{2}-3\pi h^{2}}{4}\\
0=4\pi r^{2}-3\pi h^{2}\\
3\pi h^{2}=4\pi r^{2}\\
h^{2}=\frac{4r^{2}}{3}\\
h=\sqrt{\frac{4r^{2}}{3}}=\frac{2r}{\sqrt{3}}
\end{equation}$
Since both of the end point values lead to a total volume of 0, 2r/√3 must be the value of h when the volume is greatest.
$\begin{equation}
V_{cylinder}=\frac{4\pi r^{2}\left(\frac{2r}{\sqrt{3}}\right)-\pi \left(\frac{2r}{\sqrt{3}}\right)^{3}}{4}=\frac{\frac{8\pi r^{3}}{\sqrt{3}}-\frac{8\pi r^{3}}{3\sqrt{3}}}{4}=\frac{24\pi r^{3}-8\pi r^{3}}{12\sqrt{3}}=\frac{16\pi r^{3}}{12\sqrt{3}}=\frac{4\pi r^{3}}{3\sqrt{3}}
\end{equation}$