= Solution
Take the <divergence> of the <Ampère-Maxwell equation> and use that the <divergence of a curl is zero>:
$$
0=\nabla\cdot(\nabla\times\mathbf B)
=\mu_0\nabla\cdot\mathbf J+\mu_0\epsilon_0\partial_t(\nabla\cdot\mathbf E)
=\mu_0(\nabla\cdot\mathbf J+\partial_t\rho).
$$
The last step uses <Gauss's law>. Thus the <charge continuity equation> is exactly
$$
\boxed{J^\mu=(c\rho,\mathbf J),\qquad \partial_\mu J^\mu=\partial_t\rho+\nabla\cdot\mathbf J=0.}
$$
For a direct justification that this <four-current> is a <four-vector>, take one locally comoving population of <electric charges>, with rest <charge density> $\rho_0$ and <four-velocity> $U^\mu=\gamma(c,\mathbf v)$. Invariance of <electric charge> and <length contraction> give $\rho=\gamma\rho_0$ and $\mathbf J=\rho\mathbf v$, hence $J^\mu=\rho_0U^\mu$. Summing populations preserves the <four-vector> rule. In particular, $c\rho'=\gamma(c\rho-\beta J_x)$ and $J'_x=\gamma(J_x-\beta c\rho)$. The <Lorentz invariance> of its <four-divergence> then explains why <charge conservation> holds in every <inertial frame>. A single zero-divergence condition alone would not determine a field's transformation law; the physical <charge density> and <current density> provide the additional content.
Back to article page