Solution (source code)

= Solution

In matter, <Gauss's law> for free <electric charge> is
$$
\boxed{\nabla\cdot\mathbf D=\rho_{\rm free},\qquad \oint_{\partial\mathcal V}\mathbf D\cdot d\mathbf S=Q_{\rm free,enclosed}.}
$$
The area normal points out of $\mathcal V$. In vacuum $\mathbf D=\epsilon_0\mathbf E$, so these become $\nabla\cdot\mathbf E=\rho/\epsilon_0$ and $\oint\mathbf E\cdot d\mathbf S=Q_{\rm enclosed}/\epsilon_0$.