Setting up the triple integral in $\mathrm {dz dy dx}$ order Question:- Find the volume of the region bounded by $x+z=8 ,z=x ,y=8, z=y$ and $z=0$.
The region looks like a prism with vertical base( $y=8$) on one side and slanted base( $z=y$) on other side.

$$V=\int_0^4 \int_z^8 \int_z^{8-z}\mathrm {dx dy dz}=\frac{320}{3}$$
But when I evaluate in the order $\mathrm {dz dy dx}$, I can see that we have to write volume as sum of some triple integrals, I was able to write integrals only for $4\le y \le 8$.In the region $0\le y \le 4$, It is difficult to get z bounds as the line perpendicular to $x-y$ plane intersects given planes in some region, whereas in other region it doesn't.
$$V=\int_0^4 \int_4^8 \int_0^x\mathrm {dz dy dx}+\int_4^8 \int_4^8 \int_0^{8-x}\mathrm {dz dy dx}+...$$
Thankyou for your help!
 A: If you are integrating in the order $dz~ dy ~ dx$, focus on the projection of the region in xy-plane.
The projection of the region bound by $z = x, z + x = 8, z = y$ and $y = 8$ in xy-plane is a square bound by $x = 0, x = 8, y = 0$ and $y = 8$. Also, the projection of the intersection of $z = y$ with planes $z = x$ and $z + x = 8$ are lines $y = x$ and $x + y = 8$ in xy-plane. So for part of the region bound by lines $x = y, x + y = 8, y = 0$ in xy-plane, $z$ is bound above by plane $z = y$. For the part of the projection outside of the triangular region and inside the square, $z$ is bound above either by $z = x$ for $0 \lt x \lt 4$ and by $z +x = 8$ for $4 \lt x \lt 8$.
So to summarize,
a) For $0 \lt x \lt 4$,
$i)$ $0 \lt y \lt x$, $0 \lt z \lt y$
$ii)$ $x \lt y \lt 8$, $0 \lt z \lt x$
b) For $4 \lt x \lt 8$,
$i)$ $0 \lt y \lt 8 - x, 0 \lt z \lt y$
$ii)$ $8 - x \lt y \lt 8, 0 \lt z \lt 8 - x$
Using symmetry you can find volume of $(a)$ and multiply by $2$ or evaluate both.
$ \displaystyle V = 2 \int_0^4 \int_0^x \int_0^y dz ~dy~ dx + 2 \int_0^4 \int_x^8 \int_0^x dz~ dy ~dx = \frac{320}{3}$
