This is a “short” note deriving the Maxwell’s equations from first principles and experiments of physics; I will assume that one is familiar with div-curl-grad and all that. This is essentially an extremely condensed version of Griffith’s textbook which discusses the fundamental laws. Some level of rigor is dropped for conciseness.
1. Electrostatics
We start with the idea of electrostatics, which studies the forces exerted on charged particle(s) from static (non-moving) sources. The governing equation is Couloumb’s law
\begin{align}\label{eqn:coul}
F = \frac{1}{4\pi\varepsilon_0} \frac{q_1q_2}{r^2} \vec{r}
\end{align}
where $q_i$ are the charges, $\varepsilon_0$ is some constant (permittivity of free space) and $\vec r$ is the vector between the two charges. The sign is repulsive if $q_1, q_2$ have the same charge and vice versa.
Suppose we have a single charge $Q$. If there exists a multiple sources affecting $Q$, we can simply take the sum of them (superposition). Similarly, we can take the integral if the sources has a distribution over some $n$-dimensional volume; this leads to the concept of the electric field, defined as
\begin{align}\label{eqn:elec}
E(r) = \frac{1}{4\pi\varepsilon_0} \sum_{k=1}^n\frac{q_k}{r_k^2} \vec{r_k} \to E(r) = \frac{1}{4\pi\varepsilon_0} \int \frac{1}{r^2} \vec r \, dq
\end{align}
where $dq$ is the charge per unit volume. I am abusing a bit of notation here with $E(r) \sim \int \frac{1}{r^2} \vec r \, dq$, but the electric field has a value at any point in space and $r^2$ term is simply the distance. With \cref{eqn:elec}, one can calculate the force on $Q$ as $F = QE(r)$.
Focusing on a single charge, suppose that it’s a positive charge at the origin; the electric field $E(r)$ of this configuration radiates away from the origin. If we think about it, we see the total flux of the electric field through a spherical (in fact any shape $S$) surface surrounding the single charge only depends on the value of the charge inside. This is equivalent to saying
\begin{align}
\oint_S E \cdot da = \frac{1}{\varepsilon_0} Q_{enc}.
\end{align}
Applying divergence theorem, we have that
\begin{align*}
\oint_S E \cdot da = \int_V \nabla \cdot E \, dV = \frac{1}{\varepsilon_0}\int_V \rho dV
\end{align*}
where $Q_{enc} = \int_V \rho$ with $\rho$ the charge density inside the volume, leading to Gauss’s law:
\begin{align}
\nabla \cdot E = \frac{1}{\varepsilon_0} \rho.
\end{align}
What about the curl of the electric field $E(r)$? If we assume that the charges aren’t moving, then we actually have $\nabla \times E = 0$; the proof is by visualization from a single point charge as the fields point outwards. Note again, that this is not true once we introduce motion since magnetism arises.
2. Magnetostatics
Moving to the more difficult magnetism aspect, the key concept here is that moving charges generates a magnetic field $B$. So besides the electric field, a moving charge (which is related to the concept of current) produces a magnetic field $B$. In particular, along a wire, the magnetic field satisfies the right hand rule meaning we expect to see cross products here. Thus, for two wires parallel to each other with current running in the same direction, using the right hand rule, we see that the wires will attract.
In fact, Lorentz force law (axiom of the theory) states that the force on a charge $Q$, moving with velocity $v$ in a field of $B$ is
\begin{align*}
F_{mag} = Q(v \times B).
\end{align*}
Note that since the velocity is cross-producted with $B$, the resulting force is perpendicular to the velocity, meaning no work is done by the magnetic force since it can only change direction of the charge but not the speed. The total force, including electric force, is
\begin{align*}
F = Q(E + (v \times B)).
\end{align*}
Before moving, on we have to define a “current” which is charge per unit time passing a single point with a unit of amps or coulombs per second. A current carrying wire with charge moving at velocity $v$ and charge $\lambda$ is $I = \lambda v$. If the charge flow is over a surface/volume, we use the unit “surface/volume current density” to describe it.
The formula is at velocity $v$ and density $\sigma$ then $J = \rho v$ where $J$ is called the volume current density and $\rho$ volume charge density. Calculating the magnetic force on an volume is
\begin{align*}
F_{mag} = \int (v \times B) \rho \, dV = \int (J \times B) \, dV
\end{align*}
with appropriate changes for lower dimensional entities.
The total current crossing a surface $S$ is simply
\begin{align*}
I = \int_S J \cdot da.
\end{align*}
In particular, the charge per unit time leaving a volume is
\begin{align*}
\oint_S J \cdot da = \int_V (\nabla \cdot J) \, dV
\end{align*}
by divergence theorem. Since charge is conserved, after all, one can visualize them as little particles, the flow outside must come from inside, meaning we have the “continuity equation”
\begin{align}\label{eqn:cont}
\nabla \cdot J = – \frac{\partial \rho}{\partial t}.
\end{align}
In the study of magnetostatics, we assume that $\frac{\partial \rho}{\partial t} = 0$.
This allows us to discuss magnetostatics, where instead of stationary charges like electrostatics, we have steady currents $\frac{\partial J}{\partial t} = 0$. These types of situations don’t arise in experiments, but it’s oddly accurate even in household applications. The corresponding Couloumb’s law here is called Biot-Savart law, given by
\begin{align}\label{eqn:B}
B(r) = \frac{\mu_0}{4\pi} \int \frac{J(r’) \times \vec r}{r^2} \, dV’
\end{align}
on a volume where $\mu_0$ is called the permeability of free space with the units coming out of the $B$ is in terms of teslas $T$ (or gauss) which is Newton per amp-meter. We also abused notation here where $r^2$ is the distance and $\vec r$ is the direction.
In the most basic case of magnetostatics, we consider a single wire with current (comparable to a single point charge in electrostatics). The magnetic field lines are simply circles around the wire meaning the curl is non-zero. One can find from calculation is that
\begin{align*}
\oint B \, dl = \mu_0 I
\end{align*}
where we are integrating a circular path of radius $s$ around the wire; this generalizes by superposition to multiple wires carrying current. In fact, the domain doesn’t matter, as long as it goes around the wire as the magnetic field loses strength at the same rate of increase from the circumference/perimeter. Now, the current $I$ enclosed by the volume can be expressed as
\begin{align*}
I = \int J \cdot dA
\end{align*}
where $J$ is the volume current density, meaning applying Stokes theorem gives us
\begin{align*}
\nabla \times B = \mu_0 J
\end{align*}
The above is a nice thought experiment, but it doesn’t generalize lol. One of the assumptions made (which is not obvious) is that the wire is of infinite straight wires! It is better to look at the Bio-Savart law itself.
We really want to look at \cref{eqn:B}. Note that $B$ is a function of $(x,y,z)$, the current distribution depends on $(x’, y’, z’)$, while $r$ is the distance between the point and the tilde points with the integral over the tilde; a key note is the div and curl of $B$ are over the unprimed coordinates.
With some amount of work using product rules and all that, one can show that $\nabla \cdot B = 0$, and taking a curl results in
\begin{align*}
\nabla \times B = \mu_0 J(r) \rightarrow \oint B \cdot dI = \mu_0 I_{enc}
\end{align*}
which is called Ampere’s law (so our above derivation is actually correct!).
Let’s do a quick review of magnetostatics and electrostatics:
- [Electrostatics]: Gauss’s law discusses the divergence and of the electric field, and the curl of it is always zero. These are called Maxwell’s equations for electrostatics. Essentially derived from Coulomb’s law plus superposition.
- [Magnetostatics]: Ampere’s law discusses the curl of the magnetic field, while the divergence is zero. Again, these are Maxwell’s equations and derived from Biot-Savart law.
There’s more things to discuss, like the potential for magnetism, but we will skip it to move onto more interesting stuff.
3. Electrodynamics
When there’s a current, there needs to a be a force moving those charges. Apparently, for most substances, one has
\begin{align*}
J = \sigma f
\end{align*}
where $J$ is the current density, $f$ force per unit charge, and $\sigma$ is a proportionality factor related to the conductivity/resistivity of a matter. For our purposes (e.g. not chemical or gravitational or nuclear), we have
\begin{align*}
J = \sigma (E + v \times B)
\end{align*}
but a good first-order approximation, since $v$ is usually small, is $J = \sigma E$ (called Ohm’s law usually written as $V = IR$).
Another way of describing this force is called the electromotive force, or emf, of the circuit. The emf is not a force, but rather defined as
\begin{align*}
\mathcal{E} = \oint f \cdot dl
\end{align*}
which is really force per unit charge. Another interpretation is it’s the work done per unit charge by the source (such as a battery). From this again, one can easily tie in what a generator is which uses motional emfs as the principle. The action of moving a wire through a magnetic field generates an emf of $\mathcal{E} = vBh$ where $h$ is the length of the wire, $v$ is the velocity and $B$ the magnetic field; this is very much an interpretation of work. Indeed, if we let $\Phi$ be the flux of the $B$ through the loop of wire, then $\mathcal{E} = -\frac{d\Phi}{dt}$.
A key concept of electrodynamics is the fact that a changing magnetic field induces an electric field. Through experimentation, this relation can be better quantified as $\oint E dl = – \int \frac{\partial B}{\partial t} da$ which means that, by Stokes’ theorem, $\nabla \times E = – \frac{\partial B}{\partial t}$; this is called Faraday’s law. This generalizes electrostatic to be time-dependent regime. With Ampere’s law, we can talk about Maxwell’s contribution, which at the time, was
\begin{align*}
\nabla \cdot E &= \frac{1}{\varepsilon_0} \rho, \\
\nabla \cdot B &= 0, \\
\nabla \times E &= – \frac{\partial B}{\partial t}, \\
\nabla \times B &= \mu_0 J.
\end{align*}
The problem with the above formula is that it’s not consistent with simple exterior calculus rules. In particular, div of curl should be zero, but the divergence of the curl of the magnetic field is not zero. Of course, for steady current, $\nabla \cdot J = 0$, but in general no.
The problem is that $\nabla \cdot J$ isn’t zero; we can rewrite this term using \cref{eqn:cont}
\begin{align*}
\nabla \cdot J = – \frac{\partial \rho}{\partial t} = – \frac{\partial}{\partial t}(\varepsilon_0 \nabla \cdot E) = – \nabla \cdot (\varepsilon_0 \frac{\partial E}{\partial t}).
\end{align*}
It goes without saying that just adding the above term will kill the divergence term! Lab experiments couldn’t find this term since $J$ is quite large usually, but arises in so called electromagnetic waves.