\newsectionNoPB
\subsection{Line integrals}
\shortdef Let $I = [a, b]$ be a closed and bounded interval in $\R$. $f : I \rightarrow \R$ with $f(t) = (f_1(t), \ldots, f_n(t))$ continuous (also $f_i$ cont.).
\mrmvspace
\begin{enumerate}[noitemsep, label=(\arabic*)]
    \item Then $\displaystyle \int_{a}^{b} f(t) \dx t = \left( \int_{a}^{b} f_1(t), \ldots, \int_{a}^{b} f_n(t) \right)$
    \item \bi{Parametrized Curve} in $\R^n$ is a continuous map $\gamma: I \rightarrow \R^n$, piecewise in $C^1$, i.e. for $k \geq 1$, we have partition $a = t_0 < t_1 < \ldots < t_k = b$,
          such that if $f$ is restricted to interval $]t_{j - 1}, t_j[$, restriction is $C^1$. $\gamma$ is a \textit{path} between $\gamma(a)$ and $\gamma(b)$
    \item \bi{Line integral} $X \subseteq \R^n$ is the image of $\gamma$, which is a parametrized curve and $f : X \rightarrow \R^n$ continuous\\
          Integral $\displaystyle\int_{a}^{b} f(\gamma(t)) \cdot \gamma'(t) \dx t \in \R$
          is line integral of $f$ along $\gamma$, denoted $\displaystyle\int_{\gamma} f(s) \dx s$ or $\displaystyle\int_{\gamma} f(s) \dx \vec{s}$ or $\displaystyle\int_{\gamma} \omega$,\\
          with $\omega = f_1(x) \dx x_1 + \ldots f_n(x) \dx x_n$
\end{enumerate}

\rmvspace
We usually call $f : X \rightarrow \R^n$ (or sometimes $V$ a \bi{vector field}, which maps each point $x \in X$ to a vector in $\R^n$, displayed as originating from $x$.
Ideally, to compute a line integral, we compute the derivative of $\gamma$ separately ($\gamma(t) = s$ usually, derive component-wise),
limits of integration are start and end of section.
\hl{Be careful with hat functions} like $|x|$, we need two separate integrals for each side of the center!\\
Alternatively, see section \ref{sec:green-formula} for a faster way.
For calculating the area enclosed by the curve, see there too.
\bi{For computing}, we usually use the first integral in def \ref{all:4-1-1} (3).

\setLabelNumber{all}{4}
\compactdef{Oriented reparametrization} of $\gamma$ is parametrized curve $\sigma : [c, d] \rightarrow \R^n$ s.t $\sigma = \gamma \circ \varphi$, with $\varphi : [c, d] \rightarrow I$ cont. map,
differentiable on $]a, b[$ and for which $\varphi(a) = c$ and $\varphi(b) = d$.
Conversely, $\gamma = \sigma \circ \varphi^{-1}$

\rmvspace
\shortproposition For $f : X \rightarrow \R^n$ with $X$ containing the image of of $\gamma$ and equivalently $\sigma$,
we have $\displaystyle\int_{\gamma} f(s) \cdot \dx \vec{s} = \int_{\sigma} f(s) \cdot \dx \vec{s}$

\mrmvspace
\setLabelNumber{all}{8}
\compactdef{Conservative Vector Field} If for any $x_1, x_2 \in X$ the line integral $\displaystyle\int_{\gamma} f(s) \dx \vec{s}$ is independent of the choice of $\gamma$ in $X$

\mrmvspace
\shortremark $f$ conservative iff $\int_{\gamma} f(s) \dx \vec{s} = 0$ for a \textit{closed} ($\gamma(a) = \gamma(b)$) parametrized curve\\
%
\shorttheorem Let $X$ be open set, $f$ conservative vector field. Then $\exists\ C^1$ function $g$ s.t. $f = \nabla g$.
If any two points of $X$ can be joined by a parametrized curve, then $g$ is unique up to a constant: if $\nabla g_1 = f$, then $g - g_1$ is constant on $X$

\shortremark Two points $x, y \in X$ can be joined by parametrized curve $\gamma$ if $\gamma(a) = x$ and $\gamma(b) = y$. In that case, $X$ is called \bi{path-connected}.
It is true when $X$ is \textit{convex} (e.g. when $X$ is a disc or a product of intervals).
If $f$ is a vector field on $X$, then $g$ is called a \bi{potential} for $f$ and it is not unique, since we can add a constant to $g$ without changing the gradient.\\
\shade{gray}{Finding a potential} We want a $g$ s.t. $\nabla g = f$ for some conservative $f$, so we find an anti-derivative $g$ for which $\nabla g = f$\\
%
\stepLabelNumber{all}
\shortproposition For a vectorfield to be conservative, a \textit{necessary condition} is that $\displaystyle\frac{\partial f_i}{\partial x_j} = \frac{\partial f_j}{x_i}$
for any $1 \leq i \neq j \leq n \in \N$\\
%
\stepLabelNumber{all}
\compactdef{Start Shaped Set} $X \subseteq \R^n$ is star shaped if $\exists x_0 \in X$ s.t. $\forall x \in X$, the line segment from $x$ to $x_0$ is contained in $X$,
and we also say that $X$ is \textit{star shaped around} $x_0$\\
%
\stepLabelNumber{all}
\shorttheorem Let $X$ start shaped and open, $f$ a $C^1$ vector field fulfilling Proposition \ref{all:4-1-13}. Then $f$ is conservative.

\drmvspace
\setLabelNumber{all}{20}
\compactdef{Curl} Let $X \subseteq \R^3$ open and $f$ a $C^1$ vector field. The \bi{curl} of $f$ is the conservative vector field
$\text{curl}(f) = \begin{bmatrix}
        \partial_y f_3 - \partial_z f_2 \\
        \partial_z f_1 - \partial_x f_3 \\
        \partial_x f_2 - \partial_y f_1
    \end{bmatrix}$
\dnrmvspace

If $\text{curl}(f) = 0$, then $f$ is \bi{irrational}.
Below a chart to figure out some properties:
\begin{center}
    \begin{tikzpicture}[node distance = 0.5cm and 0.5cm, >={Classical TikZ Rightarrow[width=7pt]}]
        \node (cons) {$f$ conservative};
        \node (pot) [left=of cons] {$f = \nabla g$};
        \node (sym) [below=of cons] {$J_f$ symmetric};
        \node (curl) [right=of sym] {$\text{curl}(f) = 0$};
        \node (int) [right=of cons] {$\int_{\gamma} f(s) \dx \vec{s} = 0 \forall$ closed $\gamma$};

        \draw[arrows = <->, double distance = 1.5pt] (cons) -- (pot);
        \draw[arrows = ->, double distance = 1.5pt, transform canvas={xshift=0.25cm}] (sym) -- (cons);
        \draw[arrows = ->, double distance = 1.5pt, transform canvas={xshift=-0.25cm}] (cons) -- node [left, xshift=-0.1cm] {\scriptsize if $x$ start-shaped} (sym);
        \draw[arrows = <->, double distance = 1.5pt] (cons) -- (int);
        \draw[arrows = <->, double distance = 1.5pt] (sym) -- node [below, yshift=-0.1cm] {\scriptsize $n = 3$} (curl);
    \end{tikzpicture}
\end{center}
\dnrmvspace
