The question says that:
If $\vec{F}=(2x^2-3z)\vec{i}-2xy\vec{j}-4x\vec{k}$, we are supposed to calculate $\iiint \operatorname{div} \vec{F}\, dV$, where $V$ is the closed region bounded by the planes $S_1: x=0, S_2: y=0, S_3: z=0$ and $S_4: 2x+2y+z=4$. It suggests the use of Gauss Divergence theorem here, which states: $$\iint_S \vec{F}\, \vec{dS} = \iiint_V \operatorname{div} \vec{F}\, dV$$ The volume integral is easy to calculate, and it reduces to the volume of the tetrahedron: $$\iiint 2x dV=\frac{8}{3}$$
I am trying to verify whether the flux enclosed by the given region in the first octant is the same as above.
$$\iint_S \vec{F}\, \vec{dS}=\iint_{S_1} \vec{F}\, \vec{dS}+\iint_{S_2} \vec{F}\, \vec{dS}+\iint_{S_3} \vec{F}\, \vec{dS}+\iint_{S_4} \vec{F}\, \vec{dS}=16+0+\frac{16}{3}-\frac{56}{3} = \frac{8}{3}$$
I am unsure about the flux calculation, especially through $S_4$. Kindly help me out in verifying, I am self-learning this topic and have been stuck for long in this question. Thanks in advance.
EDIT 1: $\iint_{S_4} \vec{F}\, \vec{dS}= \iint_{2x+2y+z=4} \vec{F}.\vec{n_4} dS$ where $\vec{n_4}$ is the unit normal vector on $S_4$ along $ \nabla{2x+2y+z}$ which is: $\frac{2}{3}\vec{i}+\frac{2}{3}\vec{j}+\frac{1}{3}\vec{k}$.
So, $\iint_{S_4} \vec{F}\, \vec{dS}=\frac{1}{3} \iint_{2x+2y+z=4} (4x^2-6z-4xy-4x) dS $
Now, I took the orthogonal projection of the surface $S_4$ on the $xy$ plane to calculate it; so the surface element was substituted as: $dS |{\vec{n_4}.\vec{k}}|=dx.dy $ in the integral and on further solving, I got the expression:
$\iint_{0 \le x \le 2, 0 \le y \le (2-x)} 4(x^2-xy+2x+3y-6) dx dy = \frac{-56}{3} $
EDIT 2: I rechecked my calculation, as per the suggestion of the valuable comment and got my mistake in claculating $S_1$. Here $x=0$ and $\vec{n_1}=\vec{-i}$. Accordingly,
$\iint_{S_1} \vec{F}\, \vec{dS} = \iint_{0 \le y \le 2,\ 0 \le z \le (4-2y)} 3z \ dz dy = 16$
Kindly suggest if the calculation is okay, and if it can be done otherwise. Thanks!