I am asked to solve the following problem:
Changing the variables, evaluate the integral of the function $f(x,y,z) = z^3$ on the region defined by $z \geq 0 \quad x^2+y^2 \leq 1 \quad x^2+y^2+z^2 \leq 2$.
I thought about using spherical coordinates:
$$ 0 \leq \rho \leq \sqrt{2}\\ 0 \leq \theta \leq 2\pi\\ 0 \leq \phi \leq \frac{\pi}{2} $$
with $\rho^5cos^3(\phi)sin(\phi)$ on the integral, but that didn't work.
$$ \int_{0}^{\pi/2} \int_{0}^{2\pi} \int_{0}^{\sqrt{2}} \rho^5cos^3(\phi)sin(\phi) \ d\rho d\theta d\phi $$
Where did I go wrong?
You have to stay within the cylinder, the sphere is only the 'cap' (on top) so you can't have constant (outer) limits for $\phi$ and $\rho$.
I think cylindrical coordinates are more appropriate than spherical ones. In cylindrical coordinates you simply have $r:0\to1$ and $t:0 \to 2\pi$ and for the top, $z : 0 \to\sqrt{2-r^2}$ since: $$x^2+y^2+z^2 = 2 \Leftrightarrow z^2 = 2-(x^2+y^2) = 2- r^2$$ The integral then becomes: $$\int_0^{2\pi} \int_0^1 \int_0^{\sqrt{2-r^2}} z^3 r \,\mbox{d}z \,\mbox{d}r \,\mbox{d}t = \cdots = \frac{7\pi}{12}$$ The calculations are a lot easier than doing it straight in Cartesian coordinates: $$\int_{-1}^{1} \int_{-\sqrt{1-x^2}}^{\sqrt{1-x^2}} \int_{0}^{\sqrt{2-x^2-y^2}} z^3 \,\mbox{d}z \,\mbox{d}y \,\mbox{d}x = \cdots = \frac{7\pi}{12}$$