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

\begin{center}
    \includegraphics[width=0.6\linewidth]
    {images/ac177d40a85a11ed.png}
\end{center}
Magnetic field lines are the integral curves of
$\bf{B}$. Since $\nabla \cdot \bf{B} = \bf{0}$,
they are continuous.

\subsubsection*{Permanent Magnets}

A bar magnet has north and south poles and a
dipole moment. THis comes from the superposition
of aligned dipoles on the atomic scale. Atoms
contain electrons, which are spinning charged
particles, with a magnetic dipole moment.

\myskip
A classical model of a particle is a spinning
charged sphere
\begin{center}
    \includegraphics[width=0.3\linewidth]
    {images/ba203f08a85a11ed.png}
\end{center}
which is a current loop with a magnetic dipole
moment proportional to its charge and spin. As
far as we know, there are no magnetic charges
(monopoles).
\begin{center}
    \includegraphics[width=0.6\linewidth]
    {images/d7c63e2ca85a11ed.png}
\end{center}

\subsubsection*{The Earth as a Magnet}

The liquid iron outer core of the Earth is a
conducting fluid in convective motion and supports
electric currents that generate a magnetic field.
At the Earth's structure, this resembles a dipole
field.
\begin{center}
    \includegraphics[width=0.6\linewidth]
    {images/f615d2f2a85a11ed.png}
\end{center}

\subsection{Magnetic Forces}

The Lorentz force on a particle of charge $q_i$ at
position $\bf{x}_i(t)$ is
\[ q(\bf{E} + \dot{\bf{x}}_i \times \bf{B} \]
($\bf{E}$, $\bf{B}$ evaluated at $\bf{x}_i(t)$).
In the limit of continuous charge and current
densities, the Lorentz force per unit volume is
then
\[ \boxed{\rho \bf{E} + \bf{J} \times \bf{B}} \]
We can recover the discrete version by
substituting
\begin{align*}
    \rho
    &= \sum_i q_i \delta(\bf{x} - \bf{x}_i(t)) \\
    \bf{J}
    &= \sum_i q_i \dot{\bf{x}}_i(t) \delta(\bf{x}
    - \bf{x}_i(t))
\end{align*}

\subsubsection*{Force between thin wires}

Consider two or more thin wires with currents
$I_i$ along curves $C_i$. The total magnetic field
is $\bf{B} = \sum_i \bf{B}$, where
\[ \bf{B}_i(\bf{x}) = \frac{\mu_0 I}{4\pi}
\int_{C_i} \frac{\dd \bf{x}_i \times (\bf{x} -
\bf{x}_i)}{|\bf{x} - \bf{x}_i|^3} \]
is the magnetic field due to wire $i$. The current
density is $\bf{J} = \sum_i \bf{J}_i$, where
\[  \bf{J}_i(\bf{x}) = I_i \int_{C_i}
\delta(\bf{x} - \bf{x}_i) \dd \bf{x}_i \]
The total magnetic force acting on a volume $V$ is
\[ \bf{F} = \int_V \bf{J} \times \bf{B} \dd V \]
The force acting on a volume $V$ is
\[ \bf{F} = \int_V \bf{J} \times \bf{B} \dd V .\]
The force acting on wire $i$ is
\begin{align*}
    \bf{F}_i
    &= \int \bf{J}_i(\bf{x}) \times \bf{B}(\bf{X})
    \dd^3 \bf{x} \\
    &= I_i \int_{C_i} \dd \bf{x}_i \times
    \bf{B}(\bf{x}_i)
\end{align*}
Since $\bf{B} = \sum_i \bf{B}_i$, we have
\[ \bf{F}_i = \sum_j \bf{F}_{ij} ,\]
where
\[ \bf{F}_{ij} = I_i \int_{C_i} \dd \bf{x}_i
\times \bf{B}_j(\bf{x}_i) \]
is the force on wire $i$ due to wire $j$. Using
the Biot-Savat Law,
\[ \bf{F}_{ij} = \frac{\mu_0 I_i I_j}{4\pi}
\int_{C_i} \int_{C_j} \dd \bf{x}_i \times \left(
\frac{\dd \bf{x}_j \times (\bf{x}_i -
\bf{x}_j)}{|\bf{x}_i - \bf{x}_j|^3} \right) \]
This can be rewritten (see Example 2.4) in a
manifestly antisymmetric way that shows that
\[ \bf{F}_{ji} = -\bf{F}_{ij} \]
as expected from Newton's third law.

\myskip
The self-force $\bf{F}_{ii}$ vanishes, although
the thin-wire integral is singular and it is
better to treat the case of thick wires.

\subsubsection*{Long parallel wires}

Consider two infinitely long, parallel, thin wires
separated by a distance $r$. Use cylindrical
polars centred on wire 2.
\begin{center}
    \includegraphics[width=0.2\linewidth]
    {images/16efe1e0a85e11ed.png}
\end{center}
We have $\bf{B}_2 = \frac{\mu_0 I_2}{2\pi r}
\bf{e}_\phi$,
\[ \bf{F}_{12} = I_1 \int_{-\infty}^\infty \dd z
\bf{e}_z \times \bf{B}_2 \]
Total force is infinite. Force per unit length is
\[ I_1 \bf{e}_z \times \bf{B}_2 = - \frac{\mu_0
I_1 I_2}{2\pi r} \bf{e}_r \]
This is directed towards wire 2 if $I_1 I_2 > 0$.
So the force is attractive if the currents are
aligned and repulsive otherwise.

\subsubsection*{Force and torque on a magnetic dipole}

Consider a localized current distribution (current
loop) confined to a ball $\{V : |\bf{x}| < R\}$.
Place this in an external magnetic field
$\bf{B}(\bf{x})$ that varies slowly over the
length scale $R$.

\myskip
The magnetic torque (about the origin) on the
current loop is
\begin{align*}
    I
    &= \int_V \bf{x} \times (\bf{J}(\bf{x}) \times
    \bf{B}(\bf{x})) \dd^3 \bf{x} \\
    &= \int_V ((\bf{x} \cdot \bf{B}(\bf{x}))
    \bf{J}(\bf{x}) - (\bf{x} \cdot \bf{J}(\bf{x}))
    \bf{B}(\bf{x})) \dd^3 \bf{x}
\end{align*}
(here $\bf{B}$ is external field -- self-torque of
loop vanishes). Within $V$, $\bf{B}(\bf{x})$ can
be expanded sa a Taylor series
\[ B_i(\bf{x}) = B_i(\bf{0}) + x_j \partial _j
B_i(\bf{0}) + \cdots \]
Retaining only the zeroth-order term (uniform
field), we have
\[ T_i \approx B_j(\bf{0}) \in_V x_j J_i \dd^3
\bf{x} - B_i(\bf{0}) \int_V x_j J_j \dd^3 \bf{x} \]
Recall the first moments of the current
distribution:
\[ \int_V x_i J_j \dd^3 \bf{x} = \eps_{ijk} m_k \]
Thus $T_i \approx B_j(\bf{0}) \eps_{jik} m_k$. In
general,
\[ \bf{\tau} \approx \bf{m} \times \bf{B} \]
where $\bf{B}$ is evaluated at the dipole's
location, and $\bf{\tau}$ is measured about this
point. For the force, we need to go to the first
order of the Taylor expansion of $\bf{B}$:
\begin{align*}
    \bf{F}
    &= \int_V \bf{J}(\bf{x}) \times \bf{B}(\bf{x})
    \dd^3 \bf{x} \\
    F_i
    &= \int_v \eps_{ijk} J_j(\bf{x}) (B_j(\bf{0})
    + x_l \partial_l B_k(\bf{0})) \dd^3 \bf{x} \\
    &= \eps_{ijk} B_k(\bf{0}) \int_V J_j \dd^3
    \bf{x} + \eps_{ijk} \partial_l B_k(\bf{0})
    \int_V x_l J_j \dd^3 \bf{x} \\
    &= 0 + \eps_{ijk} \partial_l B_k(\bf{0})
    \eps_{ljn} m_n \\
    &= \partial_i B_k(\bf{0} m_k - \partial_k
    B_k(\bf{0}) m_i \\
    &= \partial_i(m_k B_k)(\bf{0})
\end{align*}
since $\nabla \cdot \bf{B} = 0$. In general,
$\bf{F} \approx \nabla (\bf{m} \cdot \bf{B})$. Can
also be written as $\bf{F} = -\nabla U$, where
\[ \boxed{U = -\bf{m} \cdot \bf{B}} \]
is the potential energy of a magnetic dipole in an
external field.

\myskip
As in the electric case, this is minimised when
$\bf{m}$ is aligned with $\bf{B}$.
