How do you do change of variables for triple integrals? I am evaluating the function over the following bounds.$$\int_0^2\int_0^{\sqrt{4-x^2}}\int_0^{\sqrt{4-x^2-y^2}}z\sqrt{4-x^2-y^2}\,\mathrm dz\,\mathrm dy\,\mathrm dx$$
I'm not sure how to combine triple integrals and change of variables. Can someone run me through the steps for this problem?
thanks
 A: the bound is a globe (the one eighth in the first octant). you can change to spherical coordinates.
$x=r\cos\theta\cos\phi$
$y=r\sin\theta\cos\phi$
$z=r\sin\phi$
$\mathrm{d}V=\mathrm{d}x\,\mathrm{d}y\,\mathrm{d}z=r^2\sin\phi\,\mathrm{d}r\,\mathrm{d}\theta\,\mathrm{d}\phi$
A: As you said in a comment to Lance's answer, the integral is taken over the first octant, since we have $x,y,z\ge0$.  The sphere has radius $2$, so we have $0\le r\le 2$.  Now $\theta$ is the angle of rotation about the $z$-axis.  It's just like $\theta$ in polar coordinates.  Since we're only in the first octant, $0\le\theta\le\frac{pi}{2}$.  Now $\phi$ is the angle between the vector and the $z-axis$.  There are a couple of different systems for defining it.  Some people restrict $0\le\theta\le \pi$.  Others restrict $-\frac{\pi}{2}\le\theta\le \frac{\pi}{2}.$  In any event, because we are only taking the hemisphere above the $xy$-plane, $\phi$ will have a range of length $\frac{\pi}{2}.$
Using the system given in Lance's answer, we will have $0\le \theta \le \frac{pi}{2}.$  (Notice that when $\theta=0, z=r\sin \theta= 0,$ and when $\theta=\frac{\pi}{2}, z=r\sin \theta =r.$)  Finally, the integral becomes  $$\int_0^2\int_0^{\frac{\pi}{2}}\int_0^{\frac{\pi}{2}}{r\sin \phi}\sqrt{4-r^2cos^2\phi}r^2\sin\phi\, \mathrm d\phi\, \mathrm d\theta\, \mathrm dr
$$
A: \begin{align}
& \int_0^2 \left( \int_0^{\sqrt{4-x^2}} \left( \int_0^{\sqrt{4-x^2-y^2}}z\sqrt{4-x^2-y^2}\,\mathrm dz\right) \,\mathrm dy \right)\,\mathrm dx \\[10pt]
& \text{The innermost integral is easy:} \\
& \int_0^{\sqrt{4-x^2-y^2}} z \underbrace{\sqrt{4-x^2-y^2}}_\text{No  $z$ appears here.} \,\, \mathrm dz \\[10pt]
= {} & \sqrt{4-x^2-y^2} \int_0^{\sqrt{4-x^2-y^2}} z\,\mathrm d z \\
& \text{This can be done because the factor that} \\
& \text{was pulled out does not depend on $z$.} \\[10pt]
= {} & \sqrt{4-x^2-y^2} \cdot \frac{4-x^2-y^2} 2 = \frac 1 2 (4-x^2-y^2)^{3/2}. \\[10pt]
& \text{So now we have} \\
& \frac 1 2 \int_0^2 \int_0^{\sqrt{4-x^2}} (4-x^2-y^2)^{3/2}  \, \mathrm dy \, \mathrm dx \\[10pt]
= {} & \frac 1 2 \iint\limits_{\{\,(x,y)\,:\, x^2+y^2\,\le\,4 \, x,y\,\ge\,0 \,\}} (4-x^2-y^2) \, \mathrm d(x,y) \\[10pt]
= {} & \frac 1 2 \int_0^{\pi/2} \underbrace{\left( \int_0^2 (4-r^2)^{3/2} r\, dr \right)}_\text{No $\theta$ appears here.} \, d\theta \\[10pt]
= {} & \frac 1 2 \cdot \frac \pi 2 \int_0^2 (4-r^2)^{3/2} r\,dr \quad \text{This works because no $\theta$ was in $\int_0^{\pi/2}\cdots\,d\theta$.} \\[10pt]
= {} & \frac \pi 4 \int_4^0 u^{3/2} \left( \frac{-du} 2\right) = \cdots
\end{align}
