% vim: tw=50
% 31/01/2022 10AM

\ul{Question}: Given $\bf{F}$, how do we know if
its conservative? \myskip
\ul{Answer}: There is a check. If $F_i =
\pfrac{\phi}{x^i}$ then
\[ \pfrac{F_i}{x^i} = \frac{\partial^2
\phi}{\partial x^i \partial x^j} =
\pfrac{F_j}{x^i} \qquad \forall\,\, i, j .\]
This is a necessary condition. We will later see
that this is also a sufficient condition (if
$\bf{F}$ is everywhere well defined).

\begin{example*}
    \[ \bf{F} = (3x^2y \sin z, x^3 \sin z, x^3y
    \cos z) .\]
    Check:
    \[ \partial_1 F_2 = 3x^2 \sin z = \partial_2
    F_1 \]
    \[ \partial_1 F_3 = 3x^2y \cos z = \partial_3
    F_1 \]
    \[ \partial_2 F_3 = x^3 \cos z = \partial_3
    F_2 .\]
    Indeed $\bf{F} = \nabla \phi$ with $\phi = x^3
    y \sin z$, so $\int_C \bf{F} \cdot \dd \bf{x}$
    depends only on the end points of $C$.
\end{example*}

\subsubsection*{Exact Differentials}

Given a function $\phi(\bf{x})$, the
\emph{differential} is
\[ \dd \phi = \pfrac{\phi}{x^i} \dd x^i = \nabla
\phi \cdot \dd \bf{x} .\]
Given a vector field $\bf{F}$, the object $\bf{F}
\cdot \dd \bf{x}$ is \emph{exact} if it can be
written as
\[ \bf{F} \cdot \dd \bf{x} = \dd \phi \]

\subsubsection*{An Application}

The trajectory $\bf{x}(t)$ of a particle is
governed by Newton's second law
\[ m \ddot{\bf{x}}(t) = \bf{F}(\bf{x}) \]
We define the kinetic energy
\[ k = \half m \dot{\bf{x}}^2 \]
This changes over time as
\begin{align*}
    k(t_2) - k(t_1)
    &= \int_{t_1}^{t_2} \dfrac{k}{t} \dd t \\
    &= \int_{t_1}^{t_2} m \dot{\bf{x}} \cdot
    \ddot{\bf{x}} \dd t \\
    &= \int_{t_1}^{t_2} \bf{F} \cdot \dot{\bf{x}}
    \dd t \\
    &= \int_C \bf{F} \cdot \dd \bf{x}
\end{align*}
This is called the \emph{work done}. For
conservative forces
\[ \bf{F} = -\nabla V \]
Then
\[ k(t_2) - k(t_1) = \int_C \bf{F} \cdot \dd
\bf{x} = -V(t_2) + V(t_1) \]
\[ \implies \bf{F}(t) = k(t) + V(t) =
\text{constant} .\]

\subsubsection*{A Subtlety}

Consider
\[ \bf{F} = \left( -\frac{y}{x^2 + y^2},
\frac{x}{x^2 + y^2} \right) \]
Check
\[ \partial_x F_y = \partial_y F_x = \frac{y^2 -
x^2}{x^2 + y^2} \]
and indeed $\bf{F} = \nabla \phi$ with $\phi =
\tan^{-1} (y / x)$. Now integrate $\bf{F}$ around
\[ \bf{x}(t) = (R \cos t, R\sin t) \qquad 0 \le t
< 2\pi \]
\begin{align*}
    \oint_C \bf{F} \cdot \dd \bf{x}
    &= \int_0^{2\pi} \bf{F}\ \cdot
    \dfrac{\bf{x}}{t} \dd t \\
    &= \int_0^{2\pi} \left( -\frac{\sin t}{R} (-R
    \sin t) + \frac{\cos t}{R} (R \cos t) \right)
    \dd t \\
    &= \int_0^{2\pi} \dd t \\
    &= 2\pi \\
    &\neq 0
\end{align*}
Why?! \myskip
It's because $\bf{F}$ isn't defined at the origin.
Moreover, $\phi$ is discontinuous along the
$\bf{x} = 0$ axis. \myskip
Our previous claim that $\oint_C \bf{F} \cdot \dd
\bf{x} = 0$ only holds when $\phi$ is a continuous
function, or when $\bf{F}$ is defined inside $C$
in $\RR^2$.

\newpage
\section{Surfaces (and Volumes)}

\subsection{Multiple Integrals}

\subsubsection*{Area Integrals}

Consider a region $D \subset \RR^2$. We want to
integrate a scalar field $\phi(x, y)$ over $D$, i.e.
\[ \int_D \phi \dd A \]
($\dd A = \dd x \dd y$ is the \emph{area
element}).

\begin{note*}
    It's sometimes written $\iint_D \phi \dd A$.
\end{note*}

\noindent
Basic idea:
\begin{center}
    \includegraphics[width=0.6\linewidth]
    {images/e0cc4b3282ff11ec.png}
\end{center}
\[ \int_D \phi(x) \dd A = \sum_n \phi(x_n) \delta
A \]
