# Inhomogeneous electromagnetic wave equation

In electromagnetism and applications, an inhomogeneous electromagnetic wave equation, or nonhomogeneous electromagnetic wave equation, is one of a set of wave equations describing the propagation of electromagnetic waves generated by nonzero source charges and currents. The source terms in the wave equations make the partial differential equations inhomogeneous, if the source terms are zero the equations reduce to the homogeneous electromagnetic wave equations, which follow from Maxwell's equations.

## Maxwell's equations

For reference, Maxwell's equations are summarized below in SI units and Gaussian units. They govern the electric field E and magnetic field B due to a source charge density ρ and current density J:
| Name | SI units | Gaussian units |
| Gauss's law | $\nabla \cdot \mathbf {E} ={\frac {\rho }{\varepsilon _{0}}}$ | $\nabla \cdot \mathbf {E} =4\pi \rho$ |
| Gauss's law for magnetism | $\nabla \cdot \mathbf {B} =0$ | $\nabla \cdot \mathbf {B} =0$ |
| Maxwell–Faraday equation (Faraday's law of induction) | $\nabla \times \mathbf {E} =-{\frac {\partial \mathbf {B} }{\partial t}}$ | $\nabla \times \mathbf {E} =-{\frac {1}{c}}{\frac {\partial \mathbf {B} }{\partial t}}$ |
| Ampère's circuital law (with Maxwell's addition) | $\nabla \times \mathbf {B} =\mu _{0}\left(\mathbf {J} +\varepsilon _{0}{\frac {\partial \mathbf {E} }{\partial t}}\right)$ | $\nabla \times \mathbf {B} ={\frac {1}{c}}\left(4\pi \mathbf {J} +{\frac {\partial \mathbf {E} }{\partial t}}\right)$ |
where ε$_0$ is the vacuum permittivity and μ$_0$ is the vacuum permeability. Throughout, the relation $\varepsilon _{0}\mu _{0}={\dfrac {1}{c^{2}}}$ is also used.

## SI units
### E and B fields

Maxwell's equations can directly give inhomogeneous wave equations for the electric field E and magnetic field B. Substituting Gauss's law for electricity and Ampère's law into the curl of Faraday's law of induction, and using the curl of the curl identity ∇ × (∇ × X) = ∇(∇ ⋅ X) − ∇$^2$X (The last term in the right side is the vector Laplacian, not Laplacian applied on scalar functions.) gives the wave equation for the electric field E: ${\dfrac {1}{c^{2}}}{\dfrac {\partial ^{2}\mathbf {E} }{\partial t^{2}}}-\nabla ^{2}\mathbf {E} =-\left({\dfrac {1}{\varepsilon _{0}}}\nabla \rho +\mu _{0}{\dfrac {\partial \mathbf {J} }{\partial t}}\right)\,.$
Similarly substituting Gauss's law for magnetism into the curl of Ampère's circuital law (with Maxwell's additional time-dependent term), and using the curl of the curl identity, gives the wave equation for the magnetic field B: ${\dfrac {1}{c^{2}}}{\dfrac {\partial ^{2}\mathbf {B} }{\partial t^{2}}}-\nabla ^{2}\mathbf {B} =\mu _{0}\nabla \times \mathbf {J} \,.$
The left hand sides of each equation correspond to wave motion (the D'Alembert operator acting on the fields), while the right hand sides are the wave sources. The equations imply that EM waves are generated if there are gradients in charge density ρ, circulations in current density J, time-varying current density, or any mixture of these.
The above equation for the electric field can be transformed to a homogeneous wave equation with a so called damping term if we study a problem where Ohm's law in differential form $\mathbf {J_{f}} =\sigma \mathbf {E}$ hold (we assume $\mathbf {J_{b}} =0$ that is we dealing with homogeneous conductors that have relative permeability and permittivity around 1), and by substituting ${\dfrac {1}{\varepsilon _{0}}}\nabla \rho =\nabla (\nabla \cdot \mathbf {E} )$ from the differential form of Gauss law and $\mathbf {J=J_{b}+J_{f}} =\sigma \mathbf {E}$
The final homogeneous equation with only the unknown electric field and its partial derivatives is ${\dfrac {1}{c^{2}}}{\dfrac {\partial ^{2}\mathbf {E} }{\partial t^{2}}}-\nabla ^{2}\mathbf {E} +\nabla (\nabla \cdot \mathbf {E} )+\sigma \mu _{0}{\dfrac {\partial \mathbf {E} }{\partial t}}=0$ The solutions for the above homogeneous equation for the electric field are infinitely many and we must specify boundary conditions for the electric field in order to find specific solutions
These forms of the wave equations are not often used in practice, as the source terms are inconveniently complicated. A simpler formulation more commonly encountered in the literature and used in theory use the electromagnetic potential formulation, presented next.

### A and φ potential fields

Introducing the electric potential φ (a scalar potential) and the magnetic potential A (a vector potential) defined from the E and B fields by: $\mathbf {E} =-\nabla \varphi -{\frac {\partial \mathbf {A} }{\partial t}}\,,\quad \mathbf {B} =\nabla \times \mathbf {A} \,.$
The four Maxwell's equations in a vacuum with charge ρ and current J sources reduce to two equations, Gauss's law for electricity is: $\nabla ^{2}\varphi +{\frac {\partial }{\partial t}}\left(\nabla \cdot \mathbf {A} \right)=-{\frac {1}{\varepsilon _{0}}}\rho \,,$ where $\nabla ^{2}$ here is the Laplacian applied on scalar functions, and the Ampère-Maxwell law is: $\nabla ^{2}\mathbf {A} -{\frac {1}{c^{2}}}{\frac {\partial ^{2}\mathbf {A} }{\partial t^{2}}}-\nabla \left({\frac {1}{c^{2}}}{\frac {\partial \varphi }{\partial t}}+\nabla \cdot \mathbf {A} \right)=-\mu _{0}\mathbf {J} \,$ where $\nabla ^{2}$ here is the vector Laplacian applied on vector fields. The source terms are now much simpler, but the wave terms are less obvious. Since the potentials are not unique, but have gauge freedom, these equations can be simplified by gauge fixing. A common choice is the Lorenz gauge condition: ${\frac {1}{c^{2}}}{\frac {\partial \varphi }{\partial t}}+\nabla \cdot \mathbf {A} =0$
Then the nonhomogeneous wave equations become uncoupled and symmetric in the potentials: ${\begin{aligned}\nabla ^{2}\varphi -{\frac {1}{c^{2}}}{\frac {\partial ^{2}\varphi }{\partial t^{2}}}&=-{\frac {1}{\varepsilon _{0}}}\rho \,,\\[2.75ex]\nabla ^{2}\mathbf {A} -{\frac {1}{c^{2}}}{\frac {\partial ^{2}\mathbf {A} }{\partial t^{2}}}&=-\mu _{0}\mathbf {J} \,.\end{aligned}}$
For reference, in cgs units these equations are ${\begin{aligned}\nabla ^{2}\varphi -{\frac {1}{c^{2}}}{\frac {\partial ^{2}\varphi }{\partial t^{2}}}&=-4\pi \rho \\[2ex]\nabla ^{2}\mathbf {A} -{\frac {1}{c^{2}}}{\frac {\partial ^{2}\mathbf {A} }{\partial t^{2}}}&=-{\frac {4\pi }{c}}\mathbf {J} \end{aligned}}$ with the Lorenz gauge condition ${\frac {1}{c}}{\frac {\partial \varphi }{\partial t}}+\nabla \cdot \mathbf {A} =0\,.$

## Covariant form of the inhomogeneous wave equation

The relativistic Maxwell's equations can be written in covariant form as ${\begin{aligned}\Box A^{\mu }&\ {\stackrel {\scriptscriptstyle \mathrm {def} }{=}}\ \partial _{\beta }\partial ^{\beta }A^{\mu }\ {\stackrel {\scriptscriptstyle \mathrm {def} }{=}}\ {A^{\mu ,\beta }}_{\beta }=-\mu _{0}J^{\mu }&&{\text{SI}}\\[1.15ex]\Box A^{\mu }&\ {\stackrel {\scriptscriptstyle \mathrm {def} }{=}}\ \partial _{\beta }\partial ^{\beta }A^{\mu }\ {\stackrel {\scriptscriptstyle \mathrm {def} }{=}}\ {A^{\mu ,\beta }}_{\beta }=-{\tfrac {4\pi }{c}}J^{\mu }&&{\text{cgs}}\end{aligned}}$ where $\Box =\partial _{\beta }\partial ^{\beta }=\nabla ^{2}-{\frac {1}{c^{2}}}{\frac {\partial ^{2}}{\partial t^{2}}}$ is the d'Alembert operator, $J^{\mu }=\left(c\rho ,\mathbf {J} \right)$ is the four-current, ${\frac {\partial }{\partial x^{a}}}\ {\stackrel {\mathrm {def} }{=}}\ \partial _{a}\ {\stackrel {\mathrm {def} }{=}}\_{,a}\ {\stackrel {\mathrm {def} }{=}}\ (\partial /\partial ct,\nabla )$ is the 4-gradient, and ${\begin{aligned}A^{\mu }&=(\varphi /c,\mathbf {A} )&&{\text{SI}}\\[1ex]A^{\mu }&=(\varphi ,\mathbf {A} )&&{\text{cgs}}\end{aligned}}$ is the electromagnetic four-potential with the Lorenz gauge condition $\partial _{\mu }A^{\mu }=0\,.$

## Curved spacetime

The electromagnetic wave equation is modified in two ways in curved spacetime, the derivative is replaced with the covariant derivative and a new term that depends on the curvature appears (SI units). $-{A^{\alpha ;\beta }}_{\beta }+{R^{\alpha }}_{\beta }A^{\beta }=\mu _{0}J^{\alpha }$ where ${R^{\alpha }}_{\beta }$ is the Ricci curvature tensor. Here the semicolon indicates covariant differentiation. To obtain the equation in cgs units, replace the permeability with 4π/c.
The Lorenz gauge condition in curved spacetime is assumed: ${A^{\mu }}_{;\mu }=0\,.$

## Solutions to the inhomogeneous electromagnetic wave equation

In the case that there are no boundaries surrounding the sources, the solutions (cgs units) of the nonhomogeneous wave equations are $\varphi (\mathbf {r} ,t)=\int {\frac {\delta \left(t'+{\frac {1}{c}}{\left|\mathbf {r} -\mathbf {r} '\right|}-t\right)}{\left|\mathbf {r} -\mathbf {r} '\right|}}\rho (\mathbf {r} ',t')\,d^{3}\mathbf {r} 'dt'$ and $\mathbf {A} (\mathbf {r} ,t)=\int {\frac {\delta \left(t'+{\frac {1}{c}}{\left|\mathbf {r} -\mathbf {r} '\right|}-t\right)}{\left|\mathbf {r} -\mathbf {r} '\right|}}{\frac {\mathbf {J} (\mathbf {r} ',t')}{c}}\,d^{3}\mathbf {r} 'dt'$ where $\delta \left(t'+{\tfrac {1}{c}}{\left|\mathbf {r} -\mathbf {r} '\right|}-t\right)$ is a Dirac delta function.
These solutions are known as the retarded Lorenz gauge potentials. They represent a superposition of spherical light waves traveling outward from the sources of the waves, from the present into the future.
There are also advanced solutions (cgs units) $\varphi (\mathbf {r} ,t)=\int {\frac {\delta \left(t'-{\tfrac {1}{c}}{\left|\mathbf {r} -\mathbf {r} '\right|}-t\right)}{\left|\mathbf {r} -\mathbf {r} '\right|}}\rho (\mathbf {r} ',t')\,d^{3}\mathbf {r} 'dt'$ and $\mathbf {A} (\mathbf {r} ,t)=\int {\frac {\delta \left(t'-{\tfrac {1}{c}}{\left|\mathbf {r} -\mathbf {r} '\right|}-t\right)}{\left|\mathbf {r} -\mathbf {r} '\right|}}{\mathbf {J} (\mathbf {r} ',t') \over c}\,d^{3}\mathbf {r} 'dt'\,.$
These represent a superposition of spherical waves travelling from the future into the present.