% !TeX program = xelatex
% !TeX encoding = utf8
% !TeX root = FuVar.tex

%% TODO: publish to CTAN
\documentclass[twocolumn, margin=normal]{tex/hsrzf}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Packages

%% TODO: publish to CTAN
\usepackage{tex/hsrstud}

%% Language configuration
\usepackage{polyglossia}
\setdefaultlanguage{english}

%% License configuration
\usepackage[
    type={CC},
    modifier={by-nc-sa},
    version={4.0},
    lang={english},
]{doclicense}

%% Math
\usepackage{amsmath}
\usepackage{amsthm}

% Layout
\usepackage{enumitem}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Metadata

\course{Elektrotechnik}
\module{FuVar}
\semester{Spring Semseter 2021}

\authoremail{naoki.pross@ost.ch}
\author{\textsl{Naoki Pross} -- \texttt{\theauthoremail}}

\title{\texttt{\themodule} Notes}
\date{\thesemester}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Macros and settings

%% number sets
\newcommand\Nset{\mathbb{N}}
\newcommand\Zset{\mathbb{Z}}
\newcommand\Qset{\mathbb{Q}}
\newcommand\Rset{\mathbb{R}}
\newcommand\Cset{\mathbb{C}}
\newcommand\T{\mathrm{T}}

%% Theorems
\newtheoremstyle{fuvarzf} % name of the style to be used
  {\topsep}
  {\topsep}
  {}
  {0pt}
  {\bfseries}
  {.}
  { }
  { }

\theoremstyle{fuvarzf}
\newtheorem{theorem}{Theorem}
\newtheorem{definition}{Definition}
\newtheorem{lemma}{Lemma}

\setlist[description]{
  format = { \normalfont\itshape }
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Document

\begin{document}

\maketitle
\tableofcontents

\section{Fields and vector spaces}

\begin{definition}[Field]
  A field is a set \(F\) with two binary operators \(+\) and \(\cdot\) that map
  \(F\times F \to F\) and follow the \emph{field axioms} listed below. We let 
  \(a, b \in F\) and \(\star\) stands for \(\cdot\) or \(+\).
  \begin{description}
    \item[Associativity:] \((a \star b) \star c = a \star (b \star c)\)
    \item[Commutativity:] \(a \star b = b \star a\) 
    \item[Identities:] \(0 + a = a\) and \(1\cdot a = a\)
    \item[Inverses:]
        \(a + (-a) = 0\) and 
        \(b \cdot b^{-1} = 1\) iff \(b \neq 0\)
    \item[Distributivity:] \(a \cdot (b + c) = a\cdot b + a \cdot c\)
  \end{description}
\end{definition}

\begin{theorem}
  \(\Rset\) is a field.
\end{theorem}

\begin{definition}[Vector space]
  A vector space \(U\) over a field \(F\) is a set of objects called
  \emph{vectors} equipped with two operations: \emph{addition} 
  \(+: U \times U \to U\) and \emph{scalar multiplication} 
  \(\cdot: F\times U \to U\), that respect the following axioms.
  Let \(\vec{u}, \vec{v}, \vec{w} \in U\) and \(a, b \in F\).
  \begin{description}
    \item[Additive associativity:] \((\vec{u} + \vec{v}) + \vec{w} 
      = \vec{u} + (\vec{v} + \vec{w})\)
    \item[Additive commutativity:] \(\vec{u} + \vec{v} = \vec{v} + \vec{u}\)
    \item[Identities:] There is an element 
      \(\vec{0} \in U : \vec{u} + \vec{0} = \vec{u}\) 
      and \(1 \in F : 1 \cdot \vec{u} = \vec{u}\)
    \item[Additive inverse:] \(\vec{u} + (\vec{-u}) = 0\)
    \item[Compatibility of multiplication] 
      \(a\cdot (b \cdot \vec{u}) = (a\cdot b) \cdot \vec{u}\)
    \item[Distributivity:]
      \((a + b) \cdot \vec{u} = a\cdot\vec{u} + b\cdot\vec{u}\) and conversely
      \(a \cdot (\vec{u} + \vec{v}) = a\cdot\vec{u} + a\cdot\vec{v}\)
  \end{description}
  And of course elements in \(F\) follow the field axioms.
\end{definition}

\begin{theorem}
  \(\Rset^n = \Rset\times\cdots\times\Rset\) is a vector space.
\end{theorem}

\begin{definition}[Row and column vectors]
  Although there is virtually no difference between the two, we need two type
  of \(n\)-tuples that satisfy the vector space axioms. \emph{Row} vectors are
  written horizontally and \emph{column} vectors vertically.
\end{definition}

\begin{definition}[Transposition]
  Let \(\vec{u} \in \Rset^n\) be a row vector. The \emph{transpose} of
  \(\vec{u}\) denoted with \(\vec{u}^\T\) is column vector with the same
  components. Conversely if \(\vec{v}\) is a column vector then \(\vec{v}^\T\)
  is a row vector.
\end{definition}

\section{Scalar fields}

\begin{definition}[Scalar field]
  Confusingly we call a function \(f: \Rset^n \to \Rset\) a \emph{scalar
  field}, but this is unrelated to the previously defined field.
\end{definition}

\begin{definition}[Partial derivative of a scalar field]
  Let \(f: \Rset^n \to \Rset\), the \emph{partial} derivative of \(f\) with
  respect to \(x_k\), (\(0 < k \leq n\)), is defined as
  \[
    \frac{\partial f}{\partial x_k} :=
    \lim_{h \to 0} \frac{f(x_1, \dots, x_k + h, \dots, x_n) 
      - f(x_1, \dots, x_k, \dots, x_n)}{h}
    = \partial_{x_k} f(x, y)
  \]
  That is, we keep all variables of \(f\) fixed, except for \(x_k\).
\end{definition}

\begin{definition}[Tangent plane]
  For a scalar field \(f(x,y)\) we define the \emph{tangent plane} \(p(x,y)\)
  at coordinates \((x_0, y_0)\) to be:
  \[
    p(x, y) =
      f(x_0, y_0)
      + \partial_x f(x_0, y_0) (x - x_0)
      + \partial_y f(x_0, y_0) (y - y_0)
  \]
\end{definition}

The above can be used to calculate the one dimensional derivative of an implicit curve.

\begin{lemma}[Implicit derivative]
  The slope \(m\) of an implicit curve \(f(x,y)\) at the point \((x_0, y_0)\) is given by
  \[
    m = \partial_x f(x_0, y_0) / \partial_y f(x_0, y_0)
  \]
  of course only if \(\partial_y f(x_0, y_0) \neq 0\).
\end{lemma}

\begin{definition}[Total derivative]
  \[
    \dd{f}
  \]
\end{definition}


\section*{License}
\doclicenseText

\begin{center}
  \doclicenseImage
\end{center}

\end{document}
