Triple Intergal in spherical coordinates I was trying to evaluate a triple integral in spherical coordinates:
$$\int_{-2}^{2}\int_{0}^{\sqrt{4-y^{2}}}\int_{-\sqrt{4-x^{2}-y^{2}}}^{\sqrt{4-x^{2}-y^{2}}}y^{2}\sqrt{x^{2}+y^{2}+z^{2}}dzdxdy\\$$
I found the limits as follows:
$-\frac{\pi}{2}\le\theta \le \frac{\pi}{2}$ ,$-2 \le \rho \le2$ , $0 \le \phi\le\pi$
I also changed the function by substituting $y^{2}=(\rho \sin{\phi}\sin{\theta})^{2}$ and $x^{2}+y^{2}+z^{2}=\rho ^{2}$ into the integral.
I still feel i have done a mistake here since my answer comes out incorrect after evaluating the integral. Any help will be much appreciated.
 A: We have $\rho=\sqrt{x^2+y^2+z^2}$, so the radius for the range of the sphere is $0\leq \rho\leq 2$. Then you are integrating on the half circle in the $xy$ plane, so $-\frac{\pi}{2}\leq \theta \leq \frac{\pi}{2}$. So after changing to polar coordinates we have
$$ \int_{-\frac{\pi}{2}}^{\frac{\pi}2{}} \int_{0}^{\pi} \int_{0}^{2} \rho^3\sin^2(\theta)\sin^2(\phi)\rho^2\sin(\phi)d\rho d\phi d\theta 
$$
A: $ \displaystyle \int_{-2}^{2}\int_{0}^{\sqrt{4-y^{2}}}\int_{-\sqrt{4-x^{2}-y^{2}}}^{\sqrt{4-x^{2}-y^{2}}}y^{2}\sqrt{x^{2}+y^{2}+z^{2}} ~ dz ~dx ~dy$
Taking $x = \rho \cos \theta \sin \phi, y = \rho \sin\theta \sin\phi, z = \rho \cos\phi$, your bounds of $\phi$ and $\theta$ are absolutely correct. The only mistake is in the bounds of $\rho$ which should be $0 \leq \rho \leq 2$. We always define $\rho$ as non-negative and we decide bounds of $\theta$ and $\phi$ according to signs of $x, y, z$ in different octants.
But if you want to simplify the integral, please use the symmetry of the region around origin. Note that the integral is half of,
$ \displaystyle \int_{-2}^{2}\int_{-\sqrt{4-y^2}}^{\sqrt{4-y^2}}\int_{-\sqrt{4-x^2-y^2}}^{\sqrt{4-x^2-y^2}}y^2\sqrt{x^2+y^2+z^2} ~ dz ~dx ~dy$
which, again due to symmetry, is one third of
$ \displaystyle \int_{-2}^{2}\int_{-\sqrt{4-y^2}}^{\sqrt{4-y^2}}\int_{-\sqrt{4-x^2-y^2}}^{\sqrt{4-x^2-y^2}} (x^2 + y^2 + z^2) \sqrt{x^2+y^2+z^2} ~ dz ~dx ~dy$
So if you want to simplify, the integral can be written as,
$ \displaystyle \frac16 \int_{0}^{2\pi} \int_0^{\pi} \int_0^2 \rho^5 \sin\phi ~ d\rho ~ d\phi ~ d\theta $
