# Volume of the solid bounded by the region $E = \{(x,y,z) \, : \, x^2 + y^2 +z^2 - 2z \leq 0, \sqrt{x^2+y^2} \leq z\}$

I want to find the volume of the solid bounded by the region $$E = \{(x,y,z) \, : \, x^2 + y^2 +z^2 - 2z \leq 0, \sqrt{x^2+y^2} \leq z\}$$ in spherical coordinates.

After setting up the region, my limits of integration are

$$0 \leq \rho \leq 2 \cos\phi$$ $$0 \leq \phi \leq \tfrac{\pi}{4}$$ $$0 \leq \theta \leq 2\pi$$

So evaluating the integral in spherical coordinates, I get

$$\int_{0}^{2\pi} \int_{0}^{\pi/4} \int_{0}^{2cos\phi} \rho^2 \sin\phi \, d\rho \, d\phi \, d\theta = \pi$$

However, the solution has $\frac{\pi}{4}$ and the limits of $\theta$ are $0$ and $\frac{\pi}{2}$, and I don't understand why. I cannot figure out why $\theta$ has a maximum of $\frac{\pi}{2}$. I would appreciate it if someone would take a look at this problem for me. Thanks.

It is algebraically clear that $$\theta$$ is unconstrained, but it is also clear geometrically: The region is the inside of the unit ball shifted up 1 in the $$z$$ direction, $$x^2+y^2+z^2-2z\leq 0\iff x^2+y^2+(z-1)^2\leq 1$$ and $$z\geq \sqrt{x^2+y^2}$$ is the region above an upward facing cone with tip at $$0$$. To capture the entire region, $$\theta$$ must range between $$0$$ and $$2\pi$$ (unless you want to exploit the considerable symmetry).