Calculation of volumes by direct integration
To calculate the volume of the region limited by the cylinder with $\ x^2+y^2=1 \ $ and the planes $\ z=0 \ $ and $ \ z=2-x$.
For the symmetry of the problem, we will consider cylindrical coordinates.
The cylinder remains determined by $r^2=1$ and the planes $z=0$ and $z=2-\cos\varphi$. Therefore, the integration limits will be:
$$\begin{array}{l} r\in(0,1) \\ \varphi\in(0,2\pi) \\ z\in(0,2-r\cdot\cos\varphi) \end{array} $$
Then, if $V$ is the region under consideration:
$$\begin{array}{rl} \text{Vol}(V)=&\iiint_V 1 \ dx \ dy \ dz =\int_0^{2\pi} \int_0^1 \int_0^{2-r\cos\varphi} r \ dz \ dr \ d\theta \\ =&\int_0^{2\pi} \int_0^1 \big[ r\cdot z \big]_0^{2-r\cos\varphi} \ dr \ d\theta = \int_0^{2\pi} \int_0^1 (2-r\cos\varphi)r \ dr \ d\theta \\ =& \int_0^{2\pi} \int_0^1 (2r-r^2\cos\varphi) \ dr \ d\varphi = \int_0^{2\pi} \Big[r^2-\dfrac{r^3}{3}\cos\varphi\Big]_0^1 \ dr \ d\varphi \\ =& \int_0^{2\pi} 1-\dfrac{1}{3}\cos\varphi \ d\varphi = \Big[\varphi-\dfrac{1}{3}\sin\varphi\Big]_0^{2\pi} =2\pi \end{array}$$
$\text{Vol}(V)=2\pi$