mirror of
https://github.com/janishutz/eth-summaries.git
synced 2025-11-25 02:24:23 +00:00
40 lines
1.4 KiB
TeX
40 lines
1.4 KiB
TeX
\subsubsection{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)$
|
|
|
|
\innumpy liefert \verb|polyfit| die direkte Auswertung, \verb|polyval| wertet Polynome via Horner-Schema aus. (Gemäss Script, in der Praxis sind diese Funktionen \verb|deprecated|)
|