physics2u
Tier
⌕ Search ⌘K
Derivation

Continuity Equation and Charge Conservation

D-049 Home PU-102 Threads matter · symmetry Depends on divergence-theorem
Statement

For any distribution of electric charge described by a charge density \(\rho(\mathbf{r},t)\) and current density \(\mathbf{J}(\mathbf{r},t)\), local conservation of charge is expressed by the continuity equation \(\displaystyle \nabla\cdot\mathbf{J} + \frac{\partial \rho}{\partial t} = 0\): at every point and instant, the divergence of the current density is exactly balanced by the local rate of decrease of charge density. Equivalently, the net current out of any closed surface equals the rate at which the enclosed charge falls.

Why it matters

Charge conservation is one of the most stringently tested principles in physics, and the continuity equation is its exact local statement. It says charge is never created or destroyed at a point, nor teleported: any change in the charge inside a region must be accounted for by current physically crossing its boundary.

It is also the consistency condition that forced Maxwell to add the displacement current to Ampère's law, and it is the seed of gauge invariance. The same mathematical form governs mass in fluids, probability in quantum mechanics, particle number, and energy flow, so mastering it here pays off across the whole degree.

Assumptions
Charge is a conserved additive scalar with no sources or sinks.If charge could be created or annihilated locally, a source term \(\sigma\) would appear on the right and the law would read \(\nabla\cdot\mathbf{J} + \partial_t\rho = \sigma\), so no local conservation law would exist.
The densities \(\rho\) and \(\mathbf{J}\) are well-defined, single-valued fields, differentiable in space and time.At the level of point charges these are singular (delta functions); if the fields are only piecewise smooth (sharp surfaces, point charges) the differential form holds only in the distributional sense and must be supplemented by boundary/jump conditions.
The control volume is fixed in the lab frame (Eulerian description) with a piecewise-smooth closed boundary.If the region moves or deforms, the naive \(\partial_t\) is wrong: the time derivative must become a material/convective derivative and extra flux terms from the moving boundary appear.
Space is ordinary flat \(\mathbb{R}^3\) with a fixed metric.On a curved manifold or in a relativistic/moving medium the flat divergence must be replaced by a covariant divergence, or the naive law misattributes geometric terms to charge non-conservation.
Derivation
1
\[ Q_V(t) = \int_{V} \rho(\mathbf{r},t)\,dV \]
Definition: the total charge inside a fixed region \(V\) is the volume integral of the charge density. A
2
\[ \frac{dQ_V}{dt} = -\oint_{\partial V} \mathbf{J}\cdot d\mathbf{A} \]
Empirical law of charge conservation: the only way the enclosed charge changes is by current crossing the boundary \(\partial V\). The outward area element \(d\mathbf{A}\) makes outflow positive, hence the minus sign. This is the global statement we localize. A
3
\[ \frac{d}{dt}\int_{V} \rho\,dV = \int_{V} \frac{\partial \rho}{\partial t}\,dV \]
Because \(V\) is fixed in time, the total time derivative passes through the integral and acts on the integrand as a partial derivative (Leibniz rule with time-independent limits). B
4
\[ \oint_{\partial V} \mathbf{J}\cdot d\mathbf{A} = \int_{V} \left(\nabla\cdot\mathbf{J}\right)dV \]
Divergence theorem (assumed prior result): the outward flux of \(\mathbf{J}\) through the closed surface equals the volume integral of its divergence. Requires \(\mathbf{J}\) to be \(C^1\) on \(V\). B
5
\[ \int_{V} \frac{\partial \rho}{\partial t}\,dV = -\int_{V} \left(\nabla\cdot\mathbf{J}\right)dV \]
Substitute steps 3 and 4 into step 2; both sides are now volume integrals over the same fixed region \(V\). A
6
\[ \int_{V} \left( \nabla\cdot\mathbf{J} + \frac{\partial \rho}{\partial t} \right) dV = 0 \]
Collect both terms under a single integral over \(V\). A
7
\[ \nabla\cdot\mathbf{J} + \frac{\partial \rho}{\partial t} = 0 \]
Localization: the integral vanishes for every choice of \(V\), including arbitrarily small ones. A continuous integrand whose integral is zero over all regions must be identically zero pointwise (fundamental lemma): if it were positive at some point it would be positive in a neighbourhood, giving a nonzero integral there — a contradiction. C
Result
\[ \boxed{\; \nabla\cdot\mathbf{J} + \frac{\partial \rho}{\partial t} = 0 \;}\]

Reading. At each point, the divergence of the current density (the net outflow of charge per unit volume) is exactly balanced by the local rate of decrease of charge density. Where charge is piling up (\(\partial_t\rho>0\)) the current lines must be converging (\(\nabla\cdot\mathbf{J}<0\)); charge never simply appears — every local increase is fed by current arriving from neighbouring points.

Units check. In SI, \([\mathbf{J}] = \mathrm{A\,m^{-2}} = \mathrm{C\,s^{-1}\,m^{-2}}\), and the spatial derivative in \(\nabla\cdot\mathbf{J}\) adds \(\mathrm{m^{-1}}\), giving \(\mathrm{C\,s^{-1}\,m^{-3}}\). Also \([\rho]=\mathrm{C\,m^{-3}}\), so \([\partial_t\rho]=\mathrm{C\,m^{-3}\,s^{-1}}\). Both terms are \(\mathrm{C\,m^{-3}\,s^{-1}}\) (charge per volume per time), so the equation is dimensionally homogeneous.

Limiting cases
  • Steady state (\(\partial_t\rho = 0\)): reduces to \(\nabla\cdot\mathbf{J} = 0\). Current is divergence-free — the DC statement that current in equals current out at every junction (Kirchhoff's current law is its integral form).
  • Static charges (\(\mathbf{J}=0\)): gives \(\partial_t\rho = 0\); a distribution with no currents cannot change in time, so electrostatics is self-consistent.
  • One dimension: \(\partial_x J_x + \partial_t\rho = 0\), the form used for charge transport along a wire or in a diode depletion region.
  • Integrated over all space with fields vanishing at infinity: \(\tfrac{d}{dt}\int_{\text{all}}\rho\,dV = 0\) — the total charge of an isolated system is constant (global conservation).
  • Ohmic conductor with uniform \(\sigma\): substituting \(\mathbf{J}=\sigma\mathbf{E}\) and \(\nabla\cdot\mathbf{E}=\rho/\varepsilon\) gives \(\partial_t\rho = -(\sigma/\varepsilon)\rho\), so bulk charge decays exponentially with time constant \(\tau=\varepsilon/\sigma\) (charge relaxation).
Breaks when
  • The current density is not differentiable. At an idealized surface current, a point charge, or a sharp material interface, \(\mathbf{J}\) is singular or discontinuous and the divergence-theorem step fails. The local equation must be replaced by a jump condition, e.g. \(\hat{\mathbf{n}}\cdot(\mathbf{J}_2-\mathbf{J}_1) = -\partial_t\sigma_s\) on a sheet of surface charge \(\sigma_s\).
  • The description is Lagrangian or the frame non-inertial. If the control volume moves with the medium, the naive \(\partial_t\rho\) is wrong; one must use the material derivative and add the convective flux \(\rho\mathbf{v}\), giving \( \tfrac{D\rho}{Dt} + \rho\,\nabla\cdot\mathbf{v} = 0\) for the comoving form.
  • Relativistic covariance is required. The split into \(\rho\) and \(\mathbf{J}\) is frame-dependent; different observers disagree on each separately. Only the four-current \(J^\mu = (c\rho,\ \mathbf{J})\) is invariant, and the correct law is \(\partial_\mu J^\mu = 0\). The 3-vector form above holds only in a single chosen frame.
  • Charge-non-conserving physics (hypothetical) is present. If a genuine source existed — a proposed proton-decay coupling, or a non-conserved "charge" like a reacting chemical species — a term \(\sigma\neq 0\) survives on the right and the conservation law is violated by exactly that amount.
Failure modes
  • Sign error on the flux. Forgetting that the outward normal makes outflow positive, writing \(dQ/dt = +\oint\mathbf{J}\cdot d\mathbf{A}\) and deriving \(\nabla\cdot\mathbf{J} = +\partial_t\rho\), which describes charge creation.
  • Total vs partial derivative. Writing \(d\rho/dt\) instead of \(\partial\rho/\partial t\) after pulling the derivative inside the integral — legal only because \(V\) is fixed; the Eulerian field derivative is partial. A material derivative would double-count the transport already carried by \(\mathbf{J}\).
  • Confusing \(\nabla\cdot\mathbf{J}\) with \(\nabla J\) or \(|\nabla\mathbf{J}|\). The divergence is the scalar \(\partial_x J_x + \partial_y J_y + \partial_z J_z\), not a gradient of a scalar and not a magnitude.
  • Assuming \(\nabla\cdot\mathbf{J}=0\) always. True only in steady state; applying it to a charging capacitor plate leads to the false conclusion that no current flows, missing the displacement current.
  • Confusing volume charge density \(\rho\) with linear or surface density. Dimensional inconsistency then hides the error because "charge density" is used loosely.
  • Claiming the integrand vanishes without "for all \(V\)". Step 7 needs the arbitrariness of the region; a single vanishing integral does not force a vanishing integrand.
Discussion

The continuity equation is the statement that charge is locally conserved, which is far stronger than global conservation. Global conservation would permit a charge to vanish in one galaxy and reappear in another, provided the universe's total stayed fixed. The local law forbids exactly this: the only way \(\rho\) changes here is for a current to carry charge across a surface surrounding here. This locality is precisely what special relativity demands — instantaneous transport of conserved charge across space would violate causality — and it is why the covariant form \(\partial_\mu J^\mu = 0\) is so natural.

Its role in Maxwell's equations is decisive. Taking the divergence of Ampère's law \(\nabla\times\mathbf{B}=\mu_0\mathbf{J}\) gives \(0 = \nabla\cdot(\nabla\times\mathbf{B}) = \mu_0\,\nabla\cdot\mathbf{J}\), forcing \(\nabla\cdot\mathbf{J}=0\) always — false whenever charge accumulates (e.g. a charging capacitor). Maxwell repaired this by adding the displacement current \(\varepsilon_0\,\partial_t\mathbf{E}\); the corrected divergence, using Gauss's law \(\nabla\cdot\mathbf{E}=\rho/\varepsilon_0\), reproduces the continuity equation identically. Charge conservation is thus built into electrodynamics as a mathematical consistency requirement, and it is what demanded the displacement current and, with it, electromagnetic waves.

The same structure recurs everywhere a substance is transported: mass in fluids, \(\partial_t\rho_m + \nabla\cdot(\rho_m\mathbf{v})=0\); probability in the Schrödinger equation, \(\partial_t|\psi|^2 + \nabla\cdot\mathbf{j}=0\); particle number; and energy via Poynting's theorem. Learning to read a continuity equation — density term, flux term, optional source — is a transferable skill: identify the conserved density, find its current, and the equation writes itself.

At the deepest level continuity is not assumed but derived: Noether's theorem shows that the global \(U(1)\) phase symmetry of the matter Lagrangian — invariance under \(\psi\to e^{i\alpha}\psi\) — guarantees a conserved four-current with \(\partial_\mu J^\mu = 0\). Promoting that global symmetry to a local one \(\alpha=\alpha(x)\) forces the introduction of the electromagnetic gauge field \(A_\mu\). Thus the continuity equation, the existence of the photon, and gauge invariance are three faces of the same \(U(1)\) structure — a template that generalizes to the colour and weak charges of the Standard Model. The covariant form makes charge conservation manifestly identical in all inertial frames even though \(\rho\) and \(\mathbf{J}\) individually are not.

Common misconceptions. (i) Charge conservation is not the same as \(\nabla\cdot\mathbf{J}=0\) — that is only the steady-state special case. (ii) The equation does not say current is conserved; it relates the divergence of the current to the time rate of change of charge. (iii) Displacement current is not a real current of moving charges, yet it is precisely what keeps continuity intact between capacitor plates where no charge crosses the gap.

Worked examples
1
Charge relaxation in copper: a small excess charge density is placed in the bulk of a copper conductor — how fast does it disperse?
Combine continuity with Ohm's law \(\mathbf{J}=\sigma\mathbf{E}\) and Gauss's law \(\nabla\cdot\mathbf{E}=\rho/\varepsilon\). Symbols before numbers. B
\[ \frac{\partial\rho}{\partial t} = -\nabla\cdot\mathbf{J} = -\sigma\,\nabla\cdot\mathbf{E} = -\frac{\sigma}{\varepsilon}\,\rho \]
Insert Ohm's law (uniform \(\sigma\) leaves the divergence), then Gauss's law. This is a first-order linear ODE at each point. B
\[ \rho(t) = \rho_0\, e^{-t/\tau}, \qquad \tau = \frac{\varepsilon}{\sigma} \]
Standard exponential-decay solution; \(\tau\) is the charge-relaxation time. A
\[ \tau = \frac{\varepsilon_0\varepsilon_r}{\sigma} = \frac{(8.85\times10^{-12}\ \mathrm{F\,m^{-1}})(1)}{5.96\times10^{7}\ \mathrm{S\,m^{-1}}} \approx 1.5\times10^{-19}\ \mathrm{s} \]
Numbers for copper (\(\varepsilon_r\approx1\), \(\sigma=5.96\times10^{7}\ \mathrm{S\,m^{-1}}\)). A
\[ \tau_{\text{Cu}} \approx 1.5\times10^{-19}\ \mathrm{s} \]

Reading. Bulk charge in a good conductor vanishes essentially instantaneously and rushes to the surface — this is why conductor interiors are treated as charge-free in electrostatics.

Units check. \([\varepsilon/\sigma] = \dfrac{\mathrm{F\,m^{-1}}}{\mathrm{S\,m^{-1}}} = \dfrac{\mathrm{F}}{\mathrm{S}} = \dfrac{\mathrm{C\,V^{-1}}}{\mathrm{A\,V^{-1}}} = \dfrac{\mathrm{C}}{\mathrm{A}} = \mathrm{s}\), a time. (The value lies below the electron-collision time, so it is a formal classical estimate; the true response is set by the metal's high-frequency plasma dynamics — see Breaks when.)

2
Radial current from a point source: a steady current \(I=2.0\ \mathrm{A}\) flows outward isotropically from a small sphere. Find \(\mathbf{J}(r)\), verify \(\nabla\cdot\mathbf{J}=0\) for \(r>0\), and identify the source rate.
By symmetry \(\mathbf{J}=J(r)\,\hat{\mathbf{r}}\); the total current through any sphere of radius \(r\) is fixed at \(I\). A
\[ I = \oint \mathbf{J}\cdot d\mathbf{A} = J(r)\cdot 4\pi r^2 \quad\Longrightarrow\quad J(r) = \frac{I}{4\pi r^2} \]
Flux through the sphere equals \(I\); solve for the magnitude. A
\[ \nabla\cdot\mathbf{J} = \frac{1}{r^2}\frac{\partial}{\partial r}\!\left( r^2\cdot\frac{I}{4\pi r^2}\right) = \frac{1}{r^2}\frac{\partial}{\partial r}\!\left(\frac{I}{4\pi}\right) = 0 \quad (r>0) \]
Spherical divergence of an inverse-square radial field vanishes away from the origin; all the divergence sits at \(r=0\) as \(\nabla\cdot\mathbf{J}=I\,\delta^3(\mathbf{r})\). C
\[ J(0.10\ \mathrm{m}) = \frac{2.0}{4\pi(0.10)^2} = \frac{2.0}{0.1257} = 15.9\ \mathrm{A\,m^{-2}} \]
Insert numbers at \(r=0.10\ \mathrm{m}\). A
\[ J(0.10\ \mathrm{m})\approx 15.9\ \mathrm{A\,m^{-2}},\qquad \nabla\cdot\mathbf{J}=0\ (r>0) \]

Reading. Away from the source the current is divergence-free (steady state), so no charge accumulates in the surrounding space. The source sphere itself must be depleting charge at exactly \(dQ/dt = -I = -2.0\ \mathrm{C\,s^{-1}}\) to feed the outflow.

Units check. \([I/(4\pi r^2)] = \mathrm{A/m^2}\), correct for a current density; the source term \(I\,\delta^3(\mathbf{r})\) carries \(\mathrm{A\,m^{-3}} = \mathrm{C\,m^{-3}\,s^{-1}}\), matching \(-\partial_t\rho\).

Problems
  1. A one-dimensional current density is \(J_x(x) = J_0\, e^{-x/\lambda}\) with \(J_0 = 3.0\ \mathrm{A\,m^{-2}}\) and \(\lambda = 0.20\ \mathrm{m}\), in a region initially uncharged. Find \(\partial\rho/\partial t\) at \(x=0\).
    SolutionContinuity in 1D: \(\partial_t\rho = -\partial_x J_x = -J_0\left(-\tfrac{1}{\lambda}\right)e^{-x/\lambda} = \dfrac{J_0}{\lambda}e^{-x/\lambda}\). At \(x=0\): \(\partial_t\rho = 3.0/0.20 = \boxed{15\ \mathrm{C\,m^{-3}\,s^{-1}}}\). Charge accumulates at \(x=0\) because more current enters (from small \(x\)) than leaves.
  2. The charge density in a region is \(\rho(x,t) = \rho_0\cos(kx-\omega t)\) with \(\rho_0 = 1.0\times10^{-6}\ \mathrm{C\,m^{-3}}\), \(k = 5.0\ \mathrm{m^{-1}}\), \(\omega = 1.0\times10^{9}\ \mathrm{s^{-1}}\). Assuming a purely \(x\)-directed current with \(J_x\to 0\) where \(\cos(kx-\omega t)\to 0\), find \(J_x(x,t)\) and its amplitude.
    Solution\(\partial_t\rho = \rho_0\omega\sin(kx-\omega t)\). Continuity: \(\partial_x J_x = -\partial_t\rho = -\rho_0\omega\sin(kx-\omega t)\). Integrate over \(x\): \(J_x = \dfrac{\rho_0\omega}{k}\cos(kx-\omega t) + C\); the boundary condition forces \(C=0\). So \(J_x = \dfrac{\rho_0\omega}{k}\cos(kx-\omega t) = \dfrac{\omega}{k}\rho\). Amplitude \(= \dfrac{(1.0\times10^{-6})(1.0\times10^{9})}{5.0} = \boxed{2.0\times10^{2}\ \mathrm{A\,m^{-2}}}\). The pattern is a wave carrying charge at phase velocity \(v=\omega/k = 2.0\times10^{8}\ \mathrm{m\,s^{-1}}\), with \(J_x = v\rho\) — a pure convection current.
  3. A spherical region of radius \(R = 0.050\ \mathrm{m}\) carries a uniform, time-dependent charge density \(\rho(t) = \beta t\) with \(\beta = 4.0\times10^{-3}\ \mathrm{C\,m^{-3}\,s^{-1}}\). Find the total current flowing outward through the sphere's surface.
    SolutionIntegral continuity: \(\oint\mathbf{J}\cdot d\mathbf{A} = -dQ/dt\). Total charge \(Q = \rho(t)\cdot\tfrac{4}{3}\pi R^3 = \beta t\cdot\tfrac{4}{3}\pi R^3\), so \(dQ/dt = \beta\cdot\tfrac{4}{3}\pi R^3\). Outward current \(= -dQ/dt = -\beta\tfrac{4}{3}\pi R^3 = -(4.0\times10^{-3})\tfrac{4}{3}\pi(0.050)^3 = -(4.0\times10^{-3})(5.24\times10^{-4}) = \boxed{-2.1\times10^{-6}\ \mathrm{A}}\). The negative sign means the current actually flows inward (charge is increasing); magnitude \(2.1\ \mu\mathrm{A}\).
  4. Show that for a current density of the form \(\mathbf{J} = \nabla\times\mathbf{M}\) (the bound current of a magnetization \(\mathbf{M}\)), charge never accumulates, i.e. \(\partial\rho/\partial t = 0\).
    Solution\(\nabla\cdot\mathbf{J} = \nabla\cdot(\nabla\times\mathbf{M}) = 0\) identically (the divergence of any curl vanishes). By continuity, \(\partial_t\rho = -\nabla\cdot\mathbf{J} = \boxed{0}\). Bound magnetization currents circulate in closed loops and never pile charge up, consistent with a static magnet carrying no net transport of charge into any region.
  5. In an n-type semiconductor the electron current density has divergence \(\nabla\cdot\mathbf{J}_n = 8.0\times10^{4}\ \mathrm{A\,m^{-3}}\) in a region, with electron density \(n = 1.0\times10^{22}\ \mathrm{m^{-3}}\). Treating the electron charge density as \(\rho = -en\) and neglecting recombination, find \(\partial n/\partial t\), then state how a recombination term would modify the equation.
    SolutionThe electrons carry charge density \(\rho = -en\) and produce electric current \(\mathbf{J}_n\). Continuity: \(\partial_t\rho = -\nabla\cdot\mathbf{J}_n\). Substitute \(\rho = -en\) with constant \(e\): \(-e\,\partial_t n = -\nabla\cdot\mathbf{J}_n\), so \(\partial_t n = \dfrac{1}{e}\nabla\cdot\mathbf{J}_n = \dfrac{8.0\times10^{4}}{1.602\times10^{-19}} = \boxed{5.0\times10^{23}\ \mathrm{m^{-3}\,s^{-1}}}\). A positive divergence of the electric current means net positive charge flows out, i.e. electrons flow in, so \(n\) rises. With recombination and generation the full drift-diffusion form is \(\partial_t n = \tfrac{1}{e}\nabla\cdot\mathbf{J}_n + (G-R)\), where \(G-R\) is the net pair-creation rate; the hole equation carries the opposite-sign source so total charge is still exactly conserved.