Napkin ring problem (source code)

= Napkin ring problem
{title2=$V=\pi h^3/6$}
{wiki}

Removing a central cylindrical hole from a sphere leaves a solid whose <volume> depends only on its remaining height $h$. With $a=h/2$, sphere radius $R$ and hole radius $r_0$, the rim gives $R^2-r_0^2=a^2$. Every horizontal slice is an annulus of area $\pi(a^2-z^2)$, so integrating from $-a$ to $a$ gives $V=4\pi a^3/3=\pi h^3/6$. This slice equality explains why changing $R$ while retaining $h$ leaves the volume unchanged.