What is the proof for Gauss's law? What is the proof for Gauss's law? Can you give me some explanation and details with the proof?
 A: Gauss's law is the electrostatic equivalent of the divergence theorem. Charges are sources and sinks for electrostatic fields, so they are represented by the divergence of the field: $\nabla \cdot E = \frac{\rho}{\epsilon_0}$, where $\rho$ is charge density (this is the differential form of Gauss's law). You can derive this from Coulomb's law. For a charge density $\rho(\vec{r}')$, 
$$E(\vec r) = 
\frac{1}{4\pi\epsilon_0} \int_\mathbb{R} \frac{\rho(\vec r') \widehat{(\vec r - \vec r')}}{\left|\vec r - \vec r'\right|^2}dV = 
\frac{1}{4\pi\epsilon_0} \int_\mathbb{R} \frac{\rho(\vec r') (\vec r - \vec r')}{\left|\vec r - \vec r'\right|^3}dV.$$
(This converges to $E=\frac{q}{4\pi\epsilon_0 r^2}\hat r$ for a point charge.) Taking the divergence of this,
$$\nabla \cdot E = \frac{4\pi}{4\pi \epsilon_0}\int_\mathbb{R}\rho(\vec r')\delta(\vec r - \vec r')dV = \frac{\rho(\vec r')}{\epsilon_0}.$$
Then to arrive at the integral form presented in most introductory EM textbooks, the divergence theorem gives:
$$\int_{\mathcal{V}} \left(\nabla \cdot \vec F \right) dV = \oint_{\partial\mathcal{V}} \vec F\cdot \vec{dS},$$
so in the case of electrostatics $\int_\mathcal{V} \rho(\vec r)$ is simply all of the charge enclosed in $\mathcal{V}$ so,
$$\int_{\mathcal{V}} \left(\nabla \cdot \vec E \right) dV = 
\int_{\mathcal{V}} \frac{\rho(\vec r)}{\epsilon_0} dV = \frac{Q_{\text{enclosed}}}{\epsilon_0} = 
\oint_{\partial\mathcal{V}} \vec E\cdot \vec{dA}.$$
