Surface S is part of $x^2+y^2=1$ between planes $z=0$ and $x+y+z=2$. A vector field $F=\langle x,y,z\rangle$. What is the value of integration $$\iint_S F\cdot n \,dS $$ where $n$ is the unit normal vector of $S$.
Since the surface is not smooth, we cannot apply the divergence theorem here. Therefore, I calculate the flux on the following three surfaces separately.
(1) The cylinder $S_1$
I parametrize the cylinder surface as $r(z,\theta)=\langle \cos \theta, \sin \theta, z\rangle$. Then
$$\iint_{S_1} F\cdot n \,dS = \iint_D \langle x,y,z\rangle\cdot (r'_\theta \times r'_z)\,dA =\iint_D \langle x,y,z\rangle\cdot \langle \cos \theta, \sin \theta,0 \rangle \,dA =\iint_D \,dA$$
(2) The top plane $S_2:x+y+z=2$
$$\iint_{S_2} F\cdot n \,dS = \iint_D \langle x,y,z\rangle\cdot\langle 1,1, 1\rangle\,dA=\iint_D x+y+z \,dA $$ which is equal to $$\iint_D 2 \,dA$$
(3) The bottom plane $S_3: z=0$
$$\iint_{S_3} F\cdot n \,dS = \iint_D \langle x,y,z\rangle\cdot\langle 0,0, 1\rangle\,dA=\iint_D z \,dA=0 $$
Is my approach right?
Now the answer is $\iint_D 3 \,dA$, which is the same as what the divergence theorem gives. Is it a coincidence? The surface is closed but not smooth.