Skip to content

Commit

Permalink
spicker done
Browse files Browse the repository at this point in the history
  • Loading branch information
joshinils committed Jul 3, 2019
1 parent 7c110b7 commit edc42c2
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 33 deletions.
2 changes: 1 addition & 1 deletion klausurVorb11/readData.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

% kreisparameter
rr = 4;
mx= 10;
mx= 100;
my= 10;

th = (0:pi/500:2*pi / 4)';
Expand Down
Binary file modified texnotes/num2Spicker.pdf
Binary file not shown.
22 changes: 14 additions & 8 deletions texnotes/num2Spicker.tex
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@

\usepackage{geometry}
\geometry{
a4paper, % or A3, etc if to print smaller
a3paper, % or A3, etc if to print smaller
% total={170mm,257mm},
left=\somedistanceLeft,
right=\somedistanceLeft,
top=\somedistanceTop,
bottom=\somedistanceTop,
% landscape % better i think
landscape % better i think
}


Expand All @@ -91,7 +91,7 @@
\newcommand{\R}{ {\mathbb R} }
\newcommand{\C}{ {\mathbb C} }
\newcommand{\1}{ {\mathds{1}} }
\newcommand{\abs}[1]{\lvert#1\rvert}
\newcommand{\abs}[1]{\left\lvert#1\right\rvert}
\newcommand{\norm}[1]{\left\lVert#1\right\rVert}
\newcommand{\xt}{\tilde{x}}
\newcommand{\dotleq}{\dot{\leq}}
Expand All @@ -105,7 +105,7 @@
\newcommand{\rot}{}

% ------------------ edit Ueberschrift ---------------------
\newcommand{\ueberschrift}{Numerik II Notizen}
\newcommand{\ueberschrift}{Numerik II Spicker}


\usepackage{mathpazo}
Expand All @@ -132,18 +132,24 @@
\pagestyle{empty} % no line numbers

% equation spacing
\def\distEQ{12pt}
\def\distEQ{8pt}
\def\distEq{5pt}
\abovedisplayskip=\distEQ plus 0pt minus \distEQ
\abovedisplayshortskip=0pt plus 0pt
\belowdisplayskip=\distEQ plus 0pt minus \distEQ
\belowdisplayshortskip=7pt plus 0pt minus 7pt
\belowdisplayshortskip=\distEq plus 0pt minus \distEq

% line between collumns
\setlength{\columnsep}{2pt}
\setlength{\columnsep}{8pt}
% \setlength{\columnseprule}{1pt}


\begin{multicols}{2}
\begin{centering}
Numerik II -- Spicker -- Joshua Laskowski -- \today\\%2019.06.04 \\
\end{centering}
\newlength\myspace
\setlength{\myspace}{ 14pt plus 0pt minus 12pt }
\begin{multicols}{4}
\newboolean{doraggedright} %Deklaration
\setboolean{doraggedright}{true} %Zuweisung
\input{spicker01}
Expand Down
35 changes: 19 additions & 16 deletions texnotes/spicker01.tex
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@
y_n = 1,72
\end{pmatrix}
\end{dmath*}
\end{minipage}}
\end{minipage}}\vspace{\myspace}
\fbox{\begin{minipage}[tc]{\linewidth-2\fboxsep}\ifthenelse{\boolean{doraggedright}}{\raggedright}{}
\textbf{Satz: 1.1}: \linebreak[3]
$x^*\in \R$ ist genau dann eine Lösung des linearen Ausgleichsproblems,
wenn $x^*$ Lösung der Normalgleichung $A^TAx = A^Tb$ ist.
Es gibt mindestens eine Lösung $x^*$.
Sie ist eindeutig, gdw. $Rang(A) = n$.
\end{minipage}}
\end{minipage}}\vspace{\myspace}
\fbox{\begin{minipage}[tc]{\linewidth-2\fboxsep}\ifthenelse{\boolean{doraggedright}}{\raggedright}{}
\textbf{Satz: 1.2}: \linebreak[3]
Sei $A\in\R^{m\times n}$, $b\in\R^{m}$ mit QR-Zerlegung von $A$,
Expand All @@ -69,7 +69,7 @@
$R_1$ ist regulär und \linebreak[3]
% \mbox{$x^* = R_1^{-1}\cdot c_1$} ist die eindeutige Lösung des Linearen Ausgleichsproblems $\norm{b-Ax}^2_2 = min$.
Außerdem gilt: $\norm{b-Ax}_2 = \norm{c_2}$.
\end{minipage}}
\end{minipage}}\vspace{\myspace}
\fbox{\begin{minipage}[tc]{\linewidth-2\fboxsep}\ifthenelse{\boolean{doraggedright}}{\raggedright}{}
\textbf{Hessenbergmatrix durch Householder-Reflexion}: \linebreak[3]
Mithilfe einer Householder-Reflexion, dargestellt durch Matrixmultiplikation $Q_u \cdot A$,
Expand All @@ -80,7 +80,7 @@
dass alle Elemente in der ersten Spalte unterhalb der Diagonalen verschwinden. \linebreak[3]
Nun kann man weiter vorgehen und die Teilmatrix von $A$ hernehmen, welche die erste Zeile und Spalte gestrichen hat und darauf weiter agieren. Am ende hätte man mindestens eine obere rechte Dreiecksmatrix.
Das Produkt aller verwendeten $Q$ wäre dann eine orthogonale Matrix, womit $Q\cdot R = A$ als QR\nobreakdash-Zerlegung entstanden ist.
\end{minipage}}
\end{minipage}}\vspace{\myspace}
\fbox{\begin{minipage}[tc]{\linewidth-2\fboxsep}\ifthenelse{\boolean{doraggedright}}{\raggedright}{}
\textbf{Eigenschaften der Householder-Reflexion}:
\vspace{-\topsep}
Expand All @@ -91,7 +91,7 @@
\item[(ii)] $Q_v \cdot u=u \Leftrightarrow v \bot u$
\item[(iii)] $Q_v^T = Q_v^{-1} \Rightarrow Q_v$ ist Orthogonal
\end{itemize}
\end{minipage}}
\end{minipage}}\vspace{\myspace}
\fbox{\begin{minipage}[tc]{\linewidth-2\fboxsep}\ifthenelse{\boolean{doraggedright}}{\raggedright}{}
Eine \textbf{Givensrotation} von $
A =
Expand All @@ -113,7 +113,7 @@
\begin{pmatrix}
r&\star\\0&\star
\end{pmatrix}$
\end{minipage}}
\end{minipage}}\vspace{\myspace}
\fbox{\begin{minipage}[tc]{\linewidth-2\fboxsep}\ifthenelse{\boolean{doraggedright}}{\raggedright}{}
\textbf{Nichtlineares Ausgleichsproblem}: \linebreak[3]
\mbox{Daten}:
Expand Down Expand Up @@ -142,10 +142,13 @@
-\sin(2x_2)&-2x_1\cos(2x_2)
\end{pmatrix}
\end{dmath*}
$ \norm{F(x)}_2^2 \rightarrow min \approx
$
\left.
\norm{F(x)}_2^2 \approx
\norm{ F\left(x^{(k)}\right) + J_F\left(x^{(k)}\right) \left( x- x^{(k)}\right) }_2^2
\right\} \rightarrow min
$
\end{minipage}}
\end{minipage}}\vspace{\myspace}
\fbox{\begin{minipage}[tc]{\linewidth-2\fboxsep}\ifthenelse{\boolean{doraggedright}}{\raggedright}{}
Algorithmus: \textbf{Gauß-Newton-Verfahren}
\begin{algorithmic}[1]
Expand All @@ -156,7 +159,7 @@
\State setze $x^{(k+1)} = x^{(k)} + \Delta x^{(k)}$
\EndFor
\end{algorithmic}
\end{minipage}}
\end{minipage}}\vspace{\myspace}
\fbox{\begin{minipage}[tc]{\linewidth-2\fboxsep}\ifthenelse{\boolean{doraggedright}}{\raggedright}{}
$
A\in\R^{n\times n} \, s.p.d \Rightarrow
Expand All @@ -169,7 +172,7 @@
$\Rightarrow A = VDV^T$
($VV^T = \1$)
\fbox{$AV = VD$}
\end{minipage}}
\end{minipage}}\vspace{\myspace}
\fbox{\begin{minipage}[tc]{\linewidth-2\fboxsep}\ifthenelse{\boolean{doraggedright}}{\raggedright}{}
$A\in \R^{m\times n}$
$A^TA$ ist s.p.semi-d.
Expand All @@ -181,7 +184,7 @@
und $V\in \R^{n\times n}$ mit \linebreak[3]
$U^TAV=\Sigma = diag(\sigma_1, ..., \sigma_p)
\Rightarrow $\fbox{$A = U\Sigma V^T$}
\end{minipage}}
\end{minipage}}\vspace{\myspace}
\fbox{\begin{minipage}[tc]{\linewidth-2\fboxsep}\ifthenelse{\boolean{doraggedright}}{\raggedright}{}
\textbf{Anwendung der SVD}
\vspace{-\topsep}
Expand All @@ -204,7 +207,7 @@
\item[(iv)] Regularisierung schlecht gestellter Probleme \linebreak[3]
\mbox{$ \hat{x} = \sum_{i=1}^{s} \nicefrac{1}{\sigma_i} v_i\scdot\left(u_i^T \scdot b\right)$}, $s < n$
\end{itemize}
\end{minipage}}
\end{minipage}}\vspace{\myspace}
\fbox{\begin{minipage}[tc]{\linewidth-2\fboxsep}\ifthenelse{\boolean{doraggedright}}{\raggedright}{}
Algorithmus: \textbf{Vektoriteration}
\begin{algorithmic}[1]
Expand All @@ -216,7 +219,7 @@
\State $ y^{k+1} = \nicefrac{x^{(k+1)}}{\norm{x^{(k+1)}}_2}$
\EndFor
\end{algorithmic}
\end{minipage}}
\end{minipage}}\vspace{\myspace}
\fbox{\begin{minipage}[tc]{\linewidth-2\fboxsep}\ifthenelse{\boolean{doraggedright}}{\raggedright}{}
Algorithmus: \textbf{Inverse Vektoriteration mit Spektralverschiebung}
\begin{algorithmic}[1]
Expand All @@ -229,7 +232,7 @@
\State $ y^{k+1} = \nicefrac{x^{(k+1)}}{\norm{x^{(k+1)}}_2}$
\EndFor
\end{algorithmic}
\end{minipage}}
\end{minipage}}\vspace{\myspace}
\fbox{\begin{minipage}[tc]{\linewidth-2\fboxsep}\ifthenelse{\boolean{doraggedright}}{\raggedright}{}
Lemma zum QR-Verfahren
\vspace{-\topsep}
Expand All @@ -244,7 +247,7 @@
Zwei Matrizen $A$ und $B$ sind sich \textbf{ähnlich}, wenn es eine reguläre Matrix $S$ gibt, so dass:
\mbox{$B = S^{-1} \scdot A \scdot S$} \mbox{$\Leftrightarrow SB=AS$} gilt. \linebreak[3]
Ähnliche Matrizen haben dasselbe Spektrum $\sigma(A) = \sigma(B)$, gleiche Spur, gleichen Rang aber nicht notwendigerweise die gleichen EV.
\end{minipage}}
\end{minipage}}\vspace{\myspace}
\fbox{\begin{minipage}[tc]{\linewidth-2\fboxsep}\ifthenelse{\boolean{doraggedright}}{\raggedright}{}
Algorithmus: \textbf{QR-Verfahren mit Spektralverschiebung}
\begin{algorithmic}[1]
Expand All @@ -258,7 +261,7 @@
\Statex{$\triangleright\quad = Q_k^T A_k Q_k$}
\EndFor
\end{algorithmic}
\end{minipage}}
\end{minipage}}\vspace{\myspace}



Expand Down
28 changes: 20 additions & 8 deletions texnotes/spickerInterpolation.tex
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
\mbox{$
\displaystyle
\ell_j = \prod_{\begin{smallmatrix}i=0\\i\neq j\end{smallmatrix}}^n \frac{x-x_i}{x_j-x_i}$}
\end{minipage}}
\end{minipage}}\vspace{\myspace}
\fbox{\begin{minipage}[tc]{\linewidth-2\fboxsep}\ifthenelse{\boolean{doraggedright}}{\raggedright}{}
\textbf{Newton-Basis}: \linebreak[3]
$ \displaystyle P\left(f|x_0, .., x_n\right)(x) = \sum_{i=0}^{n}b_i \omega_i(x) = \sum_{i=0}^{n}b_i \prod_{p=0}^{j} \left( x - x_p\right)$ \linebreak[3]
$ \displaystyle b_k = f_{[x_0, .., x_k]}$ \linebreak[3]
$ \displaystyle f_{[x_r, .., x_s]} = \left(f_{[x_{r+1}, .., x_s]} - f_{[x_r, .., x_{s-1}]} \right) / \left(x_r - x_s\right)$ \linebreak[3]
$ \displaystyle \omega_j(x) = \prod_{i=0}^{j} \left( x - x_i\right), \omega_0(x) = 1$
\end{minipage}}
\end{minipage}}\vspace{\myspace}
\fbox{\begin{minipage}[tc]{\linewidth-2\fboxsep}\ifthenelse{\boolean{doraggedright}}{\raggedright}{}
Algorithmus: \textbf{Horner-Schema}
\begin{algorithmic}[1]
Expand All @@ -27,13 +27,29 @@
\State $p = b_n + (x-x_k) \cdot p$
\EndFor
\end{algorithmic}
\end{minipage}}
\end{minipage}}\vspace{\myspace}
\fbox{\begin{minipage}[tc]{\linewidth-2\fboxsep}\ifthenelse{\boolean{doraggedright}}{\raggedright}{}
\textbf{Abschätzung}; \linebreak[3]
Satz: Seien $x_0, .., x_n$ Paarweise unterschiedliche Stützstellen,
$ x_i \in [a,b] $ und $f \in C^{n+1}\left( [a, b] \right)$. \linebreak[3]
Dann gilt für $x \in [a, b]$ \linebreak[3]
$\abs{f\left( x \right) - P\left( f|x_0, .., x_n \right)(x) } \leq \abs{ \omega_{n+1} } \displaystyle \max_{z \in [a, b]} \abs{\frac{ f^{(n+1)(z)} }{ (n+1)! }}$
$ \left\vert f\left( x \right) - P\left( f|x_0, .., x_n \right)(x) \right\rvert \leq \left\lvert \omega_{n+1} \right\rvert \displaystyle \max_{z \in [a, b]} \frac{ \left\lvert f^{(n+1)}(z) \right\rvert}{ (n+1)! } $
\end{minipage}}\vspace{\myspace}
\fbox{\begin{minipage}[tc]{\linewidth-2\fboxsep}\ifthenelse{\boolean{doraggedright}}{\raggedright}{}
\arraycolsep=1.9pt\def\arraystretch{1.5}
\begin{equation*}
% \begin{array}
\centering
\begin{tabular}{r|c|c|c|c|c|}
\cline{2-6}
& $0^\circ$ & $30^\circ$ & $45^\circ$ & $60^\circ$ & $90^\circ$ \\ \hline
\multicolumn{1}{|l|}{$\sin(\alpha)$} & 0 & $\frac{1}{2}$ & $\frac{1}{2}\sqrt{2}$ & $\frac{1}{2}\sqrt{3}$ & 1 \\ \hline
\multicolumn{1}{|l|}{$\cos(\alpha)$} & 1 & $\frac{1}{2}\sqrt{3}$ & $\frac{1}{2}\sqrt{2}$ & $\frac{1}{2}$ & 0 \\ \hline
\multicolumn{1}{|l|}{$\tan(\alpha)$} & 0 & $\frac{1}{3}\sqrt{3}$ & 1 & $\sqrt{3}$ & -- \\ \hline
\multicolumn{1}{|l|}{$\cot(\alpha)$} & -- & $\sqrt{3}$ & 1 & $\frac{1}{3}\sqrt{3}$ & 0 \\ \hline
\end{tabular}
% \end{array}
\end{equation*}
\end{minipage}}


Expand Down Expand Up @@ -87,10 +103,6 @@










Expand Down

0 comments on commit edc42c2

Please sign in to comment.