<s>[INST] Integral between 2 spheres 
Let D be the set of all points $(x, y, z)$ satisfying 
  $ 1 \leq x^2 + y^2 + z^2 \leq 2 $ and $ z \geq 0 $ 
  , find $\int_{D}x^2 $

how do i solve this question through triple integral and spherical co-ordinates ?
should i calculate $ \int_{r=1}^{r=\sqrt{2}}\int_{\theta = 0}^{\theta = 2\pi}\int_{\phi = 0}^{\phi = \frac{\pi}{2}} r^4cos(\theta)^2sin(\phi)^3{dr}\ d{\theta}\ d{\phi} $
imaginging the volume it is between a ball with radius $1$ and a ball with radius $\sqrt{2}$
 [/INST] First, notice that, due to symmetry
$$\iiint\limits_{1<r<\sqrt 2,z>0}x^2 dxdydz=\frac{1}{2}\iiint\limits_{1<r<\sqrt 2}x^2 dxdydz$$
Now
$$\iiint\limits_{1<r<\sqrt 2}x^2 dxdydz = \iiint\limits_{1<r<\sqrt 2}y^2 dxdydz = \iiint\limits_{1<r<\sqrt 2}z^2 dxdydz$$
Thus,
$$\iiint\limits_{1<r<\sqrt 2,z>0}x^2 dxdydz = \frac{1}{6}\iiint\limits_{1<r<\sqrt 2}(x^2+y^2+z^2) dxdydz = \frac{1}{6}\iiint\limits_{1<r<\sqrt 2}r^2 dxdydz $$
Now, since the integrand only depends on $r$, we don't need full spherical coordinates, but only the surface area of a sphere of radius $r$, which is $4 \pi r^2$. So,
$$\frac{1}{6}\iiint\limits_{1<r<\sqrt 2}r^2 dxdydz =\frac{1}{6} \int\limits_{1<r<\sqrt 2}4 \pi r^4 dr = \frac{2 \pi}{15}r^5 \biggr\rvert_1^\sqrt 2=\frac{2 \pi}{15}(4\sqrt 2-1)$$
</s>