Let RR be the radius of the sphere and let hh be the height of the cylinder centered on the center of the sphere. By the Pythagorean theorem, the radius of the cylinder is given by
r2=R2−(h2)2.r2=R2−(h2)2.The volume of the cylinder is hence
V=πr2h=π(hR2−h34).V=πr2h=π(hR2−h34).Differentiating with respect to hh and equating to 00 to find extrema gives
dVdh=π(R2−3h24)=0∴h0=2R3‾√dVdh=π(R2−3h24)=0∴h0=2R3The second derivative of the volume with respect to hh is negative if h>0h>0 such that the volume is maximal at h=h0h=h0. Substituting gives
Vmax=4πR333‾√.