Solution (source code)

= Solution
{c}

For any bounded <volume> $V$ with piecewise smooth closed <boundary> and outward <unit normal vector> $\mathbf n$, <Gauss's law> in integral form is
$$
\boxed{\iint_{\partial V}\mathbf E\cdot\mathbf n\,dS
=\frac{Q_V}{\epsilon_0},\qquad Q_V=\iiint_V\rho\,dV.}
$$
Thus the outward <electric flux> equals the enclosed <electric charge> divided by the <vacuum permittivity>. To prove it, apply the <divergence theorem> to the <electric field> and use its given <divergence>:
$$
\iint_{\partial V}\mathbf E\cdot\mathbf n\,dS
=\iiint_V\nabla\cdot\mathbf E\,dV
=\frac1{\epsilon_0}\iiint_V\rho\,dV.
$$
The classical proof assumes the requisite differentiability of the <electric field>. For piecewise smooth <charge densities>, one may apply the <divergence theorem> piece by piece and cancel the internal <fluxes>.