<s>[INST] How to calculate volume of $z = 0, z = 1, x+y+z=2, x = 0, y = 0$ area by tripple integral? I am calculating volume of body that is defined by $z = 0, z = 1, x+y+z=2, x = 0, y = 0$ to do this I have two possible ways:


*

*$$\int\limits_0^2\int\limits_0^{2-x}\int\limits_0^{2-x-y}1\mathrm{d}z\,\mathrm{d}y\,\mathrm{d}dx-\int\limits_1^2\int\limits_1^{2-x}\int\limits_1^{2-x-y}1\mathrm{d}z\,\mathrm{d}y\,\mathrm{d}x=\frac{2}{3}$$ where the first integral is volume without $z=1$ and second integral is the part over $z=1$.

*I expect that $z = 0, x+y+z=2, x = 0, y = 0$ is half of cube $2\times2\times2$. Volume of that cube is $8$ so volume of half is $4$. The part over $z=1$ is half of cube $1\times1\times1$. Volume of this cube is 1 and volume of half is $\frac{1}{2}$. So volume I trying to find is $4-\frac{1}{2}=\frac{7}{2}$
At least one of (1), (2) must by wrong. What is right volume of area defined by  $z = 0, z = 1, x+y+z=2, x = 0, y = 0$ ?
 [/INST] If you look at a cross-section of the volume in a plane $z=\text{constant}$, then the region is a right triangle of area 
$$\frac{1}{2} (2-z)^2$$
The volume is then
$$\int_0^1 dz \: \frac{1}{2} (2-z)^2 = \left [ \frac{1}{6} (2-z)^3\right ]_1^0 = \frac{7}{6}$$
</s>