If $ \vec{F} = y\hat{\imath} + 2x\hat{\jmath}-z\hat{k}$ and S is a surface of plane $2x+y=4$ in the first octant cutoff by plane $z=4$ then evaluate $\int_S \vec{F}\hat{n}dS$
Now if I solve this surface integral by calculating $\hat{n}$ and $dS$ and converting it in a double integral I get answer as $48$.
But If i try to use Gauss divergence theorem and convert it to volume integral I get the answer as $-16$(I have checked my calculation twice and I am sure there are no arithemetic errors)
My question is : Why am I getting two different answers to the same question
What is my mistake in this question ?
Gauss' divergence theorem converts an integral of ${\bf F}$ over the surface $\partial B$ of a body $B\subset{\mathbb R}^3$ into a volume integral over $B$: $$\int_{\partial B} {\bf F}\cdot{\bf n}\>{\rm d}\omega=\int_B{\rm div} {\bf F}\>{\rm d}V\ .$$ In your example there is no body $B$ to be seen, just a rectangular surface $S$. When you invented a "volume" over which you integrated the divergence of ${\bf F}$ you introduced a complicated boundary, of which the surface $S$ is only a small part.
This example is not a case for Gauss' theorem.