# Verification for spherical coordinates.

Given the integral to be integrated using spherical coordinates: $$\iiint_{x^2+y^2+z^2 \le z}\sqrt{x^2+y^2+z^2}\,dx\,dy\,dz$$ I used the coordinates as follows: \left\{ \begin{align} x &= \rho\sin\varphi \cos\theta \\ y &= \rho\sin\varphi \sin\theta \\ z & =\rho\cos\varphi \end{align} \right.

And the limits as follows: \begin{align} 0 \le &\varphi \le \pi \\ 0 \le &\theta \le 2\pi \end{align} and based on the condition given in the integral, $$0 \le \rho \le \cos\varphi$$

I solved the integral to be $$\int_{0}^{2\pi}\int_{0}^{\pi}\int_{0}^{\cos\varphi} \rho \cdot \rho^2 \sin\varphi \, d\rho \, d\varphi \, d\theta$$

I solved this integral and the answer I got was $\frac{\pi}{5}$. However, this is an online assignment and the system says it's incorrect (the answer is to two places of decimals and I tried with both $0.62$ and $0.63$) I tried doing this sum many times but I can't point the mistake out. Thanks in advance :)

Hint: Notice that the region $x^2+y^2+z^2 \leq z$ also requires that $z \geq 0$.
Your error is in finding the bounds of integration after the change of variable. The condition $$x^2+y^2+z^2\le z$$ translates to $$\rho^2\le\rho\cos\varphi$$ and thus you have $\theta\in[0,2\pi]$, $\rho\in[0,\cos\varphi]$ and $\varphi\in[0,\pi/2]$. This should give you the result of $\frac{\pi}{10}$.