If I were going to answer this question, I would consider the first quadrant part of the curve:

\(\displaystyle f(x)=\sqrt{r^2-x^2}\)

Now, if we consider some constant \(0<h<r\), where \(h\) represents the height of the cap, then the volume \(V_C\) of the cap can be found from:

\(\displaystyle V_C=\pi\int_{r-h}^r \left(\sqrt{r^2-x^2}\right)^2\,dx=\pi\int_{r-h}^r r^2-x^2\,dx\)

Applying the FTOC, we obtain:

\(\displaystyle V_C=\frac{\pi}{3}\left[3r^2x-x^3\right]_{r-h}^r=\frac{\pi}{3}\left(2r^3-\left(3r^2(r-h)-(r-h)^3)\right)\right)\)

\(\displaystyle V_C=\frac{\pi}{3}\left(2r^3-(r-h)\left(3r^2-(r-h)^2)\right)\right)\)

\(\displaystyle V_C=\frac{\pi}{3}\left(2r^3-(r-h)\left(2r^2+2rh-h^2)\right)\right)\)

\(\displaystyle V_C=\frac{\pi}{3}\left(2r^3-2r^3-2r^2h+rh^2+2r^2h+2rh^2-h^3\right)\)

\(\displaystyle V_C=\frac{\pi h^2}{3}(3r-h)\)

And so the volume \(V\) of a sphere, less the cap, can be given by:

\(\displaystyle V=\frac{4}{3}\pi r^3-\frac{\pi h^2}{3}(3r-h)=\frac{\pi}{3}\left(4r^3-h^2(3r-h)\right)\)