# How to calculate the volume given by $x-y+z=6, \ x+y=2, \ x=y, \ y=0, \ z=0$

Calculate the volume of the body bounded by the following surface:

$$x-y+z=6, \ x+y=2, \ x=y, \ y=0, \ z=0$$

I would do this with a triple integral. For this, however, we need to find the boundaries first. I would do it this way:

$$\int_{0}^2\int_0^{x} \int_0^{6-x+y} 1 \ dzdydx$$

Is this correct? I found the boundary for $$x$$ by the Geogebra plot below.

The region in question lies over the triangle with vertices $$(0,0)$$, $$(1,1)$$, and $$(2,0)$$ in the $$xy$$-plane. If you're going to set up an iterated integral over that triangle, you'll need two separate integrals if you use the order $$dy\,dx$$. I recommend you switch to $$dx\,dy$$. Then $$0\le y\le 1$$ and for each fixed $$y$$, what is the range on the $$x$$ values? Your $$z$$ limits are correct.
By making a simple hand drawing you can realize the object is a prism with base in the triangle you said and top in the plane $$x-y+z=6$$ so your volume integral admits the form $$V=\int_0^1\left(\int_{y}^{2-y}(6-x+y)dx\right)dy$$.
Note that you never incorporated the boundary $$x+y=2$$ in your setup. It is the upper limit for $$y$$ over the region $$x\in[1,2]$$. Thus, the integral is
$$\int_{0}^1\int_0^{x} \int_0^{6-x+y} 1 \ dzdydx+\int_{1}^2\int_0^{2-x} \int_0^{6-x+y} 1 \ dzdydx$$