Consider the region shared by ρ=8cos(φ) and ρ=4. Find the volume of the region. Consider the region shared by ρ=8cos(φ) and ρ=4. Find the volume of the region.
I know it involves a triple integral, but do not understand how to set up the integral.
 A: In order to appeal to geometric intuition, let's transform the equations back to cartesian coordinates and find out what is happening. Take $\rho = 8 \cos (\varphi)$ and multiply it by $\rho$, getting $\rho^2 = 8 \rho \cos(\varphi)$. If we consider the spherical coordinate change as given by
$$\begin{cases}
x = \rho \cos \theta \sin \varphi, \\
y = \rho \sin \theta \sin \varphi, \\
z = \rho \cos \varphi,
\end{cases}$$
we can write it as $x^2 +y^2 +z^2 = 8z$. This is simply a sphere with its center moved to the point $(0,0,4)$, since the equation can be written as $x^2 +y^2 +(z-4)^2 = 4^2$. As for the equation $\rho =4$ we have $x^2 +y^2 +z^2 = 4^2$.
Looks like we have to break this triple integral into two regions.
Region one: The volume of the top region is given by the following inequalities:
$$\begin{cases}
0 \leq \rho \leq 4, \\
0 \leq \theta \leq 2 \pi, \\
0 \leq \varphi \leq \frac{\pi}{6}.
\end{cases}
$$
Region two: The volume of the lower half is given by the following inequalities:
$$\begin{cases}
0 \leq \rho \leq 8 \cos \varphi, \\
0 \leq \theta \leq 2 \pi, \\
\frac{\pi}{6} \leq \varphi \leq \frac{\pi}{2}.
\end{cases}$$
Therefore the volume of the intersection of the spheres is given by
$$V = \int_0^{2 \pi} \int_0^{\pi/6} \int_0^4 \rho^2 \sin \varphi \, d \rho \, d \varphi \, d \theta + \int_0^{2 \pi} \int_{\pi/6}^{\pi/2} \int_0^{8 \cos \varphi} \rho^2 \sin \varphi \, d \rho \, d \varphi \, d \theta.$$
I managed to plot it in Mathematica to help visualization:

