Calculate $\displaystyle\iiint_Df(x,y,z)\, dx\,dy\,dz$ with $f(x,y,z) = \cos(x)$ and $D = \{ (x,y,z) \in \mathbb{R}^3: x^2 + y^2 + z^2 < 1 \}.$
I struggle to do this as there are three coefficients to use. If we had only $x^2 + y^2 <1$ then I would just put $x \in (-1,1)$ and $-\sqrt{1-x^2}<y < + \sqrt{1-x^2}$ and then would simply calculate $$ \int_{-1}^{1} \left( \int _{-\sqrt{1-x^2}}^{\sqrt{1-x^2}}\cos(x)\,dy \right) dx$$
But here I get one additional term $z$, and I am unsure of how to proceed.
I believe that I might try to do this:
$x \in (-1,1)$, $-\sqrt{1-x^2}<y^2 + z^2 <\sqrt{1-x^2} $ thus we would have $-\sqrt{\sqrt{1-x^2}-y^2}<z<\sqrt{\sqrt{1-x^2}-y^2}$. And then:
$$\iiint_Df(x,y,z) \,dx\,dy\,dz = \int_{-1}^{1}\cos(x) \int_{-\sqrt{1-x^2}}^{\sqrt{1-x^2}} \left( \int_{-\sqrt{\sqrt{1-x^2}-y^2}}^{\sqrt{\sqrt{1-x^2}-y^2}} 1\,dz \right)dy \,dx $$
Which equates to:
$$ \int_{-1}^{1}\cos(x) 2\int^{\sqrt{1-x^2}}_{-\sqrt{1-x^2}} \sqrt{\sqrt{1-x^2}-y^2}\, dx\,dy.$$
Which I believe will give me rather tedious calculations to do, so before proceeding, I wish to know if I am on the right track?
For a fixed $x_0\in[-1,1]$, the area of $\{(x,y,z)\in\mathbb{R}^3: x^2+y^2+z^2\leq 1, x=x_0\}$ is given by $\pi(1-x_0^2)$, hence the given integral is equivalent to $$ \pi\int_{-1}^{1} (1-x_0)^2 \cos(x_0)\,dx_0$$ or to $\color{red}{4\pi\cos(1)}$, by integration by parts.