I've been practicing questions on past exams to prepare for my upcoming one, but they didn't come with solutions and one question has really got me stuck:
"Consider $\iint\limits _S \vec F . d \vec S$, where $\vec F =xcos^2(\pi z)\hat i +2ycos(\pi x)\hat j +xy^2\hat k$ and S is the surface of the box $0\ge x, y, z \ge 2$. Calculate the integral. You may use one of the integral theorems if you wish."
(That's supposed to be the surface integral of a closed surface at the beginning, but I couldn't work out how to format that)
If anyone could help with the solution it'd be greatly appreciated!
Since: (1) $S$ is piecewise smooth closed surface, (2) the cube is connected, and (3) $F$ has continuous partials, you can apply the Divergence theorem. $$\iint_S F \cdot dS = \iiint_E \text{div}(F) \, \mathrm{d}V.$$ The divergence is straightforward to calculate: $$\text{div}(F) = \cos^2(\pi z) + 2\cos(\pi x).$$ Now it is just a matter of computing a messy triple integral. Note that $E$ in my integral in the first line is the unit cube, so we use the nice bounds on $x$,$y$, and $z$. $$\iint_S F \cdot dS = \iiint_E \text{div}(F) \, \mathrm{d}V = \int_0^2 \int_0^2 \int_0^2 \cos^2(\pi z) + 2\cos(\pi x) \, \mathrm{d}x \, \mathrm{d}y \,\mathrm{d}z = 4.$$
A good take-away from this problem is that you should try to apply the 3 classical vector analysis theorems as much as possible to simplify calculations. Computing the surface integral along each of the 6 surfaces of the cube would be quite inefficient. Be sure to check if the hypotheses are satisfied, however.