<p>The height of the cylinder can be related to the radius of the cylinder and sphere by using the Pythagoras theorem. The hypotenuse of the right angle triangle is the diameter of the circle. Therefore, h^2=4r^2+4R^2, where R is the radius of the sphere, and r is the radius of the cylinder. If you substitute h in the formula for the volume of the cylinder and differentiate with respect to r, and set it to zero, you will obtain r = sqrt(2/3)R. The max volume of the cylinder turns out to be 1/(sqrt(3)) of the volume of the sphere.</p>