$\int\int\int_R \cos x\, dxdydz,$ where $R= \{(x,y,z)\in \textbf{R}^3 :x^2+y^2+z^2\le\pi^2\}$ Let $R = \{(x,y,z)\in \textbf{R}^3 :x^2+y^2+z^2\le\pi^2\}$
How do I integrate this triple integral
$$\int\int\int_R \cos x\, dxdydz,$$ where $R$ is a sphere of radius $\pi$?
I have trouble understanding this particular step from the solution, $$\int\int\int_R \cos x \,dxdydz=\pi\int_{-\pi}^\pi({\pi}^2-x^2)\cos x\,dx$$
 A: The integrand does not depend on $y$ or $z$, so they are performing the integration over those two variables.  For a given $x$, the region parallel to the $yz$ plane is a circle of radius $\sqrt{\pi^2-x^2}$ so the area is $\pi(\pi^2-x^2)$.  
A: The integral is doable in spherical coordinates, but it is not trivial.  Write the integral out as follows:
$$\int_0^{\pi} dr \, r^2 \: \int_0^{\pi} d\theta \, \sin{\theta} \: \int_0^{2 \pi} d\phi \, \cos{(r \sin{\theta} \cos{\phi})}$$
because $x = r \sin{\theta} \cos{\phi}$.  Use the fact that
$$\int_0^{2 \pi} d\phi \, \cos{(a \cos{\phi})} = 2 \pi J_0(a)$$
where $J_0$ is the Bessel function of the first kind, of zeroth order.  Now the integral is
$$2 \pi \int_0^{\pi} dr \, r^2 \: \int_0^{\pi} d\theta \, \sin{\theta}\, J_0(r \sin{\theta})$$
For the inner integral, substitute $u=\sin{\theta}$ and the integral becomes
$$\int_0^{\pi} d\theta \, \sin{\theta}\, J_0(r \sin{\theta}) = 2 \int_0^1 du \frac{u}{\sqrt{1-u^2}} J_0(r u) = 2 \frac{\sin{r}}{r}$$
Then the integral is
$$2 \pi \int_0^{\pi} dr \, r \sin{r} = 2 \pi^2$$
