Solution (source code)

= Solution
{c}

Let $\Omega\subset\mathbb R^3$ be a bounded region with a piecewise smooth closed boundary, and let $\mathbf F$ be a continuously differentiable <vector field> on an open neighbourhood of its closure. With $\mathbf n$ the outward <unit normal vector>, the <divergence theorem> states
$$
\boxed{\iiint_\Omega\nabla\cdot\mathbf F\,dV=\iint_{\partial\Omega}\mathbf F\cdot\mathbf n\,dA.}
$$
The boundary <surface integral> is the total outward <flux>. All boundary components are included; on the boundary of a cavity, the outward <unit normal vector> points into the cavity.