% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Author:   Phillip Rothenbeck
% Title:    Investigating the Evolution of the COVID-19 Pandemic in Germany Using Physics-Informed Neural Networks
% File:     chap02/chap02.tex
% Part:     theoretical background
% Description:
%         summary of the content in this chapter
% Version:  26.07.2024
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Theoretical Background}
\label{chap:background}

This chapter is set to introduce the theoretical knowledge on which the work in this thesis is founded on. First we talk about domain mathematics and differential equations.
In these sections both the explanations and the approach are strongly based on the book on analysis by W. Rudin\cite{Rudin2007} and the book about ordinary differential equations
by M. Tenenbaum and H. Pollard. %\cite{Tenenbaum1985}. %TODO introduce other sections

% -------------------------------------------------------------------

\section{Domain Mathematics and Functions}
\label{sec:domain}

In order to model a mathematical problem, it is necessary to define a set of fundamental numbers or quantities upon which the subsequent calculations will be based. These sets may
represent a specific time interval or a distance, for instance. The term "domain" is used to describe these fundamental sets of numbers or quantities. For the purpose this thesis
we will restrict ourselves to domains of real numbers in $\mathbb{R}$.\\

The mapping of a value from one domain to a value from another domain enables the modelling and depiction of semantics. In order to facilitate this mapping, the use of functions is
employed. The function $f$ is defined as
\begin{equation}
  f: A\rightarrow B
\end{equation}
In other words, $f$ assigns each value $x$ of an interval $A$ to a value $y$ of $B$. $A$ is referred to as the domain and $B$ as the codomain of $f$. In our case, both $A$ and $B$
are subsets of $\mathbb{R}$. Functions are capable of representing the state of a system as a value based on an input value from their domain. One illustrative example is a function
that maps a time point to the distance covered since the last time point. In this case, time serves as the domain, while the distance is the codomain.

% -------------------------------------------------------------------

\section{Basics of Differential Equations}
\label{sec:differentialEq}

Often, the change of a system is more interesting than its current state. Functions are able to give us the latter, but only passively give information about the change of a system.
Now the problem at hand is a way of calculating the change of a function across its domain. Given a function $f$ and an interval $[a, b]\subset \mathbb{R}$,
\begin{equation}
  m = \frac{f(b) - f(a)}{a-b}
\end{equation}
is the average rate of change across $[a, b]$. While the average change of rate is helpful in many cases, the momentary rate of change is more accurate. To find this the interval is
narrowed down, to be infinitesimal small. For each $x\in[a, b]$ we calculate
\begin{equation} \label{eqn:differential}
  \frac{df}{dx} = \lim_{t\to x} \frac{f(t) - f(x)}{t-x}
\end{equation}
if it exists. $\frac{df}{dx}$ is called the derivative or differential equation, it returns the momentary rate of change of $f$ for each value $x$ of $f$'s
domain. When repeating this process on $\frac{df}{dx}$ we get $\frac{d^2f}{dx^2}$ which is the function that calculates the rate of change of the rate of change and is called the second
derivative. Iterating this $n$ times results in $\frac{d^nf}{dx^n}$, the derivative of the $n$'th order. Another way to get a differential equation is to create it from the semantics of
a problem. This way is often chosen if no basic function exists for a system.\\

For functions, it is possible to have multiple domains, meaning that function has more than one parameter. For example a function working with 2D parameters or a function that, works with
time and locations as its inputs. These functions need differential equations for each of their domains, which are called "partial differential equations" (PDE's). The ones for functions with one
single domain are called "ordinary differential equations" (ODE's). For this thesis only ODE's will be of interest.\\

If a system has several codomains, it will have a differential equation for each codomain all sharing the same domain. The collective of these equations is called a differential system.\\


For illustrating the functionality of a derivative we will look upon the specific problem. For this we

% -------------------------------------------------------------------

\section{Pandemic Models}
\label{sec:pandemicModel}
- modelation in a mathematical sense
- what do pandemic models have to do?

% -------------------------------------------------------------------

\subsection{SIR Model}
\label{sec:pandemicModel:sir}

% -------------------------------------------------------------------

\subsection{reduced SIR Model}
\label{sec:pandemicModel:rsir}

% -------------------------------------------------------------------

\section{Multilayer Perceptron}
\label{sec:mlp}

% -------------------------------------------------------------------

\section{Physics Informed Neural Networks}
\label{sec:pinn}

% -------------------------------------------------------------------

\subsection{Disease Informed Neural Networks}
\label{sec:pinn:dinn}

% -------------------------------------------------------------------
