% vim: tw=50
% 07/02/2023 09AM

\myskip
TO find the magnetic field, derive $\bf{b} =
\nabla \times \bf{A}$ from (1):
\[ \boxed{\bf{B}(\bf{x}) = \frac{\mu_0}{4\pi}
\int \frac{\bf{J}(\bf{x}') \times (\bf{x} -
\bf{x}')}{|\bf{x} - \bf{x}'|^3} \dd^3 \bf{x}'}
\tag{2} \]
This is the \emph{Biot-Savat law}, giving the
magnetic field generated by a stationary current
distribution.

\myskip
A special case is when the current is restricted
to a thin wire in the form of a curve $C$. Then
the current element $\bf{J} \dd^3 \bf{x}$ can be
replaced by $I \dd \bf{x}$ ($I$ is the current in
the wire) ($\dd \bf{x}$ is the vector line element
parallel to wire). Charge conservation means that
$I = \text{const}$ along the wire.
The result is
\[ \boxed{\bf{B}(\bf{x}) = \frac{\mu_0 I}{4\pi}
\int_C \frac{\dd \bf{x}' \times (\bf{x} -
\bf{x}')}{|\bf{x} - \bf{x}'|^3}} \tag{3} \]
The thin-wire current density can be represented
as
\[ \bf{J}(\bf{x}) = I \int_C \delta(\bf{x} -
\bf{x}') \dd \bf{x}' \]
($I = \text{const}$), which gives (3) when
substituted in (2) (exercise).

\myskip
Charge conservation takes the form
\begin{align*}
    \nabla \cdot \bf{J}(\bf{x})
    &= I \int_C \nabla \delta(\bf{x} - \bf{x}')
    \cdot \dd \bf{x}' \\
    &= -I \int_C \nabla' \delta(\bf{x} - \bf{x}')
    \cdot \dd \bf{x}' \\
    &= -I [\delta(\bf{x} - \bf{x}_2) -
    \delta(\bf{x} - \bf{x}_1)]
\end{align*}
where $C$ runs from $\bf{x}_1$ to $\bf{x}_2$. If
$C$ is closed then $\bf{x}_2 = \bf{x}_1$, and
$\nabla \cdot \bf{J} = 0$ as expected. If $C$ is
infinite (for example long straight wire) then
$\nabla \cdot \bf{J} = 0$ for any finite $\bf{x}$.

\myskip
Check that (3) gives the same result as Amp\`ere's
law for a long straight thin wire (along the $z$
axis of cylindrical polars).
\begin{center}
    \includegraphics[width=0.3\linewidth]
    {images/d1411ae4a6d011ed.png}
\end{center}
We have $\bf{x} = r\bf{e}_r$ (taking $z = 0$
WLOG) and $\bf{x}' = z' \bf{e}_z$, so
\[ \bf{x} - \bf{x}' = r\bf{e}_r - z' \bf{e}_z
\qquad \text{and} \qquad \dd \bf{x}' = \dd z'
\bf{e}_z \]
giving
\begin{align*}
    \bf{B}(\bf{x})
    &= \frac{\mu_0 I}{4\pi} \bf{e}_\phi
    \int_{-\infty}^\infty \frac{r\dd z'}{(r^2 +
    z^2)^{3/2}} \\
    &= \frac{\mu_0 I}{4\pi} \bf{e}_\phi \left[
    \frac{z'}{r(r^2 + z^2)^{1/2}}
    \right]_{-\infty}^\infty \\
    &= \frac{\mu_0 I}{2\pi r} \bf{e}_\phi
\end{align*}
as expected.

\subsection{Magnetic dipoles}

For a general current distribution
$\bf{J}(\bf{x})$ confined to a ball $\{V :
|\bf{x}| < R\}$,
\[ \bf{A}(\bf{x}) = \frac{\mu_0}{4\pi} \int_V
\frac{\bf{J}(\bf{x}')}{|\bf{x} - \bf{x}'|} \dd^3
\bf{x}' \]
The external field for $|\bf{x}| = r > R$ can be
evaluated by expanding
\[ \frac{1}{|\bf{x} - \bf{x}'|} = \frac{1}{r}
\left( 1 + \frac{\bf{x}' \cdot \bf{x}}{r^2} + O
\left( \frac{R^2}{r^2} \right) \right) ,\]
leading to a multipole expansion as before. We
need to calculate the moments of the current
distribution. Since $\bf{J} = \bf{0}$ on $\partial
V$ and $\nabla \cdot \bf{J} = 0$, the divergence
theorem implies
\begin{align*}
    0
    &= \int_{\partial V} x_i J_j \dd S_j \\
    &= \int_V \partial_j (x_i J_j) \dd^3 \bf{x} \\
    &= \int_V (\delta_{ij} + x_i \partial_j J_j)
    \dd^3 \bf{x} \\
    &= \int_V J_i \dd^3 \bf{x}
\end{align*}
so the moment vanishes. Similarly,
\begin{align*}
    0
    &= \int_{\partial V} x_i x_j J_k \dd S_k \\
    &= \int_V \partial_k(x_i x_j J_k) \dd^3 \bf{x}
    \\
    &= \int_V (\delta_{ik} x_j J_k + x_i
    \delta_{jk} J_k + x_i x_j \partial_k J_k \dd^3
    \bf{x} \\
    &= \int_V x_j J_i \dd^3 \bf{x} + \int_V x_i
    J_j \dd^3 \bf{x}
\end{align*}
so the first moment is an antisymetric matrix.

\myskip
The \emph{magnetic dipole moment}
\[ \boxed{\bf{m} = \half \int_V \bf{x} \times
BF{J} \dd^3 \bf{x}} \]
\[ m_i = \half \eps_{ijk} \int_V x_j J_k \dd^3
\bf{x} \]
is a vector related to the antisymmetric matrix by
\[ \int_V x_i J_j \dd^3 \bf{x} = \eps_{ijk} m_k \]
Returning to the multipole expansion for $\bf{A}$,
we have
\begin{align*}
    A_i(\bf{x})
    &= \frac{\mu_0}{4\pi |\bf{x}|} \left( \int_V
    J_i(\bf{x}') \dd^3 \bf{x}' +
    \frac{x_j}{|\bf{x}|^3} \int x_j' J_i(\bf{x}')
    \dd^3 \bf{x}' + \cdots \right) \\
    &= \frac{\mu_0}{4\pi |\bf{x}|} \left( 0 +
    \frac{x_j \eps_{jik} m_k}{|\bf{x}|^2} + \cdots \right)
\end{align*}
The leading approximateion is therefore
\[ \bf{A}(\bf{x}) \approx \bf{A}_{\text{dipole}}
(\bf{x}) = \frac{\mu_0}{4\pi} \frac{\bf{m} \times
\bf{x}}{|\bf{x}|^3} \]
which is the vector potential due to a (point)
dipole $\bf{m}$ at the origin. The corresponding
magnetic field is (exercise)
\[ \bf{B}_{\text{dipole}} = \nabla \times
\bf{A}_{\text{dipole}} = \frac{\mu_0}{4\pi} \left(
\frac{3(\bf{m} \cdot \bf{x}) \bf{x} - |\bf{x}|^2
\bf{m}}{|\bf{x}|^5} \right) \]
A point dipole $\bf{m}$ at the origin corresponds
to the current density and vector potential
\[ \bf{J} = \nabla \times (\bf{m} \delta(\bf{x})),
\qquad \bf{A} = \nabla \times \left( \frac{\mu_0
\bf{m}}{4\pi |\bf{x}|} \right) \]
The magnetic dipole moment of a thin wire carrying
current $I$ around a closed curve $C$ is
\[ \bf{m} = \frac{I}{2} \int_C \bf{x} \times \dd
\bf{x} \]
To evaluate this, let $\bf{a}$ be any constant
vector. Then, by Stoke's Theorem,
\begin{align*}
    \bf{a} \cdot \bf{m}
    &= \frac{I}{2} \int_C \bf{a} \cdot (\bf{x}
    \times \dd \bf{x}) \\
    &= \frac{I}{2} \int_C (\bf{a} \times \bf{x})
    \cdot \dd \bf{x} \\
    &= \frac{I}{2} \int_S (\nabla \times (\bf{x}
    \times \bf{x})) \cdot \dd \bf{S} \\
    &= I \int_S \bf{a} \cdot \dd \bf{S}
\end{align*}
where $S$ is an open surface with boundary $C$ and
we use
\begin{align*}
    \nabla \times (\bf{a} \times \bf{x})
    &= \bf{x} \cdot \nabla \bf{a} - \bf{a} \cdot
    \nabla \bf{x} + (\nabla \cdot \bf{x}) \bf{a} -
    (\nabla \cdot \bf{a})\bf{x} \\
    &= \bf{0} - \bf{a} + 3\bf{a} - \bf{0} \\
    &= 2\bf{a}
\end{align*}
Since $\bf{a}$ is arbitrary, we have
\[ \boxed{\bf{m} = I\bf{S}} \]
where $\bf{S} = \int_S \dd \bf{S}$ is the vector
area of $S$ (which depends only on $C$, not on the
choice of $S$). Simplest example: circular loop,
for example $x^2 + y^2 = a^2$, $z = 0$, for which
$\bf{m} = I\pi a^2 \bf{e}_z$. On the $z$-axis, the
dipole approximately gives
\[ B_z = \frac{\mu_0}{4\pi} \left( \frac{3m_z z^2
- z^2 m_z}{|z|^5} \right) = \frac{\mu_0
Ia^2}{2|z|^3} \]
while the exact solution (Example Sheet 2,
Question 3) is
\[ B_z = \frac{\mu_0 Ia^2}{2(z^2 + a^2)^{3/2}} \]
\begin{center}
    \includegraphics[width=0.2\linewidth]
    {images/d33a495ea6cd11ed.png}
\end{center}
