% vim: tw=50
% 25/02/2022 10AM

\begin{proof}[of Stokes' Theorem]
    First show that Stokes $\implies$ Green.
    Consider
    \[ \bf{F} = (P(x, y), Q(x, y), 0) \]
    Take a flat surface $S$ in $z = 0$ plane. Then
    \[ \int_S \nabla \times \bf{F} \cdot \bf{\dd
    s} = \int_S \left( \pfrac{Q}{x} - \pfrac{P}{y}
    \right) \dd s \]
    and
    \[ \int_C \bf{F} \cdot \bf{\dd x} = \int_C
    P \dd x + Q \dd y \]
    This is Green's theorem in the plane. \myskip
    Now we show that Green $\implies$ Stokes. Let
    $\bf{x}(u, v)$ be the parametrised surface $S$
    and $\bf{x}(u(t), v(t))$ be the parametrise
    boundary $C = \partial S$.
    \begin{center}
        \includegraphics[width=0.6\linewidth]
        {images/df6740cc99ba11ec.png}
    \end{center}
    Let $A$ be the associated area in $(u, v)$
    plane and $\partial A$ the boundary. Now
    \begin{align*}
        \oint_C \bf{F} \cdot \bf{\dd x}
        &= \int_C \bf{F} \cdot \left(
        \pfrac{\bf{x}}{u} \dd u +
        \pfrac{\bf{x}}{v} \dd v \right) \\
        &= \int_{\partial A} F_u \dd u + F_v \dd v
    \end{align*}
    with $F_u = \bf{F} \cdot \pfrac{\bf{x}}{u}$
    and $F_v = \bf{F} \cdot \pfrac{\bf{x}}{v}$.
    \[ \implies \oint_C \bf{F} \cdot \bf{\dd x} =
    \int_A \left( \pfrac{F_v}{u} - \pfrac{F_u}{v}
    \right) \dd A \]
    by Green's Theorem. Now
    \begin{align*}
        \pfrac{F_v}{u}
        &= \pfrac{}{u} \left( \bf{F} \cdot
        \pfrac{\bf{x}}{v} \right) \\
        &= \pfrac{}{u} \left( F_i \pfrac{x^i}{v}
        \right) \\
        &= \pfrac{F_i}{x^j} \pfrac{x^j}{u}
        \pfrac{x^i}{v} + F_i \frac{\partial^2
        x^i}{\partial u \partial v}
    \end{align*}
    and
    \[ \pfrac{F_u}{v} = \pfrac{F_i}{x^j}
    \pfrac{x^j}{v} \pfrac{x^i}{u} + F_i
    \frac{\partial^2 x^i}{\partial u \partial v} \]
    \begin{align*}
        \implies \pfrac{F_v}{u} - \pfrac{F_u}{v}
        &= \pfrac{x^j}{u} \pfrac{x^i}{v} \left(
        \pfrac{F_i}{x^j} - \pfrac{F_j}{x^i}
        \right) \\
        &= (\delta_{jk}\delta_{il} -
        \delta_{jl}\delta_{ik}) \pfrac{x^k}{u}
        \pfrac{x^l}{v} \pfrac{F_i}{x^j} \\
        &= \eps_{jip} \eps_{pkl} \pfrac{x^k}{u}
        \pfrac{x^l}{v} \pfrac{F_i}{x^j} \\
        &= (\nabla \times \bf{F}) \cdot \left(
        \pfrac{\bf{x}}{u} \times \pfrac{\bf{x}}{v}
        \right) \\
        \implies \oint_C \bf{F} \cdot \bf{\dd x}
        &= \int_A (\nabla \times \bf{F}) \cdot
        \left( \pfrac{\bf{x}}{u} \times
        \pfrac{\bf{x}}{v} \right) \dd u \dd v \\
        &= \int_S (\nabla \times \bf{F}) \cdot
        \bf{\dd s}
    \end{align*}
\end{proof}

\subsubsection*{An Application: Magnetic Fields}

One of the Maxwell equations reads
\[ \nabla \times \bf{B} = \mu_0 \bf{J} \]
where $\bf{B}$ is magnetic field and $\bf{J}$ is
current density. This is known as Amp\`ere's law.
\begin{center}
    \includegraphics[width=0.6\linewidth]
    {images/2b008fe299bc11ec.png}
\end{center}
\begin{align*}
    \int_S \nabla \times \bf{B} \cdot \bf{\dd s}
    &= \int_C \bf{B} \cdot \bf{\dd x} \\
    &= \int_S \mu_0 \bf{J} \cdot \bf{\dd s} \\
    &= \mu_0 I
\end{align*}
where $I$ is total current. Parametrise $\bf{x} =
\rho(\cos\phi, \sin\phi, 0)$ ($\rho$ is radius of
$S$, $\phi \in [0, 2\pi)$).
\[ \bf{t} = \pfrac{\bf{x}}{\phi} = \rho
(-\sin\phi, \cos\phi, 0) \]
Ansatz: $\bf{B}$ parallel to $\bf{t}$ everywhere,
i.e. $\bf{B} = b(\rho)(-\sin\phi, \cos\phi, 0)$
\[ \implies \bf{B} \cdot \bf{t} = \rho b(\rho) \]
and Maxwell tells us that
\[ \oint_C \bf{B} \cdot \bf{\dd x} \int_0^{2\pi}
\dd \phi \rho b(\rho) = 2pi \rho b(\rho) = \mu_0 I \]
\[ \implies b(\rho) = \frac{\mu_0 I}{2\pi \rho} \]
\[ \implies B(\bf{x}) = \frac{\mu_0 I}{2\pi
\rho}(-\sin\phi, \cos\phi, 0) \]
\begin{center}
    \includegraphics[width=0.6\linewidth]
    {images/b130d92899bc11ec.png}
\end{center}
This is the magnetic field outside a current
carrying wire.

\newpage
\section{Vector Calculus Equations}

\subsection{Gravity and Electrostatics}

Two particles with mass $m$, $M$ and charge $q$,
$Q$, separated by a distance $r$, experience
\begin{itemize}
    \item Newton's force: $\bf{F}(r) =
        -\frac{GMm}{r^2} \hat{\bf{r}}$
    \item Coulomb force: $\bf{F}(r) =
        \frac{Qq}{4\pi \eps_0 r^2} \hat{\bf{r}}$
\end{itemize}
It's useful to think of one particle with mass
$m$, charge $q$, moving in the background of the
other. \myskip
Physically sensible if $m \ll M$, $q \ll Q$, write
the force as
\[ \bf{F}(\bf{x}) = m \bf{g}(\bf{x}) \qquad
\text{and} \qquad \bf{F}(\bf{x}) = q
\bf{E}(\bf{x}) \]
where $\bf{g}$ and $\bf{E}$ are gravitational
field and electric field respectively.
\[ \bf{g}(\bf{x}) = -\frac{GM}{r^2} \hat{\bf{r}} \]
\[ \bf{E}(\bf{x}) = \frac{Q}{4\pi \eps_0 r^2}
\hat{\bf{r}} \]
These fields obey following equations:
\[ \int_S \bf{g} \cdot \bf{\dd s} = - 4\pi GM \]
($M$ is the mass inside $S$)
\[ \int_S \bf{E} \cdot \bf{\dd s} =
\frac{Q}{\eps_0} \]
($Q$ is the charge inside $S$).
