Solution (source code)

= Solution

<Gauss's law> connects <electric flux> through a closed surface to its enclosed charge:
$$
\oint_{\partial V}\mathbf E\cdot d\mathbf A=\frac{Q_{\rm enc}}{\epsilon_0},\qquad
\nabla\cdot\mathbf E=\frac{\rho}{\epsilon_0}.
$$
The differential form follows from the <divergence theorem>. The law is exact; extracting a field magnitude by simple division additionally needs <symmetry>. For <spherical symmetry>, $E_r(r)=Q(r)/(4\pi\epsilon_0r^2)$; a uniformly charged ball therefore has a field linear in $r$ inside and an inverse-square field outside. An infinite line of linear <charge density> $\Lambda$ gives $E_r=\Lambda/(2\pi\epsilon_0r)$ by a cylindrical surface. A uniformly charged infinite sheet gives $E=\sigma/(2\epsilon_0)$ on either side by a pillbox.

An electrostatic conductor has zero interior field and constant potential; excess charge occupies its surface. A pillbox gives $E_{n,\rm out}=\sigma/\epsilon_0$ when the inside is conducting. More generally, $\hat{\mathbf n}\cdot(\mathbf E_2-\mathbf E_1)=\sigma/\epsilon_0$. For <dielectric> matter, $\nabla\cdot\mathbf D=\rho_{\rm free}$ separates bound polarization charge from free charge. <Gauss's law> alone does not establish a uniform field for an arbitrary finite plate or recover a detailed nonsymmetric charge distribution from one flux measurement.