<s>[INST] How to integrate $\int_{0}^{1} \int_{0}^{\pi} \int_{0}^{\pi} r^2 \sin\theta \sqrt{1 - r^2\cos^2\theta - r^2\sin^2\theta} \,d\phi\, d\theta \,dr$ 
Find the center of mass of the hemispherical region $W$ defined by the inequalities $x^2 + y^2 + z^2 \leq 1$ and $z \geq 0$ with unity density.

By symmetry we know the $x$ and $y$ coordinates will be $0$ so we just need the $z$ coordinate. The volume of a hemisphere is just $\frac{2}{3} \pi$ from the formula for the volume of a sphere, so we just need to compute $\iiint_{W}^{} z \, dz \, dy \, dz$.
This formula along with using the same limits for the integration of the volume of a hemisphere, we have: $\int_{0}^{1} \int_{0}^{\pi} \int_{0}^{\pi} r^2 \sin\theta z \, d\phi \, d\theta \, dr$. $z = \sqrt{1 - x^2 - y^2} = \sqrt{1 - r^2\cos^2\theta - r^2\sin^2\theta}$, so we substitute that in and get: $\int_{0}^{1} \int_{0}^{\pi} \int_{0}^{\pi} r^2 \sin\theta \sqrt{1 - r^2\cos^2\theta - r^2\sin^2\theta} \, d\phi \, d\theta \, dr$.
Is there an easy way to integrate this?
 [/INST] The right way is to use cylindrical coordinates:
$$
Z=\frac{\int_0^1z (\pi(1-z^2))dz}{\int_0^1  (\pi(1-z^2))dz}=\frac{3}{2}\int_0^1(z-z^3)dz=\frac{3}{8}.
$$
</s>