\chapter{Differentiable curves}

Here we begin the study of curves in space and later on, surfaces. We limit ourselves to the class of differentiable curve and surfaces because of their importance in physics and because their structure is nice enough to do some interesting mathematics on.

A curve that is continuous but not differentiable is known as a \emph{topological curve}; this is a notion studied further in general and algebraic topology.

Differentiable curves and surfaces are the objects of interest in differential geometry, therefore this chapter we will take a few facts and definitions from differential geometry for granted. The reader is not expected to have any experience with differential geometry, therefore when necessar


\section{Differentiable curve}

We will define differentiable curves by means of \emph{position functions}; functions that represent one's position in a space.

\begin{definition}[Position function]
A \emph{position function} is a vector valued function $\mathbf{r}: I \to \mathbb{X}^n $ that maps a real interval $I$ to some space $X^n$, essentially representing a path in a space. The argument of a position function will be referred to as \emph{time} since the parameter often represents time.
\end{definition}

As one could imagine, position functions are crucial in physics as physicists are often concerned with how forces modify the 'position' of objects.

As intuition may suggest, this function is 'nice' when it is continuous (the position doesn't magically 'teleport') and differentiable (we can calculate how much the direction of this position is changing with respect to time). Thus we arrive at the idea of a \emph{differentiable curve}.



\begin{definition}[Real differentiable curve]
A $\mathbb{R}^n$ \emph{differentiable curve} is a real function $\gamma : I \to \mathbb{R}^n$ that is totally differentiable; essentially representing a smooth path in Euclidean space. The image of this function is also refered to as the differentiable curve.
\[\gamma : [t_0,t_1] \to \mathbb{R}^n \text{ is closed } \iff \gamma(t_0) = \gamma(t_1) \]
\end{definition}

As one may expect, this book will only be considering differentiable curves whose codomain is $\mathbb{R}^n$.

To differentiate differentiable curves, each entry of the total derivative is the derivative of its respective entry in the sense of real analysis. Our theory on the Jacobian matrix permits this as a simple corollary.

We state some results on the (total) derivative for vector valued functions.


\begin{proposition}
\[\mathbf{r},\mathbf{s} \text{ are differentiable curves in } \mathbb{R}^n\]
\[(\mathbf{r} \cdot \mathbf{s})' = \mathbf{r}'\cdot \mathbf{s} + \mathbf{r} \cdot \mathbf{s}'\]
\[\mathbf{r},\mathbf{s} \text{ are differentiable curves in } \mathbb{R}^3\]
\[(\mathbf{r} \times \mathbf{s})' = \mathbf{r}'\times \mathbf{s} + \mathbf{r} \times \mathbf{s}'\]
\end{proposition}

Closed curves when the end of the domain interval have the same mapping. Intuitively, these are differentiable curves that form a 'loop'.



\section{Line integral (scalar field)}

In scalar fields, we have previously considered multivariate integration in $\mathbb{R}^n$ by interpreting it as the 'weighting' the function gives to some area (or volume etc.) of the space, done in a manner faithful to Riemann sums. The main difference is that instead of partiioning intervals of $\mathbb{R}$, one partitions squares in $\mathbb{R}^2$, cubes in $\mathbb{R}^3$, tesseracts in $\mathbb{R}^4$ etc.


Multivariate integration is an extremely useful notion for mathematics and its applications, however multidimensional spaces allow more notions of integration to arise.

What if one wants to find the integral of a scalar field along some path in $\mathbb{R}^n$? Physicists require such modelling often.

We can compose the scalar field with our differentiable curve and integrate over the curve's domain; essentially mapping the function along the curve to a standard Riemann integral!


\[\int^{t_1}_{t_0} f(\gamma(t))dt\]

There is only one problem with this idea; the same curve 'geometrically' can be parametrized in different ways that 'speed' through the path in different ways. As a consequence, such an integral taken along different tet geometrically indistinguishable curves may give more weighting to certain sections of the curve and result in different results.
To avoid this, we integrate not with respect to $t$, but with respect to the arclength of $\gamma$, $s$, then using the reverse change rule to formulate in terms of $t$.

We will now state the definition of arclength from differential geometry.

\begin{definition}[Arclength function]
Let $\gamma : [t_0,t_1] \to \mathbb{R}^n$ be a differentiable curve. The \emph{arc length function of $\gamma$} is the function $s : [t_0,t_1] \to [0,\infty)$ that returns the length of the differentiable curve at a given time.
\[ s_{\gamma}(t) = \int^{t}_{t_0} \|\gamma'(t')\| dt' \]
\begin{definition}


A simple application of the FTC gives the following lemma.
\begin{lemma}
\[s'(t)=\| \gamma'(t)\|\]
\end{lemma}

Now we consider our cuve parametrized by its own arclength so that it has a constant speed, though as it turns out not We will also assume the following proposition without proof (if you are interested in such things, check out my book 'Differential Geometry'; I give more attention to this result in that book).

\begin{proposition}
Let $\gamma : I \to \mathbb{R}^n$ be a differentiable curve, then it has an arclength parametrization $\gamma(s)$ iff the derivative of the curve is nonvanishing. In other words, arclength parametrizations are possible for the differentiable curve iff the following holds.
$\forall t \in I [\gamma'(t) \neq \mathbf{0}]$
\end{proposition}


Now let's consider our $\gamma$ parametrized by its own arclength, and using the reverse chain rule and this lemma to write in temrs of $t$.
\[\int^{s(t_1)}_{s(t_0)} f(\gamma(s))ds\]
\[\int^{t_1}_{t_0} f(\gamma(t))s'(t)dt\]
\[\int^{t_1}_{t_0} f(\gamma(t))\|\gamma'(t)\|dt\]
This is exactly the \emph{line integral (scalar field)}!



\begin{definition}
A \emph{line integral (scalar field)} is an integral of a scalar field taken along a differentiable curve. One can think about it as curve's arc length the scaled by the scalar field's intensity along it.
Formally, it is defined by the following Riemann integral.
\[ \int_{\mathcal{C}} f(\mathbf{x})ds = \int_{t_0}^{t_1} f(\mathbf{r}(t)) \| \mathbf{r}'(t) \|dt \]
\begin{itemize}
	\item $f : \mathbb{R}^n \to \mathbb{R}$ is a scalar field
	\item $\gamma : [t_0,t_1] \to \mathbb{R}^n$ is a differentiable curve parametrization
	\item $\mathcal{C}=\gamma([t_0,t_1])$ is the differentiable curve image
\end{itemize}
\end{definition}

When representing a line integral along a closed curve, we will use the integral sign $\oint$ instead of $\int$.


Indeed we can extend the notion of a line integral to vector fields, however instead of having an integral that weighs a scalar field's intensities along the curve, this integral will be weighted not only by the magnitudes of the vectors along the curve, but also by how little the curve 'resists' the field.

The dot product is the key to developing such an integral; we want to consider the tangent of the curve $\gamma'(t)$ and take its dot product with the vector field. Specifically, the dot product is used to calculate work in physics (which is often integrated on for the case of varying vector components); this is the main motivation for our definition.


\begin{definition}[Line integral (vector field)]
A \emph{line integral (vector field)} is an integral of a vector field taken along a differentiable curve. One can think about it as curve's arc length the scaled by the curve's dot product with the vector field's vectors along it. It is the 'work' of a vector field along that curve.
Formally, it is defined by the following Riemann integral.
\[ \int_{\mathcal{C}} \mathbf{f}(\mathbf{x}) \cdot d\gamma = \int_{t_0}^{t_1} \mathbf{f}(\gamma(t)) \cdot \gamma'(t)dt \]
\begin{itemize}
	\item $\mathbf{f} : \mathbb{R}^n \to \mathbb{R}^n$ is a vector field
	\item $\gamma : [t_0,t_1] \to \mathbb{R}^n$ is a differentiable curve parametrization
	\item $\mathcal{C}=\gamma([t_0,t_1])$ is the differentiable curve image
\end{itemize}
\end{definition}

<h3 class=cyan>Conservative field </h3>
<p>Vector field such that the line integral result is <b> purely dependent on the endpoints</b> of the line </p>
<p>\(\mathbf{F} \text{ is conservative } \iff\)</p>
<ul>
	<li>\(\exists f : \nabla f = \mathbf{F}\)</li>
	<li>\(\nabla \times \mathbf{F} = \mathbf{0}\)</li>
	<li>\(\mathcal{C} \text{ is closed } \implies \int_{\mathcal{C}} \mathbf{F} \cdot d\mathbf{r}= 0\)</li>
</ul>
<h4 class=cyan>Potential function</h4>
<p>\(f \text{ is the potential function of } \mathbf{F} \iff \nabla f = \mathbf{F}\)</p>

\chapter{Differentiable surfaces}

Unfortunately differentiable surfaces in their modern form tend to be quite complex objects of study in differential geometry, and even their definition is inaccessible without resorting to notions of general and differential topology. Consequently, we defer their study for 'Differential Geometry'.

That said, we can study some particular differentiable surfaces that have representations accessible to us.

\section{Basic types of differentiable surfaces}


\begin{definition}[Parametric differentiable surface]
\[ \Sigma = \{ \mathbf{r}(u,v) \in \mathbb{R}^3 : (u,v) \in [u_0,u_1] \times [v_0 , v_1] \} \]
\end{definition}

\begin{definition}[Level set]
\[f^{-1}(p) = \{\mathbf{x} \in \mathbb{R}^n : f(\mathbf{x})=p\}\]
\end{definition}

\begin{definition}[Implicit differentiable surface]
\[ S = \{ (x,y,z) : g(x,y,z)=0 \} \]
\end{definition}

\section{Surface integral}

<h3 class=cyan>Surface normal</h3>
<p>The normal of a level set is the gradient</p>
<p>Take a level set \(g=0\), these connected points represent a path/surface where the output of \(g\) is the same, therefore there is <b>no rate of change</b> along the level set. the gradient therefore represents vectors perpendicular to the level set</p>
<h4 class=cyan>Explicit</h4>
<p>\(\mathbf{n} = \nabla (z-g) \)</p>
<h4 class=cyan>Implicit</h4>
<p>\(\mathbf{n} = \nabla g \)</p>
<h4 class=cyan>Parametric</h4>
<p>\(\mathbf{n} = \frac{d \mathbf{r}}{du} \times \frac{d \mathbf{r}}{dv} \)</p>


<h3 class=cyan>Surface element infinitesimal</h3>
<p>Vector quantity \(d\mathbf{S}\) representing an infinitesimal of surface, where it has:</p>
<ul>
	<li>Direction of surface</li>
	<li>Magnitude of the infinitesimal sector of surface</li>
</ul>
<p>\(d\mathbf{S} = \hat{n} dS\)</p>
<ul>
	<li>\(d \mathbf{S}\) is the surface element infinitesimal</li>
	<li>\(d S\) is the surface element infinitesimal's magnitude</li>
	<li>\(\hat{n}\) is the normal to the surface (the surface element infinitesimal's direction)</li>
</ul>



\begin{definition}[Surface integral]
A \emph{surface integral} is an integral over a scalar field where each point of the surface is weighted by multiplication with the scalar field's intensity at that point.
\[ \iint_{S} f(\mathbf{x}) dS =  \iint_{S} f(\mathbf{r}(u,v)) \| \frac{\partial \mathbf{r}}{\partial u} \times \frac{\partial \mathbf{r}}{\partial v} \| dudv \]
<ul>
	<li>\(f : \mathbb{R}^n \to \mathbb{R}\) is the scalar field function</li>
	<li>\(\mathbf{x} \in X\) is a parameter vector representing a position in space</li>
	<li>\(dS\) is the surface area infinitesimal's magnitude</li>
	<li>\( S \subset X\) is a differentiable surface in the space</li>
	<li>\(\mathbf{r}(u,v) : [u_0,u_1] \times [v_0,v_1] \to S \) is the position function along \(S\)</li>
</ul>
\end{definition}



\section{Flux integral}



\begin{definition}[Flux integral]
Surface integral where each point of the curve is <b>weighted by the dot product with the vector field at that point and the surface's normal at that point.
\[ \iint_{\Sigma} \mathbf{F}(\mathbf{x}) \cdot d\mathbf{S} = \iint_{S} \mathbf{F}(\mathbf{x}) \cdot \hat{n} d\Sigma \]
<ul>
	<li>\(\mathbf{F} : \mathbb{R}^n \to \mathbb{R}^n\) is the vector field function</li>
	<li>\(\mathbf{x} \in X\) is a parameter vector representing a position in space</li>
	<li>\( S \subset X\) is a differentiable surface in the space</li>
	<li>\(d\mathbf{S}\) is the surface area infinitesimal</li>
	<li>\(dS\) is the surface area infinitesimal's magnitude</li>
	<li>\( \hat{n} \) is a vector valued function normal to the surface</li>
	<li>\(\mathbf{r}(u,v) : [u_0,u_1] \times [v_0,v_1] \to S \) is the position function along \(S\)</li>
</ul>
\end{definition}


