I know Gauss's divergence theorem for a vector field:
$$\iint{\vec{F}\cdot\hat{n}}\space{dS}=\iiint\nabla\cdot\vec{F}\space{dV}$$
But how do you apply this to a scalar field? For example, if you wanted to find the surface integral of $z^2$ over a unit cube:
$$\iint_{S}z^2{dS}$$
where $S$ is the surface of unit cube, how would you approach this using Gauss's divergence theorem?
Best Answer
You can always write $ z^2 = z^2 \hat{n}.\hat{n} $ where $\hat{n} $ is the unit normal then using divergence theorem your expression becomes $$ \iiint_{|z|\leq 1} \nabla.(z^2\hat{n})dV $$