# Exercise 1

One step of the method can be written like this:

${\displaystyle u_{n+1}=\underbrace {(u_{n}+\Delta t(-\lambda )u_{n})} _{big\,step}\cdot \underbrace {(1+\delta t(-\lambda ))^{m}} _{stable\,step}\Leftrightarrow u_{n+1}=u_{n}(1-\lambda \Delta t)(1+\delta t(-\lambda ))^{m}}$

If we set ${\displaystyle \delta t\lambda =\left({\frac {1}{2}}\right)}$, we get:

${\displaystyle u_{n+1}=u_{n}(1-\lambda \Delta t)\left(1-{\frac {1}{2}}\right)^{m}\Leftrightarrow u_{n+1}=u_{n}(1-\lambda \Delta t)\left({\frac {1}{2}}\right)^{m}}$

### Alternative 1

Therefore we obtain:

${\displaystyle {\frac {u_{n+1}}{u_{n}}}=(1-\lambda \Delta t)\left({\frac {1}{2}}\right)^{m}=:F(\lambda \Delta t)}$

The region of absolute stability is defined as

${\displaystyle \left\{\mu \in \mathbb {C} \mid \left\vert F(\mu )\right\vert <1\right\}}$

Inserting our function, we obtain the following condition:

• ${\displaystyle {\frac {\left\vert 1-\lambda \Delta t\right\vert }{2^{m}}}<1}$
• ${\displaystyle \log _{2}\left\vert 1-\lambda \Delta t\right\vert
• ${\displaystyle m>{\frac {\ln \left\vert 1-\lambda \Delta t\right\vert }{\ln 2}}}$

### Alternative 2

As we know that ${\displaystyle u(0)=1}$, we have: ${\displaystyle u_{n+1}=u_{0}\left((1-\lambda \Delta t)\left({\frac {1}{2}}\right)^{m}\right)^{n}}$

This implies:

${\displaystyle \sigma =\left[(1-\lambda \Delta t)\left({\frac {1}{2}}\right)^{m}\right]<1\qquad \leftarrow {\mbox{must not grow exponentially!}}}$

${\displaystyle \rightarrow \qquad \left({\frac {1}{2}}\right)^{m}<{\frac {1}{(1-\lambda \Delta t)}}}$

${\displaystyle \rightarrow \qquad e^{log\left({\frac {1}{2}}\right)\cdot m}<{\frac {1}{(1-\lambda \Delta t)}}}$

${\displaystyle \rightarrow \qquad log\left({\frac {1}{2}}\right)\cdot m

${\displaystyle \rightarrow \qquad m>{\frac {log\left({\frac {1}{(1-\lambda \Delta t)}}\right)}{log\left({\frac {1}{2}}\right)}}}$

In order for the proposed method to be stable, m must fulfill the above criteria

# Exercise 2

Wavenumber Analysis wurde in 2007 nicht behandelt.

 Diese Aufgabe wurde noch von niemandem gelöst und wartet noch immer auf einen Musterlöser. Hast du dieses Fach bereits besucht? Hilf mit, die Qualität dieser Seite zu verbessern, indem du eine plausible Lösung für diese Frage notierst!

# Exercise 3

The trapezoidal rule is ${\displaystyle (b-a)\cdot {\frac {f(a)+f(b)}{2}}}$
The rectangle rule is ${\displaystyle (b-a)\cdot f\left({\frac {a+b}{2}}\right)}$
Simpson's rule is ${\displaystyle {\frac {(b-a)}{6}}\cdot \left[f\left(a\right)+4f\left({\frac {a+b}{2}}\right)+f\left(b\right)\right]}$

We can combine the trapezoidal rule and the rectangle rule thus:

${\displaystyle {\frac {1\cdot {\mbox{Trapezoidal rule}}+2\cdot {\mbox{Rectangle rule}}}{3}}}$

${\displaystyle \Leftrightarrow \qquad {\frac {1\cdot (b-a)\cdot {\frac {f(a)+f(b)}{2}}+2\cdot (b-a)\cdot f\left({\frac {a+b}{2}}\right)}{3}}}$

${\displaystyle \Leftrightarrow \qquad {\frac {(b-a)}{6}}\cdot \left(f\left(a\right)+4f\left({\frac {a+b}{2}}\right)+f\left(b\right)\right)}$

This is Simpon's rule.

# Exercise 4

## 1 - Diagram

destination           | vector of boat
X                v
<----____
----____B
/
/
/   <- vector of current
V


## 2 - Motion of the boat

We want to find a set of ODEs for ${\displaystyle {\begin{pmatrix}x\\y\\\end{pmatrix}}}$ with the speed ${\displaystyle {\begin{pmatrix}{\dot {x}}\\{\dot {y}}\\\end{pmatrix}}}$
We know that there is a constant component due to the current, ${\displaystyle {\begin{pmatrix}0\\5\\\end{pmatrix}}}$, and that the rowing of the professors is a vector directed towards the central point with an amplitude of ${\displaystyle 10m/s^{-1}}$.
This means that at the point ${\displaystyle {\begin{pmatrix}x\\y\\\end{pmatrix}}}$ the rowing should be normalised (as it points to the origin) :

${\displaystyle {\frac {-{\begin{pmatrix}x\\y\\\end{pmatrix}}}{\sqrt {x^{2}+y^{2}}}}}$

and have a length of 10:

${\displaystyle {\frac {-{\begin{pmatrix}x\\y\\\end{pmatrix}}\cdot 10}{\sqrt {x^{2}+y^{2}}}}}$
This is the speed vector produced by the rowing of the professors.

If we add the constant vector due to the current, we obtain the following coupled system:
${\displaystyle {\begin{cases}x'={\frac {-10\cdot x}{\sqrt {x^{2}+y^{2}}}}\\y'={\frac {-10\cdot y}{\sqrt {x^{2}+y^{2}}}}+5\\\end{cases}}}$

## 3 - Two Euler steps

The explicit Euler method is: ${\displaystyle x_{n+1}=x_{n}+f(x_{n},t_{n})\cdot h}$ where ${\displaystyle f(x,t)={\frac {dh}{dt}}}$

Here the initial position is ${\displaystyle {\begin{pmatrix}0\\-200\end{pmatrix}}}$ and we use the time step ${\displaystyle h=10s}$

### First Euler step

• For x:

${\displaystyle x_{1}=x_{0}+{\frac {-10\cdot y_{0}}{\sqrt {x_{0}^{2}+y_{0}^{2}}}}\cdot 10}$

${\displaystyle =-200+(-10\cdot (-200)/{\sqrt {200^{2}+0^{2}}})\cdot 10}$

${\displaystyle =-200+(2000/200)\cdot 10}$

${\displaystyle \,\!=-100}$

• For y:

${\displaystyle y_{1}=y_{0}+\left({\frac {-10\cdot y_{0}}{\sqrt {x_{0}^{2}+y_{0}^{2}}}}+5\right)\cdot 10}$

${\displaystyle =0+(0+5)\cdot 10}$

${\displaystyle \,\!=50}$

The position after ten seconds is ${\displaystyle {\begin{pmatrix}-100\\50\end{pmatrix}}}$.

### Second Euler step

• For x:

${\displaystyle x_{2}=x_{1}+{\frac {-10\cdot y_{1}}{\sqrt {x_{1}^{2}+y_{1}^{2}}}}\cdot 10}$

${\displaystyle =-100+\left({\frac {-1000}{\sqrt {100^{2}+^{5}0^{2}}}}\right)\cdot 10}$

${\displaystyle =-100+\left({\frac {-1000}{\sqrt {12500}}}\right)\cdot 10}$

${\displaystyle =-100+\left({\frac {-1000}{(111.8)}}\right)\cdot 10}$

${\displaystyle =-\left(100-\left({\frac {1000}{11.18}}\right)\right)}$

Bem.: Entweder keine Taschenrechner waren erlaubt oder ich vergiss meine mitzunehmen :)

• For y:

${\displaystyle y_{2}=y_{1}+\left({\frac {-10\cdot y_{1}}{\sqrt {x_{1}^{2}+y_{1}^{2}}}}+5\right)\cdot 10}$

${\displaystyle 50+\left({\frac {-500}{111.8}}+5\right)\cdot 10}$

${\displaystyle 50+50-{\frac {500}{11.18}}}$

${\displaystyle 100-{\frac {500}{11.18}}}$

The boat is predicted to be at the point ${\displaystyle {\begin{pmatrix}-\left(100-{\frac {1000}{11.18}}\right)\\\qquad \\100-{\frac {500}{11.18}}\end{pmatrix}}}$ after 20s, and it's distance from the parking spot will be ${\displaystyle {\sqrt {{\left(100-{\frac {1000}{11.18}}\right)}^{2}+{\left(100-{\frac {500}{11.18}}\right)}^{2}}}}$

## 4 - Extrapolation

Based on the three data points (t, d) , we could use a 2d. order interpolation polynomial (such as a Lagrange polynomial) passed through all 3 points to estimate when the boat will reach the parking point.

# Exercise 5

First a little remark:

• ${\displaystyle \Phi _{i}^{j}}$ means ${\displaystyle \Phi }$ at time j and position i.

## Part 1

So first we do some taylor expansions:

• ${\displaystyle \Phi _{i}^{j+1}=\Phi _{i}^{j}+\delta t{\frac {\partial \Phi _{i}^{j}}{\partial t}}+{\frac {\delta t^{2}}{2}}{\frac {\partial ^{2}\Phi _{i}^{j}}{\partial t^{2}}}+O(\delta t^{3})}$
• ${\displaystyle \Phi _{i+1}^{j}=\Phi _{i}^{j}+\delta x{\frac {\partial \Phi _{i}^{j}}{\partial x}}+{\frac {\delta x^{2}}{2}}{\frac {\partial ^{2}\Phi _{i}^{j}}{\partial x^{2}}}+{\frac {\delta x^{3}}{6}}{\frac {\partial ^{3}\Phi _{i}^{j}}{\partial x^{3}}}+{\frac {\delta x^{4}}{24}}{\frac {\partial ^{4}\Phi _{i}^{j}}{\partial x^{4}}}+O(\delta x^{5})}$
• ${\displaystyle \Phi _{i-1}^{j}=\Phi _{i}^{j}-\delta x{\frac {\partial \Phi _{i}^{j}}{\partial x}}+{\frac {\delta x^{2}}{2}}{\frac {\partial ^{2}\Phi _{i}^{j}}{\partial x^{2}}}-{\frac {\delta x^{3}}{6}}{\frac {\partial ^{3}\Phi _{i}^{j}}{\partial x^{3}}}+{\frac {\delta x^{4}}{24}}{\frac {\partial ^{4}\Phi _{i}^{j}}{\partial x^{4}}}+O(\delta x^{5})}$

Next we replace the taylor expansions in ${\displaystyle L(\Phi _{i}^{j})}$:

${\displaystyle L(\Phi _{i}^{j})={\frac {\delta t{\frac {d\Phi _{i}^{j}}{dt}}+{\frac {\delta t^{2}}{2}}{\frac {d^{2}\Phi _{i}^{j}}{dt^{2}}}+O(\delta t^{3})}{\delta t}}-v{\frac {\delta x^{2}{\frac {d^{2}\Phi _{i}^{j}}{dx^{2}}}+{\frac {\delta x^{4}}{12}}{\frac {d^{4}\Phi _{i}^{j}}{dx^{4}}}+O(\delta x^{6})}{\delta x^{2}}}}$ ${\displaystyle ={\frac {d\Phi _{i}^{j}}{dt}}+{\frac {\delta t}{2}}{\frac {d^{2}\Phi _{i}^{j}}{dt^{2}}}+O(\delta t^{2})-v\left({\frac {d^{2}\Phi _{i}^{j}}{dx^{2}}}+{\frac {\delta x^{2}}{12}}{\frac {d^{4}\Phi _{i}^{j}}{dx^{4}}}+O(\delta x^{4})\right)}$

${\displaystyle L(\Phi _{i}^{j})-\left({\frac {d\Phi _{i}^{j}}{dt}}-v{\frac {d^{2}\Phi _{i}^{j}}{dx^{2}}}\right)={\frac {\delta t}{2}}{\frac {d^{2}\Phi _{i}^{j}}{dt^{2}}}+O(\delta t^{2})-v\left({\frac {\delta x^{2}}{12}}{\frac {d^{4}\Phi _{i}^{j}}{dx^{4}}}+O(\delta x^{4})\right)}$

## Part 2

If ${\displaystyle \delta t\to 0}$ and ${\displaystyle \delta x\to 0}$:

• ${\displaystyle {\frac {\delta t}{2}}{\frac {d^{2}\Phi _{i}^{j}}{dt^{2}}}+O(\delta t^{2})-v\left({\frac {\delta x^{2}}{12}}{\frac {d^{4}\Phi _{i}^{j}}{dx^{4}}}+O(\delta x^{3})\right)\to 0}$
• ${\displaystyle \left({\frac {d\Phi _{i}^{j}}{dt}}-v{\frac {d^{2}\Phi _{i}^{j}}{dx^{2}}}\right)=L(\Phi _{i}^{j})=0}$
• ${\displaystyle {\frac {d\Phi _{i}^{j}}{dt}}=v{\frac {d^{2}\Phi _{i}^{j}}{dx^{2}}}}$
• Our result for ${\displaystyle \Phi _{i}^{j}}$ is an exact solution for the heat equation.