# Switching the order of integraton

I'm trying to figure out how to switch the order of integration for this problem. I'm given the region (I don't know how to use latex, maybe someone can clean this up for me?)

$z$ from $0$ to $x+y$

$y$ from $0$ to $1-x$

$x$ from $0$ to $1$

That was for the integral $dz\;dy\;dx$ and I have to change it to $dy\;dx\;dz$. I think maybe I drew out the region wrong and that's why I can't figure this out. The one I drew looks like a right triangle. In the first octant The $x$ axis from 0 to 1 and the hypotenuse of the triangle is the line $1-x$ then it goes out in $y$ from 0 to 1 (I can upload the picture if it helps). I don't think I'm taking the $x+y$ part into account anywhere? The new integral I came up with is

$y$ from $0$ to $1$

$x$ from $0$ to $1-y$

$z$ from $0$ to $1$

-
I don't think that $x$ should depend on $y$, if you go in this order. –  Dylan Moreland Jan 21 '12 at 19:26

Write your limits of integration as inequalities:

$$0\le z \le x+y$$ $$0\le y \le 1-x$$ $$0 \le x \le 1$$

and you should be able to see $0 \le y \le 1-x \le 1$ and $0 \le z \le x+y \le x+1-x =1$. You also have $z-x \le y \le 1-x$ so you could have

$$\max(0, z-x) \le y \le 1-x$$ $$0 \le x \le 1$$ $$0\le z \le 1$$

$$\int_{x=0}^1 \int_{y=0}^{1-x} \int_{z=0}^{x+y} dz \, dy \, dx = \int_{z=0}^{1} \int_{x=0}^1 \int_{y=\max(z-x,0)}^{1-x} dy \, dx \, dz$$

but it might be simpler if you split this depending on whether $x$ or $z$ is bigger so

$$z-x \le y \le 1-x$$ $$0 \le x \le z$$ $$0\le z \le 1$$

and

$$0 \le y \le 1-x$$ $$z \le x \le 1$$ $$0\le z \le 1$$

$$\int_{x=0}^1 \int_{y=0}^{1-x} \int_{z=0}^{x+y} dz \, dy \, dx = \int_{z=0}^{1} \int_{x=0}^z \int_{y=z-x}^{1-x} dy \, dx \, dz + \int_{z=0}^{1} \int_{x=z}^1 \int_{y=0}^{1-x} dy \, dx \, dz$$
If you are asking about $\max(0, z-x) \le y$, you know $0\le y$ and you know $z \le x+y$ which is the same as $z-x \le y$. So $y$ is greater than or equal to both $0$ and $z-x$ and so greater than or equal to the maximum of those two. Note that $z$ can be less than, equal to or greater than $x$, and it is sensible to treat the less than and greater cases differently, in which case the $\max$ can be removed. –  Henry Jan 21 '12 at 22:36