# How is charge locally conserved?

I am aware of how to use both Gauss's and Ampere's Law but I am really interested in knowing and understanding how charge is conserved as a consequence of these laws, especially using these forms of the laws:

$$\vec{\nabla}\cdot\vec{\mathbf{D}}=\rho$$ $$\vec{\nabla}\times\vec{\mathbf{H}}= \vec{\mathbf{J}}+\frac{\partial\vec{\mathbf{D}}}{\partial t}$$

• Take the time derivative of the first equation and add it to the divergence of the second. Dec 13, 2021 at 19:55
• Use that the divergence of a rotation vanishes: $$\vec{0} = \vec{\nabla}\cdot(\vec{\nabla}\times\vec{\mathbf{H}})=\cdots$$ Dec 13, 2021 at 21:22
• @mikestone thanks, I used your comment and the answer provided below! Dec 14, 2021 at 6:10

You can prove it with Maxwell's Equations and some vector identities.

Conservation of charge is $$\nabla \cdot \vec{J} + \partial \rho/\partial t = 0$$

Given $$\nabla \times \vec{B} = \mu_0 \vec{J}+(1/c^2)\partial \vec{E}/\partial t$$.

Take the divergence of both sides. By a vector identity, the divergence of a curl is 0.By Gauss' Law $$\nabla \cdot \vec{E} = \rho/\epsilon_0.$$ So take the divergence of both sides:

$$0 = \mu_0 (\nabla \cdot \vec{J})+(1/\epsilon_0c^2)\partial \rho/\partial t$$

We know $$\mu_0\epsilon_0=1/c^2$$, so divide everything by $$\mu_0$$, you get the defining equation for charge conservation.

Something similar applies to $$\vec{D}$$ and $$\vec{H}$$.

• Got it, thank you! Dec 14, 2021 at 6:09