<s>[INST] 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
 [/INST] \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}
</s>