physics2u
Tier
⌕ Search ⌘K
physics2u.com/vault/gauss-law-differential-divergence.html
Derivation

Differential Gauss's Law via the Divergence Theorem

D-041 Home PU-102 Threads fields · symmetry Depends on Gauss's Law (Integral Form) from Coulomb, divergence-theorem
Statement

Starting from the integral form of Gauss's law, that the outward electric flux through any closed surface S equals the enclosed charge divided by ε0, and applying the divergence theorem together with the definition of charge density as the volume integral of ρ, we derive the local (differential) statement ∇·E = ρ/ε0, valid at every point of a region where E is continuously differentiable.

Why it matters

The integral law relates a surface flux to a total enclosed charge; it is global and says nothing directly about what happens at a single point. The differential form is a pointwise partial differential equation: it is the first of Maxwell's equations and is what one actually solves (with boundary conditions) for field configurations. It converts "charge inside a region sources net flux out of it" into "charge density is the local source of the divergence of E."

It also isolates the physical content of Gauss's law from the choice of surface. Because the identity holds for every volume, the integrands themselves must match, which is a far stronger constraint than any single flux evaluation and is the form that couples to the other field equations.

Assumptions
The integral Gauss's law holds for every closed surface.If it held only for special (e.g. symmetric) surfaces, the "for all volumes" argument collapses and no pointwise equation follows.
The field E is continuously differentiable (C1) throughout the region.If E has a jump or kink, ∇·E is undefined there and one must use jump/boundary conditions instead of the local PDE.
The charge is described by a piecewise-continuous volume density ρ(r).Point, line, or surface charges give delta-function densities; the equation then holds only in the distributional sense, not classically.
The region is such that the divergence theorem applies (bounded, with a piecewise-smooth boundary, integrands integrable).On pathological domains or for non-integrable fields the surface-to-volume conversion fails and the shrinking-volume limit need not exist.
Both integrands are continuous, so equality of integrals over all volumes forces equality of integrands.Without continuity two different integrands can share every volume integral, and the localisation step is not licensed.
Derivation
1
S E·dA = Qenc / ε0
Integral Gauss's law, taken as an established prior result for an arbitrary closed surface S bounding a volume V. A
2
Qenc = ∭V ρ dV
Definition of the enclosed charge as the volume integral of the charge density over the interior V of S. A
3
S E·dA = (1/ε0) ∭V ρ dV
Substitute Step 2 into Step 1, expressing both sides as integrals over the same region. A
4
S E·dA = ∭V (∇·E) dV
Divergence theorem (prior result): the outward flux of a C1 field through ∂V = S equals the volume integral of its divergence. This is the key legal move converting a surface integral to a volume integral. B
5
V (∇·E) dV = (1/ε0) ∭V ρ dV
Equate the right-hand side of Step 3 with the left-hand side of Step 4; the common flux term is eliminated. A
6
V ( ∇·E − ρ/ε0 ) dV = 0
Move both terms under one integral sign (linearity of integration). This holds for the volume V bounded by our arbitrary S — hence for every volume. B
7
∇·E − ρ/ε0 = 0   (everywhere)
Vanishing-integral / localisation lemma: if a continuous function integrates to zero over every volume, it is identically zero. (Proof: were it positive at a point r0, continuity gives a small ball on which it stays positive, whose integral is then positive — a contradiction.) C
Result
∇·E = ρ / ε0

Reading. At each point, the divergence of the electric field — the local net outflow of field lines per unit volume — equals the local charge density scaled by 1/ε0. Charge density is the source (or sink, if negative) of the field's divergence; where ρ = 0 the field is divergence-free even though it may be strong and varying.

Units check. In SI, ∇·E has units (V·m−1)/m = V·m−2. The right side: ρ is C·m−3 and ε0 is C2·N−1·m−2 = C·V−1·m−1, so ρ/ε0 = (C·m−3)/(C·V−1·m−1) = V·m−2. Both sides match.

Limiting cases
  • Charge-free region (ρ = 0): reduces to ∇·E = 0, so E is solenoidal; combined with electrostatics (∇×E = 0) the potential obeys Laplace's equation 2φ = 0.
  • Uniform density in a ball: gives constant ∇·E = ρ/ε0, reproducing the linear-in-r interior field of a uniformly charged sphere.
  • Potential form: writing E = −∇φ yields Poisson's equation 2φ = −ρ/ε0, the electrostatic workhorse.
  • Recovering the integral law: integrating over any V and applying the divergence theorem in reverse returns E·dA = Qenc0; the two forms are equivalent for C1 fields.
Breaks when
  • At idealised point/line/surface charges. The density is a Dirac delta, E diverges or jumps, and ∇·E is not a classical function. E.g. for a point charge ∇·(r/r3) = 4πδ3(r) — valid only distributionally.
  • Across material or charge-layer boundaries. A surface charge makes the normal component of E discontinuous; the local PDE is replaced by the jump condition (E2E1 = σ/ε0.
  • Inside linear dielectrics if written with E and free charge. Bound charge contributes; the clean source form uses ∇·D = ρfree instead, with D = ε0E + P.
  • Where E fails to be differentiable (edges, cusps, non-smooth field data): the divergence is undefined and the localisation lemma does not apply.
Failure modes
  • Cancelling the integrals too early: going from ∭A dV = ∭B dV straight to A = B without invoking "for all volumes" plus continuity — the step is only legal because V is arbitrary.
  • Confusing divergence with magnitude: assuming a large or fast-varying E implies large ∇·E. A uniform field has zero divergence; divergence measures net outflow, not strength.
  • Applying the local form at a point charge: writing ∇·E = 0 "everywhere except the charge" and forgetting the delta — then miscounting the enclosed charge.
  • Using free charge with the E-form in a dielectric: omitting bound (polarisation) charge and getting the wrong source term.
  • Sign/normal slips: using an inward-pointing area element in the divergence theorem, flipping the sign of the flux and hence of ρ.
  • Dimensional confusion of ε0: treating ε0 as dimensionless and mis-checking units.
Discussion

The derivation is a template for how every Maxwell equation is localised: an experimentally motivated integral law over an arbitrary domain, plus an integral theorem (divergence theorem for flux laws, Stokes' theorem for circulation laws), plus the arbitrariness of the domain, yields a pointwise field equation. The physics lives in Step 1; Steps 4–7 are the mathematics of localisation. Recognising this separation clarifies what is empirical (Coulomb/Gauss) and what is geometry (the theorems).

Physically, divergence is a per-point flux density: ∇·E(r) = limV→0 (1/V) ∮∂V E·dA. The differential Gauss law says this limiting flux-per-volume is set entirely by the local charge density — the field's tendency to "spread out" is created by charge sitting exactly there, with no action at a distance in this equation. Distant charges shape E itself, but not its divergence.

The result is the seed of electrostatic boundary-value theory: combined with E = −∇φ it gives Poisson's equation, whose uniqueness theorem underlies image charges, capacitance, and numerical field solvers. It also fixes the meaning of ε0 as the constant of proportionality between charge density and field divergence, the same constant that sets the speed of light via c = 1/√(μ0ε0).

At sharper rigour, the "for all volumes ⇒ equal integrands" step is exactly the fundamental lemma of the calculus of variations, and it requires continuity of the integrand. When ρ includes idealised singular sources, the clean statement is that ∇·E = ρ/ε0 holds as an equality of distributions (Schwartz distributions), with ∇·(/r2) = 4πδ3(r) as the canonical example — which is also why the surface integral over any shell enclosing the origin gives the same regardless of radius.

Common misconceptions. (i) "Zero divergence means zero field" — false; it means zero net local source. (ii) "The differential form is more fundamental than the integral form" — they are mathematically equivalent for smooth fields; the integral form is actually more general because it survives at surfaces and singularities. (iii) "ρ here is total charge" — it is a density (per unit volume) at the point, not a total.

Worked examples
1
Uniformly charged sphere, interior field from the local law. Given ρ = 2.0×10−6 C·m−3 constant for r ≤ R.
By spherical symmetry E = E(r), and in spherical coordinates ∇·E = (1/r2) d(r2E)/dr. Set this equal to ρ/ε0. B
2
(1/r2) d(r2E)/dr = ρ/ε0 ⇒ d(r2E)/dr = (ρ/ε0) r2
Multiply through by r2; symbols only, no numbers yet. A
3
r2E = (ρ/3ε0) r3 + C,   regularity at r=0 ⇒ C = 0 ⇒ E = ρ r /(3ε0)
Integrate and drop the constant so E stays finite at the centre. B
4
E = (2.0×10−6 × r) / (3 × 8.854×10−12) = 7.53×104 · r  [V/m, r in m]
Insert numbers with ε0 = 8.854×10−12 F/m. At r = 0.10 m, E = 7.5×103 V/m. A
E(r) = ρ r /(3ε0) ≈ (7.53×104 V·m−2) r

Reading. The interior field grows linearly from the centre, exactly the result the integral law gives via a Gaussian sphere — here obtained purely from the pointwise equation plus symmetry and regularity.

1
Recover charge density from a given field. Given E = (a x, a y, 0) with a = 5.0×103 V·m−2 (a two-dimensional radial field).
The local law lets us read off the source: ρ = ε0 ∇·E. Compute the divergence in Cartesian coordinates. A
2
∇·E = ∂(a x)/∂x + ∂(a y)/∂y + ∂(0)/∂z = a + a + 0 = 2a
Sum the partial derivatives of each component; symbolic result 2a. A
3
ρ = ε0(2a) = 2 × 8.854×10−12 × 5.0×103
Multiply by ε0; now substitute numbers. A
4
ρ = 8.85×10−8 C·m−3
Evaluate. Uniform, positive — a constant background density fills the region. A
ρ = 2 a ε0 ≈ 8.9×10−8 C·m−3

Reading. A field whose components rise linearly with position has constant nonzero divergence, so it is sourced by a uniform charge density — the differential law reads the source directly off the field with no integration required.

Problems
  1. Show that E = (0, 0, E0) (a uniform field) corresponds to zero charge density everywhere. Comment on why this is consistent with Gauss's law.
    Solution∇·E = x0 + ∂y0 + ∂zE0 = 0 since E0 is constant. Hence ρ = ε0∇·E = 0. Consistent: flux into any closed surface equals flux out (uniform field), so net enclosed charge is zero.
  2. A field is measured to be E = k r2 (spherical). Find ρ(r) and evaluate it at r = 0.20 m for k = 3.0×103 V·m−3.
    SolutionSpherical divergence: ∇·E = (1/r2)d(r2·k r2)/dr = (1/r2)d(k r4)/dr = (1/r2)(4k r3) = 4k r. So ρ = ε0·4k r. At r=0.20: ρ = 8.854×10−12 × 4 × 3.0×103 × 0.20 = 2.1×10−8 C·m−3.
  3. Show explicitly that integrating ∇·E = ρ/ε0 over a sphere of radius R containing uniform density ρ reproduces Qenc0.
    SolutionV∇·E dV = (1/ε0)∭Vρ dV = (1/ε0)ρ·(4/3)πR3. Since Qenc = ρ(4/3)πR3, the right side is Qenc0. By the divergence theorem the left side is E·dA, so E·dA = Qenc0 — the integral law.
  4. The field E = A(x − y) is proposed for a charge-free region. Is it admissible? Determine ρ.
    Solution∇·E = ∂x(Ax) + ∂y(−Ay) = A − A = 0. So ρ = 0 — yes, admissible in a charge-free region. (It is a valid vacuum electrostatic field; one can check ∇×E = 0 too.)
  5. Using the distributional identity ∇·(/r2) = 4πδ3(r), show that the point-charge field E = q/(4πε0r2) satisfies differential Gauss's law with ρ = qδ3(r).
    Solution∇·E = q/(4πε0) · ∇·(/r2) = q/(4πε0) · 4πδ3(r) = (q/ε03(r). This equals ρ/ε0 with ρ = qδ3(r) — a point charge q at the origin, as required. The identity is essential: naively ∇·(/r2) = 0 for r ≠ 0, but the singularity at the origin carries all the charge.