How to change the order of integration in triple integrals? 
How to change the integration order in the given integral?
  $$
\int\limits_0^1dx\int\limits_0^1dy\int\limits_0^{x^2+y^2}fdz\rightarrow
\int\limits_?^?dz\int\limits_?^?dy\int\limits_?^?fdx
$$

I tried to make a graphic interpretation, but it seemed rather complex and didn't clarify the things. Moreover, I might not have much time if I had to solve this kind of problem on a test.
So, I would be really grateful if someone could explain how to solve this problem efficiently.
 A: The iterated integral on the left equals the triple integral
$$
I = \iiint_D f \, dxdydz
,
$$
where
$$
D = \{ (x,y,z) \in \mathbf{R}^3 : 0 \le x \le 1, \, 0 \le y \le 1, \, 0 \le z \le x^2+y^2 \}
.
$$
To write this as an iterated integral with $z$ outermost, we first figure out that the largest possible $z$ coordinate for a point in $D$ is $2$, namely for the point $(x,y,z)=(1,1,2)$. So the range of $z$ will be $0 \le z \le 2$:
$$
I = \int_{z=0}^{2} \left( \iint_{D_z} f \, dxdy \right) dz
,
$$
where $D_z$ is the region in $\mathbf{R}^2$ obtained by slicing through $D$ at a fixed height $z \in [0,2]$:
$$
D_z = \{ (x,y) \in \mathbf{R}^2 : 0 \le x \le 1, \, 0 \le y \le 1, \, x^2+y^2 \ge z \}
.
$$
Geometrically this is what you get when you take the unit square and remove a (quarter) disk with radius $\sqrt{z}$. Now writing a double integral over this region $D_z$ is slightly tricky, since it looks different depending on whether $z$ is less than or greater than $1$ (see case 1
and
case 2
on Wolfram Alpha).
So you'll need to split it,
$$
I=
\int_{z=0}^{1} \left( \iint_{D_z} f \, dxdy \right) dz
+ \int_{z=1}^{2} \left( \iint_{D_z} f \, dxdy \right) dz
,
$$
and then write
$$
I=
\int_{z=0}^{1} \left( \int_{y=0}^{1} \left( \int_{x=g(y)}^{1} f \, dx \right) \, dy \right) dz
+ \int_{z=1}^{2} \left( \int_{y=\sqrt{z-1}}^{1} \left( \int_{x=\sqrt{z-y^2}}^{1} f \, dx \right) \, dy \right) dz
,
$$
where the curve $x=g(y)$ describes the left boundary of $D_y$ in case 1 (when $0\le z \le 1$):
$$
g(y) =
\begin{cases}
\square, 0 \le y \le \square
,\\
\square, \square \le y \le 1
.
\end{cases}
$$
(I'm leaving it for you to figure out how to fill in the blanks in this final step, so that I don't spoil the whole exercise for you!)
A: It's not a good idea to reverse the order of integrals in this case, it will make things more complicated. But it can be done. You need to first understand what is the domain of integration. If you just look at the integral over $z$, and you think about $x^2+y^2$ as $r^2$, you have a paraboloid of revolution around the $z$ axis, and you are looking at the volume between the paraboloid and the $xy$ plane. Note however that you cut this paraboloid with the $x=0$, $x=1$, $y=0$, and $y=1$ planes.
Now let's look at the limits in the reverse order. $z$ obviously goes between $0$ and $2$. Now look at the plane perpendicular to $z$ axis. If you draw this, you have a square from $(0,0)$ to $(1,1)$, but your integration ranges for $x$ and $y$ must account for $x^2+y^2>z$. This is a circle centered at $0$, with radius $R=\sqrt z$. When the radius of the circle is grater than $1$, but less than $\sqrt 2$, the circle intersects the $x=1$ line. The minimum $y$ value is $\sqrt{R^2-1^2}=\sqrt{z-1}$, and the maximum is $1$. Then you integrate $x$ between $\sqrt{R^2-y^2}=\sqrt{z-1-y^2}$ and $1$. For the case where $z<1$, the $y$ integral goes from $0$ to $1$, but you need to split the integral further, in the case where $y<R$ and $y>R$. If $y>R$, then the integral on $x$ is from $0$ to $1$, otherwise it's from $\sqrt{R^2-y^2}$ to $1$.
