Für Vorlesungen, bitte die Webseite verwenden. https://flavigny.de/lecture
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

218 lines
11KB

  1. \documentclass[uebung]{../../../lecture}
  2. \usepackage{gauss}
  3. \begin{document}
  4. \author{Leon Burgard, Christian Merten}
  5. \title{Einführung in die Numerik: Übungsblatt 3}
  6. \punkte
  7. \begin{aufgabe}
  8. \begin{enumerate}[a)]
  9. \item Einheitssphäre
  10. \begin{figure}[h!]
  11. \centering
  12. \begin{tikzpicture}[scale=2]
  13. \draw (-1.5,0) edge[-latex] (1.5,0) (0,-1.5) edge[-latex] (0,1.5);
  14. \draw (1, 0.1) -- (1, -0.1);
  15. \node at (1, -0.2) {$1$};
  16. \draw (0.1, 1) -- (-0.1, 1);
  17. \node at (-0.2, 1) {$1$};
  18. \draw[red] (0,0) circle (1);
  19. \draw[blue, rotate around={45:(0,0)}] (-1/1.41,-1/1.41) rectangle (1/1.41, 1/1.41);
  20. \draw[green, fill] (1,0) circle (0.02);
  21. \draw[green, fill] (0,1) circle (0.02);
  22. \draw[green, fill] (-1,0) circle (0.02);
  23. \draw[green, fill] (0,-1) circle (0.02);
  24. \node at (1.5, -0.2) {$x_1$};
  25. \node at (-0.2, 1.5) {$x_2$};
  26. \end{tikzpicture}
  27. \caption{Blau: $\Vert \cdot \Vert_1$, Rot: $\Vert \cdot \Vert_2$, Grün:
  28. $\Vert \cdot \Vert_{\infty}$}
  29. \end{figure}
  30. \item Sei $x \in \R^{n}$ beliebig. Dann ist
  31. \begin{align*}
  32. \Vert x \Vert_1 = \sum_{k=1}^{n} |x_k \cdot 1|
  33. \quad &\stackrel{\text{C.S.U.}}{\le } \quad
  34. \Vert x \Vert_2 \cdot \Vert 1 \Vert_2 = \sqrt{n} \Vert x \Vert_2 \\
  35. \Vert x \Vert_2 = \sqrt{\sum_{k=1}^{n} |x_k|^2}
  36. &\le \sqrt{\sum_{k=1}^{n} \Vert x_{\infty}\Vert^2}
  37. = \sqrt{n \Vert x\Vert_\infty^2} = \sqrt{n} \Vert x \Vert_{\infty}
  38. .\end{align*}
  39. Außerdem ist
  40. \begin{align*}
  41. &\Vert x \Vert_1 = \sum_{k=1}^{n} |x_k|
  42. = \Vert x \Vert_2 \left( \sum_{k=1}^{n} \underbrace{\frac{|x_k|}{\Vert x \Vert_2}}_{\le 1} \right)
  43. \ge \Vert x \Vert_2 \left( \sum_{k=1}^{n} \frac{|x_k|^{2}}{\Vert x \Vert_2^2} \right)
  44. = \Vert x \Vert_2 \frac{\Vert x \Vert_2^2}{\Vert x \Vert_2^2} = \Vert x \Vert_2 \\
  45. &\Vert x \Vert_2 = \sqrt{\sum_{k=1}^{n} |x_k|^2} \ge \sqrt{\Vert x \Vert_{\infty}^2}
  46. = \Vert x \Vert_{\infty}
  47. .\end{align*}
  48. Damit folgt
  49. \begin{align*}
  50. \frac{1}{\sqrt{n}} \Vert x \Vert_1 \le &\Vert x \Vert_2 \le \Vert x \Vert_1 \\
  51. \frac{1}{\sqrt{n}} \Vert x \Vert_1 \le &\Vert x \Vert_{\infty} \le \Vert x \Vert_1 \\
  52. \Vert x \Vert_2 \le &\Vert x \Vert_1 \le \sqrt{n} \Vert x \Vert_2 \\
  53. \frac{1}{\sqrt{n}} \Vert x \Vert_2 \le &\Vert x \Vert_{\infty} \le \Vert x \Vert_2 \\
  54. \Vert x \Vert_\infty \le \Vert x \Vert_2 \le &\Vert x \Vert_1 \le \sqrt{n} \Vert x \Vert_2
  55. \le n \Vert x \Vert_\infty \\
  56. \Vert x \Vert_\infty \le &\Vert x \Vert_2 \le \sqrt{n} \Vert x \Vert_\infty
  57. .\end{align*}
  58. Für $n = 1$ sind alle Abschätzungen scharf, denn dann ist
  59. $\Vert x \Vert_1 = \Vert x \Vert_2 = \Vert x \Vert_{\infty}$ und $\sqrt{n} = \frac{1}{\sqrt{n}} = 1$.
  60. Es gilt $n \xrightarrow{n \to \infty} \infty$, $\sqrt{n} \xrightarrow{n \to \infty} \infty$ und
  61. $\frac{1}{\sqrt{n}} \xrightarrow{n \to \infty} 0$.
  62. \end{enumerate}
  63. \end{aufgabe}
  64. \begin{aufgabe}
  65. \[
  66. f(x) = \frac{1 - \cos x}{x}
  67. .\]
  68. \begin{enumerate}[a)]
  69. \item Es ist
  70. \[
  71. \frac{\d f}{\d x} = \frac{x \sin x - 1 + \cos x}{x^2}
  72. .\] Damit folgt
  73. \[
  74. k = \frac{x \sin x - 1 + \cos x}{1 - \cos x}
  75. .\] Für $x = \frac{\pi}{2} + 2\pi k$ ist
  76. \[
  77. k = \frac{x - 1}{1} = x - 1 \xrightarrow{k \to \infty} \infty
  78. ,\] also $f$ schlecht konditioniert.
  79. \item Für die Rundungsfehler der einzelnen Operationen gilt für
  80. $|e_1|, |e_2|, |e_3| < \text{eps}$
  81. \begin{align*}
  82. a &= \cos(x) (1 + e_1) \\
  83. b &= (1 - a)(1+e_2) \stackrel{\cdot}{=} 1 - \cos x + e_2 - (e_1 + e_2) \cos x
  84. \intertext{Damit folgt}
  85. f_a(x) &\stackrel{\cdot}{=} \frac{1 - \cos x + e_2 - (e_1 + e_2 \cos x) + e_3 - e_3 \cos(x)}{x}
  86. \intertext{Also}
  87. \frac{f_a(x) - f(x)}{f(x)} &\stackrel{\cdot }{=}
  88. - \frac{\cos x }{1 - \cos x} e_1 + e_2 + e_3
  89. .\end{align*}
  90. Wegen $\frac{\cos x}{1 - \cos x} \xrightarrow{x \to 0} \infty \gg k$ ist
  91. dieser Algorithmus numerisch instabil.
  92. \item Durch Umformungen, lässt sich die auslöschende Subtraktion $1 - \cos x$ vermeiden:
  93. \[
  94. f(x) = \frac{\sin^2(x)}{x + x \cos(x)}
  95. .\] Mit $|e_1|, |e_2|, |e_3|, |e_4|, |e_5|, |e_6| < \text{eps}$ folgt für die
  96. Rundungsfehler:
  97. \begin{align*}
  98. a &= \sin(x)(1 + e_1) \\
  99. b &= a^2(1+e_2) \stackrel{\cdot }{=} \sin^2(x) + \sin^2(x)(2 e_1 + e_2) \\
  100. c &= \cos(x) (1 + e_3) \\
  101. d &= x c (1+e_4) \stackrel{\cdot }{=} x \cos x + (e_3 + e_4) x \cos(x) \\
  102. e &= x + d (1 + e_5) \stackrel{\cdot }{=} x + x \cos(x) + (e_3 + e_4 + e_5)x \cos(x) + e_4 x
  103. \intertext{Damit folgt}
  104. f_a(x) &\stackrel{\cdot }{=}
  105. \frac{\sin^2(x) + \sin^2(x) (2 e_1 + e_2) + e_6 \sin^2(x)}
  106. {x + x \cos(x) + (e_3 + e_4 + e_5)x \cos (x) + e_4 x}
  107. \intertext{Also gilt}
  108. \frac{f_a(x) - f(x)}{f(x)}
  109. &\stackrel{\cdot }{=} \frac{2 e_1 + e_2 + e_6 - e_4 - (e_2 + e_3) \frac{\cos(x)}{1 + \cos(x)}}
  110. {1 + e_4 + (e_2 + e_3) \frac{\cos(x)}{1 + \cos(x)}}
  111. \; \stackrel{x \ll 1}{\approx} \;
  112. \frac{\frac{3}{2} e_1 + e_2 + e_6 - e_4 - \frac{1}{2}e_3}{1 + e_4 + \frac{1}{2} e_2 + \frac{1}{2}e_3}
  113. .\end{align*}
  114. Wegen $1 + e_4 + \frac{1}{2} e_2 + \frac{1}{2}e_3 > 1$, folgt, dass die Verstärkungsfaktoren
  115. der Rundungsfehler für $x \ll 1$ nahe $1$ sind, also ist der Algorithmus numerisch stabil.
  116. \end{enumerate}
  117. \end{aufgabe}
  118. \begin{aufgabe}
  119. \begin{enumerate}[a)]
  120. \item Die Matrix ist eine $N-1\times N-1$ Matrix, da eine Gleichung für jeden Knoten
  121. bis auf den Referenzknoten existiert.
  122. \item Jeder Knoten hat entweder 2 (Ecken), 3 (Außenkanten) oder 4 (im Inneren) ein oder
  123. ausgehende Kanten. Die mit der Pumpe verbundenen Knoten, haben jeweils eine Kante mehr.
  124. Die zugehörigen Zeilen haben damit immer $1$ $+$ Anzahl der verbundenen Kanten Einträge ungleich
  125. $0$.
  126. \item Die Matrix ist quadratisch und hat vollen Rang und hat damit eine eindeutige Lösung, wenn
  127. $q_p \neq 0$.
  128. \item
  129. \begin{align*}
  130. \begin{pmatrix}
  131. 3 & -1 & 0 & -1 & 0 & 0 & 0 & 0 \\
  132. -1 & 2 & 0 & 0 & -1 & 0 & 0 & 0 \\
  133. 0 & 0 & 3 & -1 & 0 & -1 & 0 & 0 \\
  134. -1 & 0 & -1 & 4 & -1 & 0 & -1 & 0 \\
  135. 0 & -1 & 0 & -1 & 3 & 0 & 0 & -1 \\
  136. 0 & 0 & -1 & 0 & 0 & 2 & -1 & 0 \\
  137. 0 & 0 & 0 & -1 & 0 & -1 & 3 & -1 \\
  138. 0 & 0 & 0 & 0 & -1 & 0 & -1 & 2
  139. \end{pmatrix}
  140. \begin{pmatrix} p_1 \\ p_2 \\ p_3 \\ p_4 \\ p_5 \\ p_6 \\ p_7 \\ p_8 \end{pmatrix}
  141. =
  142. \begin{pmatrix} 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ q_p \end{pmatrix}
  143. .\end{align*}
  144. \end{enumerate}
  145. \end{aufgabe}
  146. \begin{aufgabe}
  147. \begin{enumerate}[a)]
  148. \item Sei $x \in \R^{n} \setminus \{0\}$. Dann ist
  149. \begin{align*}
  150. (A_s x, x)_2 &= \left( \frac{1}{2}Ax + \frac{1}{2}A^{T}x, x \right)_2
  151. = \frac{1}{2} (Ax, x) + \frac{1}{2} (A^{T}x, x)
  152. = \frac{1}{2} x^{T}A^{T}x + \frac{1}{2} x^{T}Ax \\
  153. &= \frac{1}{2} x^{T} A^{T} x + \frac{1}{2} \left( x^{T} (Ax) \right)^{T}
  154. = \frac{1}{2} x^{T}A^{T}x + \frac{1}{2} x^{T}A^{T}x
  155. = x^{T}A^{T}x
  156. = (Ax, x)_2
  157. .\end{align*}
  158. Damit folgt die Behauptung.
  159. \item Sei $X \subseteq \{1, 2, \ldots, n\} $ beliebig und $A_X$ nicht positiv definit. Dann
  160. ex. ein $\widetilde{x} \in \R^{|x|} \setminus \{0\} $ mit $A_X x \le 0$. Dann
  161. ergänze $\widetilde{x}$ zu $x \in \R^{n}$ mit
  162. \[
  163. x_i := \begin{cases}
  164. x_i & i \in X \\
  165. 0 & \text{sonst}
  166. \end{cases}
  167. .\] Dann ist $x^{T}Ax = \widetilde{x}^{T}A_X\widetilde{x} \le 0$, also ist $A$ nicht positiv
  168. definit.
  169. \item Mit (a) folgt: $A$ g.d. positiv definit, wenn
  170. \[
  171. A_S = \begin{pmatrix} 2 & - \frac{\alpha}{2} \\ - \frac{\alpha}{2} & 2 \end{pmatrix}
  172. .\] positiv definit ist. Dies ist mit dem Hauptminorenkriterium für symmetrische
  173. Matrizen g.d der Fall, wenn
  174. \begin{align*}
  175. &\begin{gmatrix}[v]
  176. 2 & - \frac{\alpha}{2} \\ - \frac{\alpha}{2} & 2
  177. \end{gmatrix}
  178. = 4 - \frac{\alpha^2}{4} > 0
  179. \\
  180. \iff &16 - \alpha^2 > 0 \\
  181. \iff &|\alpha| < 4
  182. .\end{align*}
  183. \item Zunächst ist $\overline{A}^{T}
  184. = \overline{\overline{H}^{T}H}^{T} = \left( H^{T}\overline{H} \right)^{T}
  185. = \overline{H}^{T} H = A$. Also ist $A$ hermitesch.
  186. Sei nun $A$ positiv definit. Dann sind, wegen $A$ hermitesch, alle Eigenwerte reell
  187. und positiv. Also gilt $\text{det}(A) > 0$, damit $\text{Rg}(A) = n$. Also
  188. \[
  189. n = \text{Rg}(A) = \text{Rg}(\overline{H}^{T}H) \le \min \{\text{Rg}(\overline{H}^{T}), H\}
  190. = \text{Rg}(H) \le \min \{n, m\} = n
  191. .\] Also $\text{Rg}(H) = n$.
  192. Sei nun $\text{Rg}(H) = n$. Es ist $A$ semidefinit, denn $\forall x \in \mathbb{C}^{n}$ gilt
  193. \[
  194. (\overline{H}^{T}Hx, x)_2 = x^{T}\left( \overline{H}^{T}H \right)^{T} \overline{x}
  195. = x^{T}H^{T}\overline{H}\overline{x} = \left( Hx \right)^{T} \overline{\left( Hx \right) } \ge 0
  196. \qquad (*)
  197. .\] Mit dem Rangsatz ist außerdem:
  198. \[
  199. n = \text{dim}(\mathbb{C}^{n}) = \text{Rg}(H)
  200. + \text{dim } \text{ker } H = n + \text{dim } \text{ker } H \implies \text{dim } \text{ker } H = 0
  201. .\] Also folgt $\forall x \in \mathbb{C}^{n} \setminus \{0\}$:
  202. $Hx \neq 0$, also folgt mit ($*$) $A$ positiv definit.
  203. \end{enumerate}
  204. \end{aufgabe}
  205. \end{document}