Gauss's Law

The Law in Integral Form
Gauss's Law in integral form states that the electric flux, $$\Phi$$, through any closed surface is proportional to the amount of electric charge circumscribed by that surface.

Equation 1: $$\Phi = \oint_S\mathbf{E}\cdot d\mathbf{S} = \frac{q_{in}}{\varepsilon_0}$$

From above,
 * $$\Phi = EA = \frac{Q}{\varepsilon_0}$$
 * $$\varepsilon_0 E = \frac{Q}{A} = D$$

where E is the electric field vector (V/m), dS is a differential element surface normal vector (m2) belonging to the closed surface S over which the integral takes place, qin is the charge circumscribed by the surface S (C), and $$\epsilon_0$$ is the permittivity of free space (C/Vm). Note well the integral: in order to evaluate it properly, first take the dot product of the electric field and differential surface normal vectors, yielding a scalar; then integrate over the entire surface to determine the electric flux. Note also the assumption that the objects of our analysis are situated in a vacuum. If this is not the case, the permittivity of free space must be replaced with the electric permittivity of the material in question.

Derivative Form
The derivative form or the point form of the Gauss Law, can be derived by the application of the Gauss Divergence Theorem.
 * $$\oint_S\mathbf{E}\cdot d\mathbf{S} = \frac{q_{in}}{\varepsilon_0}$$
 * $$\varepsilon_0\oint_S\mathbf{E}\cdot d\mathbf{S} = q_{in}$$
 * $$\oint_S\varepsilon_0\mathbf{E}\cdot d\mathbf{S} = q_{in}$$

$$\oint_S\mathbf{D}\cdot d\mathbf{S} = q_{in}$$

From above,
 * $$DA = Q = \varepsilon_0 E$$

By the Gauss Divergence theorem, the closed surface integral may be rewritten as a volume integral.
 * $$\iiint_V \nabla\cdot \mathbf{D} dV = \iiint_V\rho dV$$

Since the integrands are equal, one concludes that: $$\nabla\cdot\mathbf{D} = \rho$$ Where $$\rho$$ is the charge density distribution inside the enclosed surface S

Derivation
As a challenging exercise in mathematics, let us now undertake to derive Gauss's Law in both integral and derivative forms from Coulomb's Law. Coulomb's Law states the following:

Equation 2:
 * $$\mathbf{F} = \frac{1}{4\pi\varepsilon_0}\frac{q_0 q_1}{r^{2}} \mathbf{\hat {r}}$$

where F is the electrical force on bodies 0 and 1 (N), $$\epsilon_0$$ is the permittivity of free space (C/Vm), q0 and q1 are the electrical charges on bodies 0 and 1 (C), r is the distance between bodies 0 and 1 (m) and $$\mathbf{\hat {r}}$$ is a radial unit vector (unitless, but indicative of the force vector's direction).

How do we convert units of volts and coulombs into newtons? Let us substitute units for the variables in Equation 2 above:

Equation 2a:
 * $$N = \frac{1}{\frac{C}{V m}}\frac{C C}{m^2} = \frac{1}{\frac{1}{V m}}\frac{C}{m^2} = V m\frac{C}{m^2} = \frac{C V}{m}$$

The units on the right cannot be simplified beyond what is shown, so we see that a newton is one coulomb-volt per meter. In other words, a one V/m electric field exerts a force of one newton on a one coulomb charge. So from this and Equation 2 we easily derive an equation for the electric field generated by a point charge q.

Equation 3
 * $$\mathbf{E} = \frac{1}{4\pi\varepsilon_0}\frac{q}{r^{2}} \mathbf{\hat {r}}$$

Okay, so clearly the electric field is radially symmetric around a point charge, and we see that at any point in space a distance r from the charge q be subjected to an electric field of magnitude E (the direction of the field E will obviously be different for each location in space). So let us construct an imaginary spherical shell of radius r centered on the charge q. This will allow us to define a quantity called the electric flux $$\Phi$$, which is a measure of the electric field strength perpendicular to a closed surface summed over that surface. Ultimately, what we are trying to accomplish is to sum up the individual contributions of each infinitesimal area to the total flux. In the case of a spherical shell and radially symmetric electric field distribution, the flux is easy to calculate, as it is simply the magnitude of the electric field multiplied by the surface area, S:

Equation 4
 * $$\Phi = \oint_S\mathbf{E}\cdot d\mathbf{S} = E S = \left(\frac{1}{4\pi\varepsilon_0}\frac{q}{r^{2}}\right) \left(4\pi r^{2}\right) = \frac{q}{\varepsilon_0}$$

Interesting! The electric flux is a constant for any spherical shell centered on the point charge q! But what about the case where a sphere surrounds, but is not centered on, the point charge q? Or what about non-spherical surfaces? Or other charge distributions, inside or outside our surface? How can we prove that a generalization of Equation 4 to all closed surfaces and charge distributions is possible?