mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-29 07:47:57 +02:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
86a3a4f4c1
22 changed files with 788 additions and 55 deletions
|
@ -97,7 +97,7 @@ Nun gilt: $P A = L R = A^{(1)}$ (Kontrolle mit \href{http://www.wolframalpha.com
|
|||
\textbf{Vorüberlegung:}
|
||||
Eine Matrix $A \in \mathbb{R}^{n \times n}$ heißt positiv Definit $\dots$
|
||||
\begin{align*}
|
||||
\dots & \Leftrightarrow \forall x \in \mathbb{R}^n: x^T A x > 0\\
|
||||
\dots & \Leftrightarrow \forall x \in \mathbb{R}^n \setminus \Set{0}: x^T A x > 0\\
|
||||
& \Leftrightarrow \text{Alle Eigenwerte sind größer als 0}
|
||||
\end{align*}
|
||||
|
||||
|
@ -124,7 +124,7 @@ Falls $A$ symmetrisch ist, gilt:
|
|||
l_{11} &= \sqrt{a_{11}} = 3\\
|
||||
l_{21} &= \frac{a_{21}}{l_{11}} = \frac{4}{3}\\
|
||||
l_{31} &= \frac{a_{31}}{l_{11}} = \frac{12}{3} = 4\\
|
||||
l_{22} &= \sqrt{a_{21} - {l_{21}}^2} = \sqrt{\frac{4}{3} - \frac{16}{9}}= \sqrt{-\frac{4}{9}} \notin \mathbb{R}\\
|
||||
l_{22} &= \sqrt{a_{22} - {l_{21}}^2} = \sqrt{1 - \frac{16}{9}}= \sqrt{-\frac{7}{9}} \notin \mathbb{R}\\
|
||||
& \Rightarrow \text{Es ex. keine Cholesky-Zerlegung, aber $A$ ist symmetrisch}\\
|
||||
& \Rightarrow \text{$A$ ist nicht pos. Definit}
|
||||
& \Rightarrow \text{$A$ ist nicht positiv definit}
|
||||
\end{align}
|
||||
|
|
|
@ -1,12 +1,115 @@
|
|||
\section*{Aufgabe 3}
|
||||
Die Jacobi-Matrix von $f$ lautet:
|
||||
\[f' (x,y) = \begin{pmatrix}
|
||||
3 & \cos y\\
|
||||
3 x^2 & e^y
|
||||
\end{pmatrix}\]
|
||||
Hierfür wurde in in der ersten Spalte nach $x$ abgeleitet und in der
|
||||
zweiten Spalte nach $y$.
|
||||
|
||||
Und jetzt die Berechnung
|
||||
\subsection*{Lösungsvorschlag 1}
|
||||
Eine Iteration des Newton-Verfahren ist durch
|
||||
\begin{align}
|
||||
x_{k+1}&=x_{k}-f'(x_k)^{-1}\cdot f(x_k)
|
||||
\end{align}
|
||||
gegeben (vgl. Skript, S. 35).
|
||||
|
||||
\[f'(x, y) \cdot (x_0, y_0) = f(x,y)\]
|
||||
Zur praktischen Durchführung lösen wir
|
||||
\[f'(x_0, y_0)\Delta x = -f(x_0,y_0)\]
|
||||
mit Hilfe der LR Zerlegung nach $\Delta x$ auf:
|
||||
|
||||
\begin{align}
|
||||
%
|
||||
f'(x_0,y_0) &= L \cdot R \\
|
||||
\Leftrightarrow f'(-\nicefrac{1}{3}, 0) &= L \cdot R \\
|
||||
\Leftrightarrow \begin{pmatrix}
|
||||
3 & 1\\
|
||||
\frac{1}{3} & 1
|
||||
\end{pmatrix}
|
||||
&=
|
||||
\overbrace{\begin{pmatrix}
|
||||
1 & 0\\
|
||||
\frac{1}{9} & 1
|
||||
\end{pmatrix}}^{=: L} \cdot
|
||||
\overbrace{\begin{pmatrix}
|
||||
3 & 1\\
|
||||
0 & \frac{8}{9}
|
||||
\end{pmatrix}}^{=: R}\\
|
||||
%
|
||||
L \cdot c &= -f(x_0,y_0) \\
|
||||
\Leftrightarrow
|
||||
\begin{pmatrix}
|
||||
1 & 0\\
|
||||
\frac{1}{9} & 1
|
||||
\end{pmatrix}
|
||||
\cdot c
|
||||
&=
|
||||
\begin{pmatrix}
|
||||
-2\\
|
||||
\frac{26}{27}
|
||||
\end{pmatrix}\\
|
||||
\Rightarrow
|
||||
c &= \begin{pmatrix}
|
||||
-2\\
|
||||
\frac{32}{27}
|
||||
\end{pmatrix}\footnotemark\\
|
||||
%
|
||||
R\cdot \Delta x &= c\\
|
||||
\Leftrightarrow
|
||||
\begin{pmatrix}
|
||||
3 & 1\\
|
||||
0 & \frac{8}{9}
|
||||
\end{pmatrix}
|
||||
\cdot \Delta x &=
|
||||
\begin{pmatrix}
|
||||
-2\\
|
||||
\frac{32}{27}
|
||||
\end{pmatrix}\\
|
||||
\Rightarrow \Delta x &=
|
||||
\begin{pmatrix}
|
||||
-\frac{10}{9}\\
|
||||
\frac{4}{3}
|
||||
\end{pmatrix}
|
||||
\end{align}
|
||||
\footnotetext{Dieser Schritt wird durch Vorwärtssubsitution berechnet.}
|
||||
|
||||
Anschließend berechnen wir
|
||||
\begin{align}
|
||||
\begin{pmatrix}
|
||||
x_1\\
|
||||
y_1
|
||||
\end{pmatrix} &=
|
||||
\begin{pmatrix}
|
||||
x_0\\
|
||||
y_0
|
||||
\end{pmatrix}+\Delta x \\
|
||||
\Leftrightarrow\begin{pmatrix}
|
||||
x_1\\
|
||||
y_1
|
||||
\end{pmatrix} &=
|
||||
\begin{pmatrix}
|
||||
\frac{1}{3}\\
|
||||
0
|
||||
\end{pmatrix} +
|
||||
\begin{pmatrix}
|
||||
-\frac{10}{9}\\
|
||||
\frac{4}{3}
|
||||
\end{pmatrix} \\
|
||||
\Leftrightarrow\begin{pmatrix}
|
||||
x_1\\
|
||||
y_1
|
||||
\end{pmatrix} &=
|
||||
\begin{pmatrix}
|
||||
-\frac{7}{9}\\
|
||||
\frac{4}{3}
|
||||
\end{pmatrix}
|
||||
\end{align}
|
||||
|
||||
|
||||
\subsection*{Lösungsvorschlag 2}
|
||||
Und jetzt die Berechnung %TODO: Was ist hiermit gemeint?
|
||||
|
||||
\[f'(x, y) \cdot (x_0, y_0) = f(x,y)\] %TODO: Was ist hiermit gemeint?
|
||||
|
||||
LR-Zerlegung für $f'(x, y)$ kann durch scharfes hinsehen durchgeführt
|
||||
werden, da es in $L$ nur eine unbekannte (links unten) gibt. Es gilt
|
||||
|
@ -59,7 +162,11 @@ also ausführlich:
|
|||
0 & -x^2 \cdot \cos y + e^y
|
||||
\end{pmatrix}\\
|
||||
P &= I_2\\
|
||||
-f ( \frac{-1}{3}, 0) &= \begin{pmatrix} 2\\ -\frac{26}{27}\end{pmatrix}\\
|
||||
c &= \begin{pmatrix} 2\\ \frac{82}{27} \end{pmatrix}\\
|
||||
\end{align}
|
||||
|
||||
Es folgt:
|
||||
\begin{align}
|
||||
-f ( \nicefrac{-1}{3}, 0) &= \begin{pmatrix} -2\\ -\frac{26}{27}\end{pmatrix}\\
|
||||
c &= \begin{pmatrix} 2\\ \frac{82}{27} \end{pmatrix}\\ %TODO: Was ist c?
|
||||
(x_1, y_1) &= \begin{pmatrix} \frac{5}{3}\\ \frac{82}{27}\end{pmatrix}
|
||||
\end{align}
|
||||
|
|
Binary file not shown.
|
@ -15,6 +15,7 @@
|
|||
\usepackage{pifont}% http://ctan.org/pkg/pifont
|
||||
\usepackage{gauss}
|
||||
\usepackage{algorithm,algpseudocode}
|
||||
\usepackage{units}
|
||||
\usepackage{parskip}
|
||||
\usepackage{lastpage}
|
||||
\allowdisplaybreaks
|
||||
|
|
|
@ -1,43 +1,30 @@
|
|||
\section*{Aufgabe 2}
|
||||
\subsection*{Teilaufgabe a)}
|
||||
Formel: $y_i = \frac{b_i - \sum_{j=1}^{i-1} y_j \cdot l_{ij}}{l_{ii}} $
|
||||
|
||||
Anmerkung: $l_{ii}$ kann nicht $0$ sein, da L dann nicht mehr invertierbar wäre.
|
||||
\textbf{Behauptung:} Für $x \in \mathbb{R}$ gilt, dass $cos(x_k) = x_{k+1}$ gegen den einzigen Fixpunkt $x^{*} = cos(x^{*})$ konvergiert.
|
||||
|
||||
Algorithmus:
|
||||
\textbf{Beweis:}
|
||||
Sei $ D := [-1, 1]$.\\
|
||||
Trivial: $D$ ist abgeschlossen.
|
||||
|
||||
\begin{algorithm}[H]
|
||||
\begin{algorithmic}
|
||||
\For{$i=1$ to $i=n$}
|
||||
\State $sum \gets 0$
|
||||
\For{$j = 1$ to $j = i-1$}
|
||||
\State $sum \gets sum + y_i \cdot l_{ij}$
|
||||
\EndFor
|
||||
\State $y_i \gets \frac{b_i - sum}{l_{ii}}$
|
||||
\EndFor
|
||||
\end{algorithmic}
|
||||
\caption{TODO}
|
||||
\end{algorithm}
|
||||
Sei $ x \in D$, so gilt:
|
||||
\begin{align*}
|
||||
0 < cos(x) \leq 1
|
||||
\end{align*}
|
||||
Also: $cos(x) \in D$.\\ Wenn $x \not\in D$, so gilt $y := cos(x)$ und $cos(y) \in D$. D.h. bereits nach einem Iterationschritt wäre $cos(x) \in D$ für $x \in \mathbb{R}$! Dies ist wichtig, da damit gezeigt ist, dass $cos(x_k) = x_{k+1}$ für jedes $x \in \mathbb{R}$ konvergiert! Es kommt nur dieser einzige Iteratationsschritt für $x \not\in \mathbb{R}$ hinzu.
|
||||
|
||||
\subsubsection*{(b)}
|
||||
\begin{algorithm}[H]
|
||||
\begin{algorithmic}
|
||||
\Require Matrix $A$, Vektor $b$
|
||||
\Procedure{LoeseLGS}{$A$, $b$}
|
||||
\State $P, L, R \gets \Call{LRZer}{A}$
|
||||
\State $b^* \gets P \cdot b$
|
||||
\State $c \gets \Call{VorSub}{L, b^*}$
|
||||
\State $x \gets \Call{RueckSub}{R, c}$
|
||||
\State \Return $x$
|
||||
\EndProcedure
|
||||
\end{algorithmic}
|
||||
\caption{Löse ein LGS $Ax = b$}
|
||||
\end{algorithm}
|
||||
Nun gilt mit $ x, y \in D, x < y, \xi \in (x,y) $ und dem Mittelwert der Differentialrechnung:
|
||||
\begin{align*}
|
||||
\frac{cos(x) - cos(y)}{x - y} = cos'(\xi) \\
|
||||
\Leftrightarrow cos(x) - cos(y) = cos'(\xi) * (x - y) \\
|
||||
\Leftrightarrow | cos(x) - cos(y) | = | cos'(\xi) * (x - y) | \leq | cos'(\xi) | * | (x - y) |
|
||||
\end{align*}
|
||||
Da $ \xi \in (0, 1) $ gilt:
|
||||
\begin{align*}
|
||||
0 \leq | cos'(\xi) | = | sin(\xi) | < 1
|
||||
\end{align*}
|
||||
Damit ist gezeigt, dass $cos(x) : D \rightarrow D$ Kontraktion auf $D$.
|
||||
|
||||
\subsection*{Teilaufgabe c)}
|
||||
Aufwand:
|
||||
\begin{itemize}
|
||||
\item Vorwärts-/Rückwärtssubstitution: jeweils $\frac{1}{2} \cdot n^2$
|
||||
\item LR-Zerlegung: $\frac{1}{3}n^3$
|
||||
\item gesamt: $\frac{1}{3}n^3+n^2$
|
||||
\end{itemize}
|
||||
Damit sind alle Voraussetzung des Banachschen Fixpunktsatzes erfüllt.
|
||||
|
||||
Nach dem Banachschen Fixpunktsatz folgt die Aussage.
|
|
@ -1,9 +1,44 @@
|
|||
\section*{Aufgabe 5}
|
||||
Es gibt unendlich viele symmetrische QF mit $0=c_1 < c_2 < c_3$ und Ordnung $\geq 4$. Die Knoten müssen nur
|
||||
folgende Eigenschaft erfüllen:
|
||||
\[c_i = 1 - c_{s+1-i}\]
|
||||
Die Gewichte sind durch Vorgabe der Knoten und der Bedingung, dass
|
||||
die QF die Ordnung von $s \geq 3$ erfüllen soll, nach VL bereits
|
||||
eindeutig bestimmt.
|
||||
|
||||
Anmerkung: Es gilt immer $c_2 = \frac{1}{2}$!
|
||||
Zunächst ist nach der Familie von Quadraturformeln gefragt, für die gilt: ($p := $ Ordnung der QF)
|
||||
\begin{align}
|
||||
s = 3 \\
|
||||
0 = c_1 < c_2 < c_3 \\
|
||||
p \ge 4
|
||||
\end{align}
|
||||
|
||||
Nach Satz 29 sind in der Familie genau die QFs, für die gilt: \\
|
||||
Für alle Polynome $g(x)$ mit Grad $\le 0$ gilt:
|
||||
\begin{align}
|
||||
\int_0^1 M(x) \cdot g(x) \mathrm{d}x = 0 \label{a3}
|
||||
\end{align}
|
||||
Es gilt $g(x) = c$ für eine Konstante c, da der Grad von $g(x)$ $0$ ist. Also ist \ref{a3} gleichbedeutend mit:
|
||||
\begin{align}
|
||||
\int_0^1 M(x) \cdot c \mathrm{d}x &= 0 \\
|
||||
\Leftrightarrow c \cdot \int_0^1 M(x) \mathrm{d}x &= 0 \\
|
||||
\Leftrightarrow \int_0^1 M(x) \mathrm{d}x &= 0 \\
|
||||
\Leftrightarrow \int_0^1 (x-c_1)(x-c_2)(x-c_3) \mathrm{d}x &= 0 \\
|
||||
\Leftrightarrow \frac{1}{4} - \frac{1}{3} \cdot (c_2 + c_3) + \frac{1}{2} \cdot c_2 \cdot c_3 &= 0 \\
|
||||
\Leftrightarrow \frac{\frac{1}{4} - \frac{1}{3} \cdot c_3}
|
||||
{\frac{1}{3} - \frac{1}{2} \cdot c_3} &= c_2
|
||||
\end{align}
|
||||
|
||||
Natürlich müssen auch die Gewichte optimal gewählt werden. Dafür wird Satz 28 genutzt:
|
||||
Sei $b^T = (b_1, b_2, b_3)$ der Gewichtsvektor. Sei zudem $C :=
|
||||
\begin{pmatrix}
|
||||
{c_1}^0 & {c_2}^0 & {c_3}^0 \\
|
||||
{c_1}^1 & {c_2}^1 & {c_3}^1 \\
|
||||
{c_1}^2 & {c_2}^2 & {c_3}^2
|
||||
\end{pmatrix}
|
||||
$. \\
|
||||
Dann gilt: $C$ ist invertierbar und $b = C^{-1} \cdot
|
||||
\begin{pmatrix}
|
||||
1 \\
|
||||
\frac{1}{2} \\
|
||||
\frac{1}{3}
|
||||
\end{pmatrix}
|
||||
$.
|
||||
|
||||
Es gibt genau eine symmetrische QF in der Familie. Begründung: \\
|
||||
Aus $c_1 = 0 $ folgt, dass $c_3 = 0$ ist. Außerdem muss $c_2 = \frac{1}{2} $ sein. Also sind die Knoten festgelegt. Da wir die Ordnung $\ge s = 3$ fordern, sind auch die Gewichte eindeutig. \\
|
||||
Es handelt sich um die aus der Vorlesung bekannte Simpsonregel.
|
||||
|
|
Binary file not shown.
73
documents/Numerik/Klausur6/Aufgabe1.tex
Normal file
73
documents/Numerik/Klausur6/Aufgabe1.tex
Normal file
|
@ -0,0 +1,73 @@
|
|||
\section*{Aufgabe 1}
|
||||
\textbf{Gegeben:}
|
||||
|
||||
\[
|
||||
A = \begin{pmatrix}
|
||||
1 & 2 & 3\\
|
||||
2 & 8 & 14\\
|
||||
3 & 14 & 34
|
||||
\end{pmatrix}\]
|
||||
|
||||
\textbf{Aufgabe:} Durch Gauß-Elimination die Cholesky-Zerlegung $A = \overline{L} \overline{L}^T$
|
||||
berechnen
|
||||
|
||||
\textbf{Lösung mit Gauß-Elimination:}
|
||||
\begin{align*}
|
||||
A &=
|
||||
\begin{gmatrix}[p]
|
||||
1 & 2 & 3\\
|
||||
2 & 8 & 14\\
|
||||
3 & 14 & 34
|
||||
\rowops
|
||||
\add[\cdot (-2)]{0}{1}
|
||||
\add[\cdot (-3)]{0}{2}
|
||||
\end{gmatrix}\\
|
||||
\leadsto
|
||||
L^{(1)} &=
|
||||
\begin{pmatrix}
|
||||
1 & 0 & 0\\
|
||||
-2 & 1 & 0\\
|
||||
-3 & 0 & 1
|
||||
\end{pmatrix},&
|
||||
A^{(1)} &=
|
||||
\begin{gmatrix}[p]
|
||||
1 & 2 & 3\\
|
||||
0 & 4 & 8\\
|
||||
0 & 8 & 25
|
||||
\rowops
|
||||
\add[\cdot (-2)]{1}{2}
|
||||
\end{gmatrix}\\
|
||||
\leadsto
|
||||
L^{(2)} &=
|
||||
\begin{pmatrix}
|
||||
1 & 0 & 0\\
|
||||
0 & 1 & 0\\
|
||||
0 & -2 & 1
|
||||
\end{pmatrix},&
|
||||
A^{(2)} &=
|
||||
\begin{gmatrix}[p]
|
||||
1 & 2 & 3\\
|
||||
0 & 4 & 8\\
|
||||
0 & 0 & 9
|
||||
\rowops
|
||||
\add[\cdot (-2)]{1}{2}
|
||||
\end{gmatrix}\\
|
||||
\end{align*}
|
||||
|
||||
TODO: Und wie gehts weiter?
|
||||
|
||||
|
||||
\textbf{Lösung ohne Gauß-Elimination:}
|
||||
\[
|
||||
A =
|
||||
\underbrace{
|
||||
\begin{pmatrix}
|
||||
1 & 0 & 0\\
|
||||
2 & 2 & 0\\
|
||||
3 & 4 & 3
|
||||
\end{pmatrix}}_{=: L} \cdot \underbrace{\begin{pmatrix}
|
||||
1 & 2 & 3\\
|
||||
0 & 2 & 4\\
|
||||
0 & 0 & 3
|
||||
\end{pmatrix}}_{=: L^T}
|
||||
\]
|
77
documents/Numerik/Klausur6/Aufgabe2.tex
Normal file
77
documents/Numerik/Klausur6/Aufgabe2.tex
Normal file
|
@ -0,0 +1,77 @@
|
|||
\section*{Aufgabe 2}
|
||||
\subsection*{Teilaufgabe i}
|
||||
Es gilt:
|
||||
|
||||
\begin{align}
|
||||
2x - e^{-x} &= 0\\
|
||||
\Leftrightarrow 2x &= e^{-x}\\
|
||||
\end{align}
|
||||
|
||||
Offensichtlich ist $g(x) := 2x$ streng monoton steigend und $h(x) := e^{-x}$ streng
|
||||
monoton fallend.
|
||||
|
||||
Nun gilt: $g(0) = 0 < 1 = e^0 = h(0)$. Das heißt, es gibt keinen
|
||||
Schnittpunkt für $x \leq 0$.
|
||||
|
||||
Außerdem: $g(1) = 2$ und $h(1) = e^{-1} = \frac{1}{e} < 2$.
|
||||
Das heißt, für $x \geq 1$ haben $g$ und $h$ keinen Schnittpunkt.
|
||||
|
||||
Da $g$ und $h$ auf $[0,1]$ stetig sind und $g(0) < h(0)$ sowie $g(1) > h(1)$
|
||||
gilt, müssen sich $g$ und $h$ im Intervall mindestens ein mal schneiden.
|
||||
Da beide Funktionen streng monoton sind, schneiden sie sich genau
|
||||
ein mal.
|
||||
|
||||
Ein Schnittpunkt der Funktion $g,h$ ist äquivalent zu einer
|
||||
Nullstelle der Funktion $f$. Also hat $f$ genau eine Nullstelle
|
||||
und diese liegt in $[0,1]$.
|
||||
|
||||
\subsection*{Teilaufgabe ii}
|
||||
\begin{align}
|
||||
2x - e^{-x} &= 0\\
|
||||
\Leftrightarrow 2x &= e^{-x}\\
|
||||
\Leftrightarrow x &= \frac{1}{2} \cdot e^{-x} = F_1(x) \label{a2iif1}\\
|
||||
\stackrel{x \in \mathbb{R}^+}{\Rightarrow} \ln(2x) &= -x\\
|
||||
\Leftrightarrow x &= - \ln(2x) = F_2(x)\label{a2iif2}
|
||||
\end{align}
|
||||
|
||||
Gleichung \ref{a2iif1} zeigt, dass der Fixpunkt von $F_1$ mit der
|
||||
Nullstelle von $f$ übereinstimmt.
|
||||
|
||||
Gleichung \ref{a2iif2} zeigt, dass der Fixpunkt von $F_1$ mit der
|
||||
Nullstelle von $f$ übereinstimmt. Da es nur in $[0,1]$ eine Nullstelle
|
||||
gibt (vgl. Teilaufgabe i), ist die Einschränkung von $x$ auf $\mathbb{R}^+$
|
||||
irrelevant.
|
||||
|
||||
TODO: Ich vermute, man soll die Kontraktionszahlen ermitteln.
|
||||
Die Funktion mit der niedrigern Kontraktionszahl ist besser, da man
|
||||
bessere Abschätzungen machen kann.
|
||||
|
||||
$F_1$ ist auf $[0,1]$ eine Kontraktion mit Kontraktionszahl $\theta = \frac{1}{2}$:
|
||||
\begin{align}
|
||||
\|\frac{1}{2} e^{-x} - \frac{1}{2} e^{-y}\| &\leq \frac{1}{2} \cdot \|x-y\|\\
|
||||
\Leftrightarrow \frac{1}{2} \cdot \| e^{-x} - e^{-y}\| &\leq \frac{1}{2} \cdot \|x-y\|\\
|
||||
\Leftrightarrow \| e^{-x} - e^{-y}\| &\leq \|x-y\|\\
|
||||
\Leftrightarrow \| -e^{-x-y}(e^{x} - e^{y})\| &\leq \|x-y\|\\
|
||||
\Leftrightarrow \|-e^{-x-y} \| \cdot \|e^{x} - e^{y}\| &\leq \|x-y\|\\
|
||||
\Leftrightarrow \underbrace{e^{-(x+y)}}_{\leq 1} \cdot \|e^{x} - e^{y}\| &\leq \|x-y\|
|
||||
\end{align}
|
||||
|
||||
TODO: Beweis ist noch nicht fertig
|
||||
|
||||
$F_2$ ist auf $(0,1]$ eine Kontraktion mit Kontraktionszahl $\theta$:
|
||||
\begin{align}
|
||||
\|- \ln (2x) + \ln(2y) \| &\leq \theta \cdot \|x-y\|\\
|
||||
\Leftrightarrow \| \ln(\frac{2y}{2x}) \| &\leq \theta \cdot \|x-y\|\\
|
||||
\Leftrightarrow \| \ln(\frac{y}{x}) \| &\leq \theta \cdot \|x-y\|
|
||||
\end{align}
|
||||
|
||||
TODO: Beweis ist nicht mal wirklich angefangen
|
||||
|
||||
Gegen $F_2$ spricht auch, dass $\log$ nur auf $\mathbb{R}^+$ definiert
|
||||
ist. Das kann bei Rundungsfehlern eventuell zu einem Fehler führen.
|
||||
(vgl. Python-Skript)
|
||||
|
||||
\subsection*{Teilaufgabe iii}
|
||||
\[x_{k+1} = x_k - \frac{2x_k - e^{-x_k}}{2 + e^{-x_k}}\]
|
||||
|
||||
Laut \href{http://www.wolframalpha.com/input/?i=2x-e%5E(-x)%3D0}{Wolfram|Alpha} ist die Lösung etwa 0.35173371124919582602
|
37
documents/Numerik/Klausur6/Aufgabe3.tex
Normal file
37
documents/Numerik/Klausur6/Aufgabe3.tex
Normal file
|
@ -0,0 +1,37 @@
|
|||
\section*{Aufgabe 3}
|
||||
|
||||
\begin{table}[H]
|
||||
\begin{tabular}{l|l|l|l|l}
|
||||
$f_i$ & 8 & 3 & 4 & 8 \\ \hline
|
||||
$x_i$ & -1 & 0 & 1 & 3 \\
|
||||
\end{tabular}
|
||||
\end{table}
|
||||
|
||||
\subsection*{Teilaufgabe i}
|
||||
\begin{align}
|
||||
p(x) = \sum_{i=0}^3 f_i \cdot L_i(x)
|
||||
\end{align}
|
||||
mit
|
||||
\begin{align}
|
||||
L_0(x) &= \frac{(x-x_1)(x-x_2)(x-x_3)}{(x_0 - x_1)(x_0-x_2)(x_0-x_3)}
|
||||
= \ldots = \frac{x^3 - 4x^2 + 3x}{-8} \\
|
||||
L_1(x) &= \frac{x^3 - 3x^2 - x + 3}{3} \\
|
||||
L_2(x) &= \frac{x^3 - 2x^2 - 3x}{-4} \\
|
||||
L_3(x) &= \frac{x^3 - x}{24}
|
||||
\end{align}
|
||||
|
||||
\subsection*{Teilaufgabe ii}
|
||||
Anordnung der dividierten Differenzen im so genannten Differenzenschema:
|
||||
\begin{table}[H]
|
||||
\begin{tabular}{llll}
|
||||
$f[x_0]=f_0=8$ & ~ & ~ & ~ \\
|
||||
$f[x_1]= 3$ & $f[x_0,x_1] = \frac{f[x_0] - f[x_1]}{x_0-x_1} = -5$ & ~ & ~ \\
|
||||
$f[x_2] = 4$ & $1$ & $3$ & ~ \\
|
||||
$f[x_3] = 8$ & $2$ & $\frac{1}{3}$ & $- \frac{2}{3} $ \\
|
||||
\end{tabular}
|
||||
\end{table}
|
||||
Also:
|
||||
\begin{align}
|
||||
p(x) &= f[x_0] + f[x_0,x_1] \cdot (x-x_0) + f[x_0, x_1, x_2] \cdot (x-x_0) \cdot (x-x_1) \\ & + f[x_0, x_1, x_2, x_3] \cdot (x-x_0) \cdot (x-x_1) \cdot (x-x_2) \\
|
||||
&= 8 - 5 \cdot (x-x_0) + 3 \cdot (x-x_0) \cdot (x-x_1) \\ & - \frac{2}{3} \cdot (x-x_0) \cdot (x-x_1) \cdot (x-x_2)
|
||||
\end{align}
|
6
documents/Numerik/Klausur6/Aufgabe4.tex
Normal file
6
documents/Numerik/Klausur6/Aufgabe4.tex
Normal file
|
@ -0,0 +1,6 @@
|
|||
\section*{Aufgabe 4}
|
||||
Ein Polynom, das vier Punkte interpoliert, hat maximal Grad 3.
|
||||
Da wir das Integral über dieses Polynom im Bereich $[x_2, x_3]$
|
||||
exakt berechnen sollen, muss die Quadraturformel vom Grad $p=4$ sein.
|
||||
|
||||
TODO
|
7
documents/Numerik/Klausur6/Aufgabe5.tex
Normal file
7
documents/Numerik/Klausur6/Aufgabe5.tex
Normal file
|
@ -0,0 +1,7 @@
|
|||
\section*{Aufgabe 5}
|
||||
|
||||
Das \href{https://de.wikipedia.org/wiki/Explizites_Euler-Verfahren}{explizite Euler-Verfahren}
|
||||
dient der numerischen Lösung eines Anfangswertproblems (Differentialgleichungen).
|
||||
|
||||
Wir haben das nicht in der Vorlesung gemacht, also wird das wohl nicht
|
||||
relevant sein.
|
BIN
documents/Numerik/Klausur6/Klausur6.pdf
Normal file
BIN
documents/Numerik/Klausur6/Klausur6.pdf
Normal file
Binary file not shown.
50
documents/Numerik/Klausur6/Klausur6.tex
Normal file
50
documents/Numerik/Klausur6/Klausur6.tex
Normal file
|
@ -0,0 +1,50 @@
|
|||
\documentclass[a4paper]{scrartcl}
|
||||
\usepackage{amssymb, amsmath} % needed for math
|
||||
\usepackage[utf8]{inputenc} % this is needed for umlauts
|
||||
\usepackage[ngerman]{babel} % this is needed for umlauts
|
||||
\usepackage[T1]{fontenc} % this is needed for correct output of umlauts in pdf
|
||||
\usepackage{pdfpages} % Signatureinbingung und includepdf
|
||||
\usepackage{geometry} % [margin=2.5cm]layout
|
||||
\usepackage[pdftex]{hyperref} % links im text
|
||||
\usepackage{color}
|
||||
\usepackage{framed}
|
||||
\usepackage{enumerate} % for advanced numbering of lists
|
||||
\usepackage{marvosym} % checkedbox
|
||||
\usepackage{wasysym}
|
||||
\usepackage{braket} % for \Set{}
|
||||
\usepackage{pifont}% http://ctan.org/pkg/pifont
|
||||
\usepackage{gauss}
|
||||
\usepackage{algorithm,algpseudocode}
|
||||
\usepackage{parskip}
|
||||
\usepackage{lastpage}
|
||||
\usepackage{gauss}
|
||||
\usepackage{units}
|
||||
\allowdisplaybreaks
|
||||
|
||||
\newcommand{\cmark}{\ding{51}}%
|
||||
\newcommand{\xmark}{\ding{55}}%
|
||||
|
||||
\title{Numerik Klausur 6 - Musterlösung}
|
||||
\makeatletter
|
||||
\AtBeginDocument{
|
||||
\hypersetup{
|
||||
pdfauthor = {Martin Thoma, Peter, Felix},
|
||||
pdfkeywords = {Numerik, KIT, Klausur},
|
||||
pdftitle = {\@title}
|
||||
}
|
||||
\pagestyle{fancy}
|
||||
\lhead{\@title}
|
||||
\rhead{Seite \thepage von \pageref{LastPage}}
|
||||
}
|
||||
\makeatother
|
||||
|
||||
\usepackage{fancyhdr}
|
||||
\fancyfoot[C]{}
|
||||
|
||||
\begin{document}
|
||||
\input{Aufgabe1}\clearpage
|
||||
\input{Aufgabe2}\clearpage
|
||||
\input{Aufgabe3}
|
||||
\input{Aufgabe4}
|
||||
\input{Aufgabe5}
|
||||
\end{document}
|
8
documents/Numerik/Klausur6/Makefile
Normal file
8
documents/Numerik/Klausur6/Makefile
Normal file
|
@ -0,0 +1,8 @@
|
|||
SOURCE = Klausur6
|
||||
make:
|
||||
pdflatex -shell-escape $(SOURCE).tex -output-format=pdf
|
||||
pdflatex -shell-escape $(SOURCE).tex -output-format=pdf
|
||||
make clean
|
||||
|
||||
clean:
|
||||
rm -rf $(TARGET) *.class *.html *.log *.aux *.out *.pyg
|
11
documents/Numerik/Klausur6/aufgabe2.py
Normal file
11
documents/Numerik/Klausur6/aufgabe2.py
Normal file
|
@ -0,0 +1,11 @@
|
|||
from math import exp, log
|
||||
|
||||
def iterate(x):
|
||||
#return x - (2.0*x - exp(-x))/(2.0+exp(-x)) #Newton
|
||||
#return 0.5*exp(-x) #F_1
|
||||
return (-1)*log(2.0*x) #F_2
|
||||
|
||||
x = 0.9
|
||||
for i in range(10):
|
||||
print (i, x)
|
||||
x = iterate(x)
|
Loading…
Add table
Add a link
Reference in a new issue