Find the volume of the solid that lies above the cone : $z^2 = x^2 + y^2$ and inside the sphere $x^2 + y^2 + (z-2)^2 = 4$

calculusmultiple integralmultivariable-calculusspherical coordinatesvolume

Using spherical coordinates find the volume of the solid that lies above the cone: $z^2 = x^2 + y^2$ and inside the sphere $x^2 + y^2 + (z-2)^2 = 4$
I'm aware that there's a similar question here using a different method.
Assuming it's the same problem I should get the same sol. but my attempts with spherical coor. yield a different answer so I need to know where the mistake is.

My attempt :
The solid is bounded above by the sphere centered at $(0,0,2)$ and below by the circle at which the sphere and the cone intersect: $x^2+y^2=2z$ (at $z=2$) whose projection on the $xy$-plane is $x^2+y^2=4$

So the limits are given by : $$ Q= \{ 0 \leq \rho \leq 2 \;,\; 0 \leq \phi \leq \frac{\pi}{2} \;,\; 0 \leq \theta \leq 2\pi \}$$
$$
\begin{align}
V &= \underset{Q}{\iiint} \rho^2 \sin(\phi) \;d\rho \;d\phi \;d\theta \\
&= \int_0^{2\pi} \int_0^{\frac{\pi}{2}} \int_0^{2} \rho^2 \sin(\phi) \;d\rho \;d\phi \;d\theta \\
&= \int_0^{2\pi} \int_0^{\frac{\pi}{2}} \sin(\phi) \left[ \frac{1}{3} \rho^3 \right]_0^2 \;d\phi \;d\theta
= \int_0^{2\pi} \int_0^{\frac{\pi}{2}} \frac{8}{3} \sin(\phi) \;d\phi \;d\theta \\
&= \int_0^{2\pi} \frac{8}{3} \bigg[ \sin(\phi) \bigg]_0^{\frac{\pi}{2}} \;d\theta \\
&= \frac{8}{3} \int_0^{2\pi} d\theta \\
&= \frac{16}{3}\pi
\end{align}
$$

Edit: Thank you for correcting me on the limits for $\rho$. But I imagined the problem to be computing the volume of the hemisphere $z = \sqrt{4-x^2-y^2}+2$.
Mainly because it's supported by the answered questions in my textbook. The book claims the answer to be $\dfrac{16}{3}\pi$ but without showing the steps. Therefore I interpreted "the solid that lies above the cone" in the question as " (strictly) above but not inside".

Hence,
$$
\begin{align}
V &= \underset{Q}{\iiint} \rho^2 \sin(\phi) \;d\rho \;d\phi \;d\theta \\
&= \int_0^{2\pi} \int_0^{\frac{\pi}{2}} \int_2^{4\cos(\phi)} \rho^2 \sin(\phi) \;d\rho \;d\phi \;d\theta \\
&(\cdots) \Rightarrow \; V = \frac{16}{3}\pi
\end{align}
$$


enter image description here

I attached an image visualizing my understanding of the problem.

Best Answer

The error here is that you have the upper integration limit for $\rho$ as a constant, 2, but it clearly isn't. Refer to the diagram in the answer to the question you posted: You need to integrate $\rho$ from $0$ at the origin to the point where $$x^2+y^2+(z-2)^2=2^2\tag{1}$$ which doesn't result in a constant $\rho$. Noting that $\rho^2=x^2+y^2+z^2$ and $z=\rho\cos\phi$, we can rewrite (1) as $$ \rho^2-4\rho\cos\phi+4=4 $$ Hopefully you can solve this. So we are integrating over $\rho$ from $0$ to

$\rho=4\cos\phi$.

So the $\rho^2$ part of the integral should result in

${4^3\over3}\cos^3\phi$.

Then it's easy to integrate $\cos^n\phi\sin\phi$ using substitution.