Continuity Equation and Charge Conservation
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
Derivation
Result
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
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.)
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
- 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\).
Solution
Continuity 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. - 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. - 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.
Solution
Integral 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}\). - 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. - 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.
Solution
The 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.