Solution (source code)

= Solution

With <charge density> $\rho$, <current density> $\mathbf J$, and <speed of light> $c=(\epsilon_0\mu_0)^{-1/2}$, the four <Maxwell equations> in <vacuum> are
$$
\boxed{\begin{aligned}
\nabla\cdot\mathbf E&=\rho/\epsilon_0,&\nabla\cdot\mathbf B&=0,\\
\nabla\times\mathbf E&=-\partial_t\mathbf B,&
\nabla\times\mathbf B&=\mu_0\mathbf J+c^{-2}\partial_t\mathbf E.
\end{aligned}}
$$
The <electric potential> and <magnetic vector potential> determine the <electric field> and <magnetic field> by
$$
\boxed{\mathbf E=-\nabla\phi-\partial_t\mathbf A,\qquad
\mathbf B=\nabla\times\mathbf A.}
$$
These definitions satisfy <Gauss's law for magnetism> and <Faraday's law> identically. The <Lorenz gauge condition> is
$$
\boxed{\nabla\cdot\mathbf A+c^{-2}\partial_t\phi=0.}
$$
Substituting into <Gauss's law> and using the <Lorenz gauge condition> gives
$$
\frac\rho{\epsilon_0}=-\nabla^2\phi-\partial_t(\nabla\cdot\mathbf A)
=-\nabla^2\phi+c^{-2}\partial_t^2\phi.
$$
For the <Ampère-Maxwell equation>, the double-<curl> identity gives
$$
\nabla(\nabla\cdot\mathbf A)-\nabla^2\mathbf A
=\mu_0\mathbf J-c^{-2}\nabla\partial_t\phi-c^{-2}\partial_t^2\mathbf A.
$$
The two <gradient> terms cancel by the <Lorenz gauge condition>. Defining the <d'Alembert operator> with the sign convention $\square=\nabla^2-c^{-2}\partial_t^2$, the remaining equations are
$$
\boxed{\square\phi=-\rho/\epsilon_0,\qquad
\square\mathbf A=-\mu_0\mathbf J.}
$$
Conversely, if the <electric potential> and <magnetic vector potential> satisfy these <wave equations> and the <Lorenz gauge condition>, the same substitutions in reverse give <Gauss's law> and the <Ampère-Maxwell equation>. The other two <Maxwell equations> follow identically from the definitions, proving equivalence within the <Lorenz gauge>.