Can you guys tell me, with reasoning, how to write this triple integral in $x$ and $y$ direction first? I found it very hard to do through graphing.
$$\int_{0}^{1} \int_{0}^{x}\int_{0}^{x+2y} \mathrm dz\,\mathrm dy\,\mathrm dx$$
Can you guys tell me, with reasoning, how to write this triple integral in $x$ and $y$ direction first? I found it very hard to do through graphing.
$$\int_{0}^{1} \int_{0}^{x}\int_{0}^{x+2y} \mathrm dz\,\mathrm dy\,\mathrm dx$$
Your initial condition has the following conditions: $$ 0\le x \le 1, 0 \le y \le x, 0 \le z \le x+2y. \tag{1}\label{1}$$ Notice the order of this: You end with $x$ so inequality inequality involving $x$ should not depend on $y,z$. This gives you $0 \le x \le 1$. You go with $y$ second to last which means inequality involving $y$ can depend on $z$. This gives you $0 \le y \le x$. Similarly, you get $0\le z \le x+2y$.
Now, if you want to write the integral in $x,y$ direction first, which means you end with $z$, and therefore inequality involving $z$ should not depend on $x,y$. Look at $\eqref{1}$ and you can only get $0\le z \le x+2y\le 3x \le 3$ or $0 \le z \le 3$. If you want to go with $y$ next then similarly, inequality involving $y$ can depend on $z$. Look at $\eqref{1}$ to obtain the most strict bound, you get $\max \{ 0,\frac{z-x}{2}\} \le y \le x \le 1$. Since we don't want to involve $x$ in this so you from $\frac{z-x}{2} \ge \frac{z-1}{2}$ since $x \le 1$, you would get $\max\{ 0,\frac{z-1}{2}\} \le y \le 1$.
Lastly, we go for $x$, look at $\eqref{1}$ and we find $0 \le y \le x \le 1$ and $x \ge z-2y$ so your answer is $\max \{y,z-2y\} \le x \le 1$. Thus, you obtain your domain as $$0 \le z \le 3, \max\{ 0,\frac{z-1}{2}\} \le y \le 1, \max \{y,z-2y\} \le x \le 1. \tag{2} \label{2}$$ If you are unsure, you can check by showing that $\eqref{1}\iff \eqref{2}$. What we did above gives $\eqref{1}\implies \eqref{2}$. To prove the converse, pick $(x,y,z)$ from $\eqref{2}$ and show that such point satisfies $\eqref{1}$.
@Andy Lam: It seems I also got the wrong answer when I just type $$\int_0^3\int_{\max\{0,\frac{z-1}{2}\}}^1\int_{\max\{y,z-2y \}}^1 dxdydz$$ into Sagemath (see here). However, if I break down $\eqref{2}$ to avoid using $\max$, which is: $$ \int_0^1 \int_0^{z/3}\int_{z-2y}^1dxdydz+ \int_0^1\int_{z/3}^1\int_y^1dxdydz+ \int_1^3\int_{z/3}^1\int_y^1dxdydz+ \int_1^3\int_{(z-1)/2}^{z/3}\int_{z-2y}^{1}dxdydz$$ then the answer turns out to be correct, which is $2/3$.
Edit number 2: It seems the problem about Sagemath as I mentioned above has been solved and actually, my answer is correct, i.e.
$$\int_0^3\int_{\max\{0,\frac{z-1}{2}\}}^1\int_{\max\{y,z-2y \}}^1 dxdydz=\int_{0}^{1} \int_{0}^{x}\int_{0}^{x+2y} \mathrm dz\,\mathrm dy\,\mathrm dx=2/3.$$