mirror of
https://github.com/janishutz/eth-summaries.git
synced 2025-11-25 02:24:23 +00:00
[NumCS] Restructure
This commit is contained in:
Binary file not shown.
@@ -62,15 +62,28 @@
|
|||||||
% ╭────────────────────────────────────────────────╮
|
% ╭────────────────────────────────────────────────╮
|
||||||
% │ Main content │
|
% │ Main content │
|
||||||
% ╰────────────────────────────────────────────────╯
|
% ╰────────────────────────────────────────────────╯
|
||||||
|
|
||||||
|
% ── Introduction ────────────────────────────────────────────────────
|
||||||
\newsection
|
\newsection
|
||||||
\section{Einführung}
|
\section{Einführung}
|
||||||
\input{parts/introduction/rounding-errors.tex}
|
\input{parts/00_introduction/00_rounding-errors.tex}
|
||||||
\input{parts/introduction/time-complexity.tex}
|
\input{parts/00_introduction/01_time-complexity.tex}
|
||||||
\input{parts/introduction/matrix-multiplication.tex}
|
\input{parts/00_introduction/02_matrix-multiplication.tex}
|
||||||
|
|
||||||
|
% ── polynomial interpolation ────────────────────────────────────────
|
||||||
|
\newsection
|
||||||
|
\section{Polynomiale Interpolation}
|
||||||
|
\input{parts/01_interpolation/00_polynomial/00_intro.tex}
|
||||||
|
\input{parts/01_interpolation/00_polynomial/01_monome.tex}
|
||||||
|
\input{parts/01_interpolation/00_polynomial/02_newton-basis.tex}
|
||||||
|
\input{parts/01_interpolation/00_polynomial/03_barzycentric-formula.tex}
|
||||||
|
\input{parts/01_interpolation/00_polynomial/04_chebychev-interpolation.tex}
|
||||||
|
|
||||||
|
|
||||||
\input{parts/interpolation.tex}
|
% ── trigonometric interpolation ─────────────────────────────────────
|
||||||
\input{parts/fourier.tex}
|
\newsection
|
||||||
|
\section{Trigonometrische Interpolation}
|
||||||
|
\input{parts/01_interpolation/01_trigonometric/00_intro.tex}
|
||||||
|
|
||||||
|
|
||||||
\end{document}
|
\end{document}
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
Bei der Interpolation versuchen wir eine Funktion $\tilde{f}$ durch eine Menge an Datenpunkten einer Funktion $f$ zu finden.\\
|
||||||
|
Die $x_i$ heissen Stützstellen/Knoten, für welche $\tilde{f}(x_i) = y_i$ gelten soll. (Interpolationsbedingung)
|
||||||
|
\begin{align*}
|
||||||
|
\begin{bmatrix}
|
||||||
|
x_0 & x_1 & \ldots & x_n \\
|
||||||
|
y_0 & y_1 & \ldots & y_n
|
||||||
|
\end{bmatrix},
|
||||||
|
\quad x_i, y_i \in \mathbb{R}
|
||||||
|
\end{align*}
|
||||||
|
|
||||||
|
Normalerweise stellt $f$ eine echte Messung dar, d.h. macht es Sinn anzunehmen dass $f$ glatt ist.
|
||||||
|
|
||||||
|
Die informelle Problemstellung oben lässt sich durch Vektorräume formalisieren:
|
||||||
|
|
||||||
|
$f \in \mathcal{V}$, wobei $\mathcal{V}$ ein Vektorraum mit $\dim(\mathcal{V}) = \infty$ ist. \\
|
||||||
|
Wir suchen d.h. $\tilde{f}$ in einem Unterraum $\mathcal{V}_n$ mit endlicher $\dim(\mathcal{V}_n) = n$.
|
||||||
|
Sei $B_n = \{b_1,\ldots,b_n\}$ eine Basis für $\mathcal{V}_n$.
|
||||||
|
Dann lässt sich der Bezug zwischen $f$ und $\tilde{f} = f_n(x)$ so ausdrücken:
|
||||||
|
\begin{align*}
|
||||||
|
f(x) \approx f_n(x) = \sum_{j=1}^n \alpha_j b_j(x)
|
||||||
|
\end{align*}
|
||||||
|
|
||||||
|
\setcounter{all}{2}
|
||||||
|
\inlineremark Unterräume $\mathcal{V}_n$ existieren nicht nur für Polynome, wir beschränken uns aber auf $b_j(x) = x^{i-1}$.
|
||||||
|
Andere Möglichkeiten: $b_j = \cos((j-1)\cos^-1(x))$ \textit{(Chebyshev)} oder $b_j = e^{i2\pi j x}$ \textit{(Trigonometrisch)}
|
||||||
|
|
||||||
|
% FIXME: This could go into a special "maths theory" section -> GOOD
|
||||||
|
|
||||||
|
\setcounter{all}{5}
|
||||||
|
\fancytheorem{Peano} $f$ stetig $\implies \exists p(x)$ welches $f$ in $||\cdot||_\infty$ beliebig gut approximiert.
|
||||||
|
|
||||||
|
\setcounter{all}{7}
|
||||||
|
% FIXME: \inlinedef \textit{(Monom)} = \fancydef{Monom} (exactly the definition of fancy* macros)
|
||||||
|
\fancydef{Raum der Polynome} $\mathcal{P}_k := \{ x \mapsto \sum_{j = 0}^{k} \alpha_j x^j \}$
|
||||||
|
\inlinedef \textit{(Monom)} $f: x \mapsto x^k$
|
||||||
|
|
||||||
|
\fancytheorem{Eigenschaft von $\mathcal{P}_k$} $\mathcal{P}_k$ ist ein Vektorraum mit $\dim(\mathcal{P}_k) = k+1$.
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
\subsection{Monombasis}
|
||||||
|
|
||||||
|
\fancytheorem{Eindeutigkeit} $p(x) \in \mathcal(P)_k$ ist durch $k+1$ Punkte $y_i = p(x_i)$ eindeutig bestimmt.
|
||||||
|
|
||||||
|
Dieser Satz kann direkt angewendet werden zur Interpolation, in dem man $p(x)$ als Gleichungssystem schreibt.
|
||||||
|
% FIXME: It'd probably be better to use align* environment in general, it's much more flexible
|
||||||
|
% FIXME: Having a new line before $$ (or align* environment for that matter) makes the space between text and math env larger!
|
||||||
|
$$
|
||||||
|
p_n(x) = \alpha_n x^n + \cdots + \alpha_0 x^0 \quad \iff \quad
|
||||||
|
\underbrace{
|
||||||
|
\begin{bmatrix}
|
||||||
|
1 & x_0 & \cdots & x_0^n \\
|
||||||
|
1 & x_1 & \cdots & x_1^n \\
|
||||||
|
\vdots & \vdots & \ddots & \vdots \\
|
||||||
|
1 & x_n & \cdots & x_n^n \\
|
||||||
|
\end{bmatrix}
|
||||||
|
}_\text{Vandermonde Matrix}
|
||||||
|
\begin{bmatrix}
|
||||||
|
\alpha_0 \\
|
||||||
|
\alpha_1 \\
|
||||||
|
\vdots \\
|
||||||
|
\alpha_n
|
||||||
|
\end{bmatrix}
|
||||||
|
=
|
||||||
|
\begin{bmatrix}
|
||||||
|
y_0 \\
|
||||||
|
y_1 \\
|
||||||
|
\vdots \\
|
||||||
|
y_n
|
||||||
|
\end{bmatrix}
|
||||||
|
$$
|
||||||
|
|
||||||
|
Um $\alpha_i$ zu finden ist die Vandermonde Matrix unbrauchbar, da die Matrix schlecht konditioniert ist.
|
||||||
|
|
||||||
|
Zur Auswertung von $p(x)$ kann man direkt die Matrix-darstellung nutzen, oder effizienter:
|
||||||
|
|
||||||
|
\fancydef{Horner Schema} $p(x) = (x \ldots x ( x (\alpha_n x + \alpha_{n-1}) + \ldots + \alpha_1) + \alpha_0)$
|
||||||
|
|
||||||
|
\fhlc{Cyan}{In NumPy} \verb|polyfit| liefert die direkte Auswertung, \verb|polyval| wertet Polynome via Horner-Schema aus. (Gemäss Script, in der Praxis sind diese Funktionen \verb|deprecated|)
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
\subsection{Newton Basis}
|
||||||
|
Session: Herleitung unwichtig, konzentrieren auf Funktion/Eigenschaften von Newton/Lagrange.
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
\subsection{Baryzentrische Formel}
|
||||||
|
Session: Gemäss TA sehr gut beschrieben im alten Script
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
\subsection{Chebychev Interpolation}
|
||||||
|
|
||||||
|
Session: Chebyshev Pol. : Abzisse = Extrema, Knoten = Nullstellen
|
||||||
|
|
||||||
|
Lecture: Orthogonalität ist eine wichtige Eigenschaft: Siehe Lecture notes (handgeschr.) für Veranschaulichung. \\
|
||||||
|
$\rightarrow$ Orth. liefert die Koeff. ohne Rechenaufwand.
|
||||||
|
|
||||||
|
Lecture: Clenshaw-Alg. relativ zentral (Taschenrechner nutzen diesen intern)
|
||||||
@@ -1,6 +1,3 @@
|
|||||||
\newsection
|
|
||||||
\section{Trigonometrische Interpolation}
|
|
||||||
|
|
||||||
Lecture: Wir besitzen nicht das komplette Vorwissen in der Analysis für dieses Kapitel, d.h. wird totales Verständnis nicht
|
Lecture: Wir besitzen nicht das komplette Vorwissen in der Analysis für dieses Kapitel, d.h. wird totales Verständnis nicht
|
||||||
|
|
||||||
Lecture: Intuitiv wird Fourier-Trans. zur Kompression genutzt, z.b. jpg format.
|
Lecture: Intuitiv wird Fourier-Trans. zur Kompression genutzt, z.b. jpg format.
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
\newsection
|
|
||||||
\section{Polynomiale Interpolation}
|
|
||||||
Bei der Interpolation versuchen wir eine Funktion $\tilde{f}$ durch eine Menge an Datenpunkten einer Funktion $f$ zu finden.\\
|
|
||||||
Die $x_i$ heissen Stützstellen/Knoten, für welche $\tilde{f}(x_i) = y_i$ gelten soll. (Interpolationsbedingung)
|
|
||||||
|
|
||||||
$$
|
|
||||||
\begin{bmatrix}
|
|
||||||
x_0 & x_1 & \ldots & x_n \\
|
|
||||||
y_0 & y_1 & \ldots & y_n
|
|
||||||
\end{bmatrix},
|
|
||||||
\quad x_i, y_i \in \mathbb{R}
|
|
||||||
$$
|
|
||||||
|
|
||||||
Normalerweise stellt $f$ eine echte Messung dar, d.h. macht es Sinn anzunehmen dass $f$ glatt ist.
|
|
||||||
|
|
||||||
Die informelle Problemstellung oben lässt sich durch Vektorräume formalisieren:
|
|
||||||
|
|
||||||
$f \in \mathcal{V}$, wobei $\mathcal{V}$ ein Vektorraum mit $\dim(\mathcal{V}) = \infty$ ist. \\
|
|
||||||
Wir suchen d.h. $\tilde{f}$ in einem Unterraum $\mathcal{V}_n$ mit endlicher $\dim(\mathcal{V}_n) = n$.
|
|
||||||
Sei $B_n = \{b_1,\ldots,b_n\}$ eine Basis für $\mathcal{V}_n$.
|
|
||||||
Dann lässt sich der Bezug zwischen $f$ und $\tilde{f} = f_n(x)$ so ausdrücken:
|
|
||||||
|
|
||||||
$$f(x) \approx f_n(x) = \sum_{j=1}^n \alpha_j b_j(x)$$
|
|
||||||
|
|
||||||
\setcounter{all}{2}
|
|
||||||
\inlineremark Unterräume $\mathcal{V}_n$ existieren nicht nur für Polynome, wir beschränken uns aber auf $b_j(x) = x^{i-1}$.
|
|
||||||
Andere Möglichkeiten: $b_j = \cos((j-1)\cos^-1(x))$ \textit{(Chebyshev)} oder $b_j = e^{i2\pi j x}$ \textit{(Trigonometrisch)}
|
|
||||||
|
|
||||||
% This could go into a special "maths theory" section
|
|
||||||
|
|
||||||
\setcounter{all}{5}
|
|
||||||
\fancytheorem{Peano} $f$ stetig $\implies \exists p(x)$ welches $f$ in $||\cdot||_\infty$ beliebig gut approximiert.
|
|
||||||
|
|
||||||
\setcounter{all}{7}
|
|
||||||
\fancydef{Raum der Polynome} $\mathcal{P}_k := \{ x \mapsto \sum_{j = 0}^{k} \alpha_j x^j \}$ \inlinedef \textit{(Monom)} $f: x \mapsto x^k$
|
|
||||||
|
|
||||||
\fancytheorem{Eigensch. von $\mathcal{P}_k$} $\mathcal{P}_k$ ist ein Vektorraum mit $\dim(\mathcal{P}_k) = k+1$.
|
|
||||||
|
|
||||||
\subsection{Monombasis}
|
|
||||||
|
|
||||||
\fancytheorem{Eindeutigkeit} $p(x) \in \mathcal(P)_k$ ist durch $k+1$ Punkte $y_i = p(x_i)$ eindeutig bestimmt.
|
|
||||||
|
|
||||||
Dieser Satz kann direkt angewendet werden zur Interpolation, in dem man $p(x)$ als Gleichungssystem schreibt.
|
|
||||||
|
|
||||||
$$
|
|
||||||
p_n(x) = \alpha_n x^n + \cdots + \alpha_0 x^0 \quad \iff \quad
|
|
||||||
\underbrace{
|
|
||||||
\begin{bmatrix}
|
|
||||||
1 & x_0 & \cdots & x_0^n \\
|
|
||||||
1 & x_1 & \cdots & x_1^n \\
|
|
||||||
\vdots & \vdots & \ddots & \vdots \\
|
|
||||||
1 & x_n & \cdots & x_n^n \\
|
|
||||||
\end{bmatrix}
|
|
||||||
}_\text{Vandermonde Matrix}
|
|
||||||
\begin{bmatrix}
|
|
||||||
\alpha_0 \\
|
|
||||||
\alpha_1 \\
|
|
||||||
\vdots \\
|
|
||||||
\alpha_n
|
|
||||||
\end{bmatrix}
|
|
||||||
=
|
|
||||||
\begin{bmatrix}
|
|
||||||
y_0 \\
|
|
||||||
y_1 \\
|
|
||||||
\vdots \\
|
|
||||||
y_n
|
|
||||||
\end{bmatrix}
|
|
||||||
$$
|
|
||||||
|
|
||||||
Um $\alpha_i$ zu finden ist die Vandermonde Matrix unbrauchbar, da die Matrix schlecht konditioniert ist.
|
|
||||||
|
|
||||||
Zur Auswertung von $p(x)$ kann man direkt die Matrix-darstellung nutzen, oder effizienter:
|
|
||||||
|
|
||||||
\fancydef{Horner Schema} $p(x) = (x \ldots x ( x (\alpha_n x + \alpha_{n-1}) + \ldots + \alpha_1) + \alpha_0)$
|
|
||||||
|
|
||||||
\fhlc{Cyan}{In NumPy} \verb|polyfit| liefert die direkte Auswertung, \verb|polyval| wertet Polynome via Horner-Schema aus. (Gemäss Script, in der Praxis sind diese Funktionen \verb|deprecated|)
|
|
||||||
|
|
||||||
\subsection{Newton Basis}
|
|
||||||
Session: Herleitung unwichtig, konzentrieren auf Funktion/Eigenschaften von Newton/Lagrange.
|
|
||||||
|
|
||||||
\subsection{Baryzentrische Formel}
|
|
||||||
Session: Gemäss TA sehr gut beschrieben im alten Script
|
|
||||||
|
|
||||||
\subsection{Chebychev Interpolation}
|
|
||||||
|
|
||||||
Session: Chebyshev Pol. : Abzisse = Extrema, Knoten = Nullstellen
|
|
||||||
|
|
||||||
Lecture: Orthogonalität ist eine wichtige Eigenschaft: Siehe Lecture notes (handgeschr.) für Veranschaulichung. \\
|
|
||||||
$\rightarrow$ Orth. liefert die Koeff. ohne Rechenaufwand.
|
|
||||||
|
|
||||||
Lecture: Clenshaw-Alg. relativ zentral (Taschenrechner nutzen diesen intern)
|
|
||||||
Reference in New Issue
Block a user