Volume between paraboloid $x^2 +y^2 -4a(z+a)=0$ and sphere $x^2 + y^2 +z^2 =R^2$ I'm trying to obtein the volume via triple integral but think I'm setting the wrong radius. The solid in particular is bounded by the sphere $x^2 + y^2 +z^2 =R^2$ and above the parabolloid $x^2 +y^2 -4a(z+a)=0$ (consedering $R>a>0$). I'm setting cylindrical coordinates and I do eventually get $\theta \in [0,2\pi[$ and $(\rho^2 / 4a) -a\leq z \leq R^2-\rho^2$. I deduce that the radius must be limited in between $0$ and $4Ra-4a^2$ (Intersection is at height $z=R-2a$), so the volume should be:
$$\int_{0} ^{2\pi} \int_0 ^{4Ra-4a^2} \int_{(\rho^2 /4a)-a} ^{R^2 -\rho^2} \mathrm{d}V$$
, but this integral results in a different expression from the original solution. My teacher told us the solution is $2\pi \left ( \frac{a^3}{3} - aR^2 + \frac{2R^3}{3} \right )$.
 A: Note that it is not advisable to integrate in cylindrical coordinates because the $z$-limit could be either on the sphere or the parapoloid depending on $a$. Instead, integrate in spherical coordinates with the limits $\theta\in (\cos^{-1}\frac{R-2a}R,\pi)$. The volume is then
\begin{align}
V=&\>2\pi\int_{\cos^{-1}\frac{R-2a}R}^\pi 
\int_{\frac{2a}{1-cos\theta}}^R \rho^2\sin\theta \>d\rho \>d\theta\\
= &\>\frac{2\pi}3 \int_{\cos^{-1}\frac{R-2a}R}^\pi  \left( R^3 - \frac{8a^3}{(1-\cos \theta)^3}\right)\sin\theta \>d\theta\\
 = &\>\frac{2\pi}3 \left[ R^3 (1-\cos \theta)+\frac{4a^3}{(1-\cos \theta)^2}\right]_{{\cos \theta \>=\>1-\frac{2a}R}}^{\theta=\pi}\\
=&\> 2\pi \left ( \frac{a^3}{3} - aR^2 + \frac{2R^3}{3} \right )
\end{align}
A: First we find the intersection of the sphere with the paraboloid.
Since $x^2 + y^2 = 4a(z + a)$ then $4a(z + a) + z^2 = R^2$ so $z^2 + 4az + 4a^2 -R^2 = 0$. Then $$z = \frac{-4a \pm \sqrt{16a^2 + 4R^2 - 16a^2}}{2} = -2a \pm R$$ so the intersection is at height $R-2a$, as you said. The maximum radius would occur at the intersection so $r= \sqrt{x^2 + y^2} \sqrt{4a(R-2a +a)} = \sqrt{4a(R-a)}$. And $z$ is bounded below by the paraboloid so $r^2/4a - a$ and above by the sphere so $\sqrt{R^2 - r^2}$. Then the volume integral is given by $$\int_0^{2\pi} \int_0^{\sqrt{4a(R-a)}} \int_{r^2/4a - a}^{\sqrt{R^2 - r^2}} r dz dr d\theta.$$
