Prerequisites

Differential Form of Gauss' Law

Recall that Gauss' Law says that \begin{eqnarray*} \Int_{\rm box} \EE \cdot d\AA = \frac{1}{\epsilon_0} \, Q_{\hbox{inside}} \end{eqnarray*} But the enclosed charge is just \begin{eqnarray*} Q_{\hbox{inside}} = \Int_{\rm box} \rho \> dV \end{eqnarray*} so we have \begin{eqnarray*} \Int_{\rm box} \EE \cdot d\AA = \frac{1}{\epsilon_0} \Int_{\rm box} \rho \> dV \end{eqnarray*} Applying the Divergence theorem to the left-hand side of this equation tells us that \begin{eqnarray*} \Int_{\hbox{inside}} \!\! \grad\cdot\EE \>\> dV = \frac{1}{\epsilon_0} \Int_{\rm box} \rho \> dV \end{eqnarray*} for any closed box. This means that the integrands themselves must be equal, that is, \begin{eqnarray*} \grad\cdot\EE = \frac{\rho}{\epsilon_0} \end{eqnarray*} This is the differential form of Gauss' Law, and is one of Maxwell's Equations. It states that the divergence of the electric field at any point is just a measure of the charge density there.