188 lines
8.5 KiB
TeX
188 lines
8.5 KiB
TeX
\documentclass[uebung]{../../../lecture}
|
|
|
|
\begin{document}
|
|
|
|
\title{Einführung in die Numerik: Übungsblatt 2}
|
|
\author{Leon Burgard, Christian Merten}
|
|
|
|
\punkte
|
|
|
|
\begin{aufgabe}
|
|
Die relativen Konditionszahlen sind gegeben durch
|
|
\[
|
|
\frac{\partial F_i}{\partial x_j}(x) \frac{x_j}{F_i(x)}
|
|
.\]
|
|
\begin{itemize}
|
|
\item $F(x, y) = x \cdot y$:
|
|
\[
|
|
\frac{\partial F}{\partial x} = y \qquad \frac{\partial F}{\partial y } = x
|
|
.\] Damit folgt
|
|
\[
|
|
k_{11} = y \cdot \frac{x}{x \cdot y} = 1 \qquad k_{12} = x \cdot \frac{y}{x \cdot y} = 1
|
|
.\] Die Multiplikation ist also gut konditioniert.
|
|
\item $F(x, y) = \frac{x}{y}$:
|
|
\begin{align*}
|
|
\frac{\partial F}{\partial x} = \frac{1}{y} &\qquad \frac{\partial F}{\partial y} = - \frac{x}{y^2}
|
|
\intertext{Damit folgt}
|
|
k_{11} = \frac{1}{y} \cdot \frac{x}{\frac{x}{y}} = \frac{x}{y} \frac{y}{x} = 1
|
|
&\qquad
|
|
k_{12} = -\frac{x}{y^2} \cdot \frac{y}{\frac{x}{y}} = - \frac{x}{y^2} \frac{y^2}{x} = -1
|
|
.\end{align*}
|
|
Die Division ist also auch gut konditioniert.
|
|
\item $F(x) = \sqrt{x} $
|
|
\begin{align*}
|
|
\frac{\d F}{\d x} &= \frac{1}{2\sqrt{x} }
|
|
\intertext{Damit folgt}
|
|
k_{11} &= \frac{1}{2\sqrt{x} } \frac{x}{\sqrt{x} } = \frac{1}{2}
|
|
.\end{align*}
|
|
Wurzelziehen ist also ebenfalls gut konditioniert.
|
|
\end{itemize}
|
|
\end{aufgabe}
|
|
|
|
\begin{aufgabe}
|
|
\begin{itemize}
|
|
\item Sei $p \in \N$.
|
|
\begin{align*}
|
|
f(h) &= (ph^2 + h^2)^2 - p^2h^{4} \\
|
|
&= h^{2} \left(2ph + 1\right)
|
|
\intertext{Es ist $2ph + 1 \le 2p + 1$ für $h \le 1$. Also folgt mit $c = 2p + 1$}
|
|
f(h) &= \mathcal{O}(h^2)
|
|
.\end{align*}
|
|
Es ist außerdem
|
|
\[
|
|
\frac{h^2(2ph+1)}{h^{3}} = \frac{2ph^{3} + h^2}{h^{3}} = 2p + \frac{1}{h}
|
|
\xrightarrow{h \searrow 0} \infty
|
|
,\] also ist $f(h) \neq \mathcal{O}(h^{3})$.
|
|
\item Es gilt für $0 < h \le \frac{1}{e}\colon |\ln(h)| \ge 1$. Also folgt
|
|
\[
|
|
|f(h)| = \left|-\frac{h^2}{\ln(h)}\right|
|
|
\le h^2 \implies f(h) = \mathcal{O}(h^2)
|
|
.\] Es ist außerdem mit de l'Hospital
|
|
\begin{align*}
|
|
\lim_{h \to 0} \left| \frac{h^2}{\ln(h)h^{3}} \right|
|
|
= \lim_{h \to 0} \left| \frac{\frac{1}{h}}{\ln(h)} \right| \qquad
|
|
\stackrel{\text{de l'Hospital}}{=}
|
|
\qquad\lim_{h \to 0} \left| \frac{\frac{1}{h^2}}{\frac{1}{h}} \right| = \infty
|
|
,\end{align*} also ist $f(h) \neq \mathcal{O}(h^{3})$.
|
|
\item Es folgt mit Additionstheoremen
|
|
\begin{align*}
|
|
f(h) = \frac{\sin(x+h) - 2\sin(x) + \sin(x-h)}{h^2 + \sin(x)}
|
|
= \frac{2 \sin(x) (\cos(h) - 1)}{h^2} + \sin(x)
|
|
.\end{align*}
|
|
Damit folgt $f(h) = \mathcal{O}(h^2)$, denn mit de l'Hospital ist
|
|
\begin{align*}
|
|
\lim_{h \to 0} \left| \frac{f(h)}{h^2} \right|
|
|
&= \lim_{h \to 0} \left| \frac{2 \sin(x) (\cos h - 1) + h^2 \sin(x)}{h^4} \right| \\
|
|
&= \lim_{h \to 0} \left| \frac{- 2 \sin(x) \sin(h) + 2h \sin(x)}{4h^{3}} \right| \\
|
|
&= \lim_{h \to 0} \left| \frac{-2 \sin(x) \cos(h) + 2 \sin(x)}{12h^{2}} \right| \\
|
|
&= \lim_{h \to 0} \left| \frac{2 \sin(x) \sin(h)}{24h} \right| \\
|
|
&= \lim_{h \to 0} \left| \frac{2 \sin(x) \cos(h)}{24} \right| \\
|
|
&= \left|\frac{\sin(x)}{12} \right| < \infty
|
|
\intertext{Es gilt außerdem $f(h) \neq \mathcal{O}(h^{3})$, denn wiederum mit de l'Hospital ist}
|
|
\lim_{h \to 0} \left| \frac{f(h)}{h^{3}} \right|
|
|
&= \lim_{h \to 0} \left| \frac{2 \sin(x) (\cos h - 1) + h^2 \sin(x)}{h^5} \right| \\
|
|
&= \lim_{h \to 0} \left| \frac{- 2 \sin(x) \sin(h) + 2h \sin(x)}{5h^{4}} \right| \\
|
|
&= \lim_{h \to 0} \left| \frac{-2 \sin(x) \cos(h) + 2 \sin(x)}{20h^{3}} \right| \\
|
|
&= \lim_{h \to 0} \left| \frac{2 \sin(x) \sin(h)}{60h^2} \right| \\
|
|
&= \lim_{h \to 0} \left| \frac{2 \sin(x) \cos(h)}{120h} \right| \\
|
|
&= \infty
|
|
.\end{align*}
|
|
\end{itemize}
|
|
\begin{figure}[h!]
|
|
\begin{tikzpicture}
|
|
\begin{axis}
|
|
\addplot[domain=0:1, samples=50, smooth, green] {3*x^2 + x)^2 - 3^2*x^4};
|
|
\addplot[domain=0:1, samples=50, smooth, red] {x^2 * (2*3 + 1)};
|
|
\legend{$(ph^2 + h)^2 - p^2h^{4}$, $(2p + 1) h^2$}
|
|
\end{axis}
|
|
\end{tikzpicture}
|
|
\begin{tikzpicture}
|
|
\begin{axis}
|
|
\addplot[domain=0:0.5, samples=50, smooth, green] {- (x^2)/(ln(x))};
|
|
\addplot[domain=0:0.5, samples=50, smooth, red] {x^2};
|
|
\legend{$- \frac{h^2}{\ln h}$, $h^2$}
|
|
\end{axis}
|
|
\end{tikzpicture}
|
|
\caption{Links: $f_1(h)$ für $p = 1$ und $c = 7$, Rechts: $f_2(h)$ mit $c = 1$}
|
|
\end{figure}
|
|
\end{aufgabe}
|
|
|
|
\begin{aufgabe}
|
|
Quadratische Ergänzung führt auf die Lösungsformel
|
|
\begin{align*}
|
|
x_{1/2} &= \pm \sqrt{p^2 - 1} + p
|
|
\intertext{Also folgt}
|
|
\frac{\partial F_{1/2}}{\partial p} &= \pm \frac{p}{\sqrt{p^2 - 1} } + 1
|
|
\intertext{Damit ergibt sich}
|
|
k_{11} &= \frac{1 + \sqrt{1 - \frac{1}{p^2}} }{1 - \frac{1}{p^2} + \sqrt{1 - \frac{1}{p^2}} } \\
|
|
k_{21} &= \frac{- 1 + \sqrt{1 - \frac{1}{p^2}} }{-1 + \frac{1}{p^2} + \sqrt{1 - \frac{1}{p^2}} }
|
|
.\end{align*}
|
|
Aus der Lösungsformel folgt zudem $F(p) \in \R^{2} \iff |p| \ge 1 $
|
|
|
|
Das alternativ parametrisierte Problem führt auf die Lösungen
|
|
$x_1 = t$ und $x_2 = \frac{1}{t}$, denn
|
|
\begin{align*}
|
|
t^2 - \frac{t^2 + 1}{t} t + 1 &= t^2 - t^2 - 1 + 1 = 0 \\
|
|
\frac{1}{t^2} - \frac{t^2 + 1}{t} \frac{1}{t} + 1 &= \frac{1}{t^2} - 1 - \frac{1}{t^2} + 1 = 0
|
|
.\end{align*}
|
|
Damit folgt
|
|
\begin{align*}
|
|
\frac{\partial F_{1}}{\partial t} &= 1 \\
|
|
\frac{\partial F_2}{\partial t} &= - \frac{1}{t^2}
|
|
\intertext{Damit folgt}
|
|
k_{11} &= 1 \frac{t}{t} = 1 \\
|
|
k_{21} &= -\frac{1}{t^2} \frac{t}{\frac{1}{t}} = - \frac{t^2}{t^2} = - 1
|
|
.\end{align*}
|
|
Im ersten Fall wird das Problem schlecht konditioniert, wenn $|p| < 1$ wird,
|
|
allerdings hat dann die Gleichung keine
|
|
reellen Lösungen mehr. Im zweiten Fall, ist das Problem immer gut konditioniert.
|
|
\end{aufgabe}
|
|
|
|
\begin{aufgabe}
|
|
Es sei $I := [0,1]$ und
|
|
\[
|
|
f\colon I \to I, \quad f(x) := \begin{cases}
|
|
2x & \text{falls } x \in [0, 0.5) \\
|
|
2 - 2x & \text{falls } x \in [0.5, 1]
|
|
\end{cases}
|
|
.\] Die Folge $(x_i)_{i\in\N}$ sei für ein $x_0 \in I$ definiert als
|
|
\[
|
|
x_i = f(x_{i-1})
|
|
.\]
|
|
\begin{enumerate}[a)]
|
|
\item siehe \textit{zeltabbildung.cpp}
|
|
\item Beh.: Sei $x_0 = (0.m_1 \ldots m_r)_{2} \in [0,1]$ eine Festkommazahl der Binärdarstellung
|
|
mit höchstens $r$ Nachkommastellen ungleich $0$. Dann gilt $x_{r+1} = 0$.
|
|
\begin{proof}
|
|
Beweis per Induktion nach $r$.
|
|
|
|
Für $r = 0$: trivial $f(0) = 0 \implies x_1 = 0$.
|
|
|
|
Sei Beh. gegeben für ein $r \in \N_0$. Dann sei
|
|
\[
|
|
x_0 = (0.m_1\ldots m_{r+1})_2 \in [0,1]
|
|
.\] mit $m_{r+1} \neq 0$ (sonst bereits gezeigt).
|
|
|
|
Falls $x_0 \in [0, 0.5)$. Dann ist $m_1 = 0$ und
|
|
\[
|
|
x_1 = f(x_0) = 2x_0 = 2 \sum_{i=1}^{r+1} m_i 2^{-i}
|
|
= \sum_{i=1}^{r+1} m_i 2^{-i+1}
|
|
= (0.\widetilde{m}_{1}\ldots\widetilde{m}_{r+1})_2
|
|
.\] Da $m_{r+1} = 1_{2} \implies \widetilde{m}_{r+1} = 0_{2}$. Also
|
|
hat $x_1$ höchstens $r$ Stellen ungleich $0$. Wende I.V. auf $x_1$ an. Damit folgt
|
|
$x_{r+1} = 0$.
|
|
|
|
Falls $x_0 \in [0.5, 1]$. Dann ist $m_1 = 1_{2}$ und
|
|
\[
|
|
x_1 = f(x_0) = 2 - 2x_0 = 2 - 2 \sum_{i=1}^{n} m_i 2^{-i}
|
|
= 2 - \sum_{i=1}^{n} m_i 2^{-i + 1} = (0.\widetilde{m}_{1}\ldots\widetilde{m}_{r+1})_2
|
|
.\] Da $m_{r+1} = 1_{2} \implies \widetilde{m}_{r+1} = 0_{2}$. Also
|
|
hat $x_1$ höchstens $r$ Stellen ungleich $0$. Wende I.V. auf $x_1$ an. Damit folgt
|
|
$x_{r+1} = 0$.
|
|
\end{proof}
|
|
\item siehe \textit{zeltabbildung.cpp}
|
|
\end{enumerate}
|
|
\end{aufgabe}
|
|
|
|
\end{document}
|