Find the volume of the region of a sphere bounded by two planes Calculate the volume of a sphere $x^2+y^2+z^2=R^2$ which is bounded by $z=a$ and $z=b$, where $0\leq a<b<R$ using double integral. I can imagine the picture but I don't know how to set it up.
 A: The projection of the solid in the xy-plane is the region bounded by the circle $x^2+y^2=R^2-a^2$, 
and the height of the solid is constant inside the circle $x^2+y^2=R^2-b^2$.
Using a double integral in polar coordinates, we get
$V=\displaystyle\int_0^{2\pi}\int_0^{\sqrt{R^2-b^2}}(b-a)r\;dr d\theta+\int_0^{2\pi}\int_{\sqrt{R^2-b^2}}^{\sqrt{R^2-a^2}}\left(\sqrt{R^2-r^2}-a\right)r\;dr d\theta$
$\;\;\;\;\displaystyle=2\pi(b-a)\left(\frac{R^2-b^2}{2}\right)+2\pi\left[\frac{1}{2}\cdot\frac{2}{3}(b^3-a^3)-\frac{a}{2}(b^2-a^2)\right]$
$\;\;\;=\displaystyle\pi(b-a)(R^2-b^2)+\frac{\pi}{3}\left[2(b^3-a^3)-3a(b^2-a^2)\right]$
$\;\;\;=\displaystyle\frac{\pi}{3}(b-a)\left[3R^2-b^2-ab-a^2\right]$.

As pointed out in the comments, it is easier to calculate this volume as a solid of revolution, which gives
$\displaystyle V=\int_a^b \pi(R^2-z^2)\;dz=\pi\left[R^{2}z-\frac{z^3}{3}\right]_a^b=\pi\left(R^2 b-\frac{b^3}{3}-R^2 a+\frac{a^3}{3}\right)$.
A: I show below how you do this calculation as a difference of two volumes:
The volume is given by $I(a)-I(b)$ where (for $0<s<R$), $I(s)$ is defined to be the volume of the ball $x^2+y^2+z^2\leq R^2$ such that $z>s$. Let us calculate $I(s)$ (you complete the details):
The domain is bounded from below by the plane $z=s$ and from above by the surface $z=\sqrt{R^2-x^2-y^2}$. The domain projected onto the $xy$-plane is a disc $D:x^2+y^2\leq R^2-s^2$. Thus,
$$
I(s)=\iint_D\Bigl(\sqrt{R^2-x^2-y^2}-s\Bigr)\, dx\,dy
$$
Changing to polar coordinates $(r,\phi)$, this becomes
\begin{align}
I(s)&=\int_0^{2\pi}\, d\phi\int_0^{\sqrt{R^2-s^2}}\Bigl(\sqrt{R^2-r^2}-s\Bigr)r\,dr\\
&=2\pi\Bigl[-\frac{1}{3}(R^2-r^2)^{3/2}-\frac{1}{2}sr^2\Bigr]_0^{\sqrt{R^2-s^2}}\\
&=2\pi\Bigl(-\frac{1}{3}s^3-\frac{1}{2}s(R^2-s^2)+\frac{1}{3}R^3\Bigr).
\end{align}
Thus (collect and simplify), the volume you look for is:
$$
I(a)-I(b) = \pi R^2(b-a) -\frac{\pi}{3}(b^3-a^3).
$$
Just as a side-note we see that the expression above is non-negative:
Since $a$ and $b$ are bounded by $R$,
$$
\frac{\pi}{3}(b^3-a^3)=\frac{\pi}{3}(b-a)(b^2+ab+a^2)\leq \frac{\pi}{3}(b-a)(R^2+R^2+R^2)=\pi R^2(b-a).
$$
OK!
A: From the intersection between the planes and the sphere you will find that the integration region is the set $$D=\{(x,y): R^2-b^2\leq x^2+y^2\leq R^2-a^2\}.$$ Use cylindrical coordinates to evaluate the integral $$V=\int_{0}^{2\pi}\int_{\sqrt{R^2-b^2}}^{\sqrt{R^2-a^2}} r\sqrt{R^2-r^2}\ drd\theta$$ which gives you the volume  requested.
