Für Vorlesungen, bitte die Webseite verwenden. https://flavigny.de/lecture
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

210 řádky
10KB

  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. &\Vert x \Vert_2 \le \Vert x \Vert_1 \le \sqrt{n} \Vert x \Vert_2 \\
  51. &\Vert x \Vert_\infty \le \Vert x \Vert_2 \le \sqrt{n} \Vert x \Vert_\infty
  52. .\end{align*}
  53. Die anderen Kombinationen folgen durch Multiplikation mit $\frac{1}{\sqrt{n}}$.
  54. Für $n \to \infty$ ist $\sqrt{n} \to \infty$.
  55. \end{enumerate}
  56. \end{aufgabe}
  57. \begin{aufgabe}
  58. \[
  59. f(x) = \frac{1 - \cos x}{x}
  60. .\]
  61. \begin{enumerate}[a)]
  62. \item Es ist
  63. \[
  64. \frac{\d f}{\d x} = \frac{x \sin x - 1 + \cos x}{x^2}
  65. .\] Damit folgt
  66. \[
  67. k = \frac{x \sin x - 1 + \cos x}{1 - \cos x}
  68. .\] Für $x = \frac{\pi}{2} + 2\pi k$ ist
  69. \[
  70. k = \frac{x - 1}{1} = x - 1 \xrightarrow{k \to \infty} \infty
  71. ,\] also $f$ schlecht konditioniert.
  72. \item Für die Rundungsfehler der einzelnen Operationen gilt für
  73. $|e_1|, |e_2|, |e_3| < \text{eps}$
  74. \begin{align*}
  75. a &= \cos(x) (1 + e_1) \\
  76. b &= (1 - a)(1+e_2) \stackrel{\cdot}{=} 1 - \cos x + e_2 - (e_1 + e_2) \cos x
  77. \intertext{Damit folgt}
  78. f_a(x) &\stackrel{\cdot}{=} \frac{1 - \cos x + e_2 - (e_1 + e_2 \cos x) + e_3 - e_3 \cos(x)}{x}
  79. \intertext{Also}
  80. \frac{f_a(x) - f(x)}{f(x)} &\stackrel{\cdot }{=}
  81. - \frac{\cos x }{1 - \cos x} e_1 + e_2 + e_3
  82. .\end{align*}
  83. Wegen $\frac{\cos x}{1 - \cos x} \xrightarrow{x \to 0} \infty \gg k$ ist
  84. dieser Algorithmus numerisch instabil.
  85. \item Durch Umformungen, lässt sich die auslöschende Subtraktion $1 - \cos x$ vermeiden:
  86. \[
  87. f(x) = \frac{\sin^2(x)}{x + x \cos(x)}
  88. .\] Mit $|e_1|, |e_2|, |e_3|, |e_4|, |e_5|, |e_6| < \text{eps}$ folgt für die
  89. Rundungsfehler:
  90. \begin{align*}
  91. a &= \sin(x)(1 + e_1) \\
  92. b &= a^2(1+e_2) \stackrel{\cdot }{=} \sin^2(x) + \sin^2(x)(2 e_1 + e_2) \\
  93. c &= \cos(x) (1 + e_3) \\
  94. d &= x c (1+e_4) \stackrel{\cdot }{=} x \cos x + (e_3 + e_4) x \cos(x) \\
  95. e &= x + d (1 + e_5) \stackrel{\cdot }{=} x + x \cos(x) + (e_3 + e_4 + e_5)x \cos(x) + e_4 x
  96. \intertext{Damit folgt}
  97. f_a(x) &\stackrel{\cdot }{=}
  98. \frac{\sin^2(x) + \sin^2(x) (2 e_1 + e_2) + e_6 \sin^2(x)}
  99. {x + x \cos(x) + (e_3 + e_4 + e_5)x \cos (x) + e_4 x}
  100. \intertext{Also gilt}
  101. \frac{f_a(x) - f(x)}{f(x)}
  102. &\stackrel{\cdot }{=} \frac{2 e_1 + e_2 + e_6 - e_4 - (e_2 + e_3) \frac{\cos(x)}{1 + \cos(x)}}
  103. {1 + e_4 + (e_2 + e_3) \frac{\cos(x)}{1 + \cos(x)}}
  104. \; \stackrel{x \ll 1}{\approx} \;
  105. \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}
  106. .\end{align*}
  107. Wegen $1 + e_4 + \frac{1}{2} e_2 + \frac{1}{2}e_3 > 1$, folgt, dass die Verstärkungsfaktoren
  108. der Rundungsfehler für $x \ll 1$ nahe $1$ sind, also ist der Algorithmus numerisch stabil.
  109. \end{enumerate}
  110. \end{aufgabe}
  111. \begin{aufgabe}
  112. \begin{enumerate}[a)]
  113. \item Die Matrix ist eine $N-1\times N-1$ Matrix, da eine Gleichung für jeden Knoten
  114. bis auf den Referenzknoten existiert.
  115. \item Jeder Knoten hat entweder 2 (Ecken), 3 (Außenkanten) oder 4 (im Inneren) ein oder
  116. ausgehende Kanten. Die mit der Pumpe verbundenen Knoten, haben jeweils eine Kante mehr.
  117. Die zugehörigen Zeilen haben damit immer $1$ $+$ Anzahl der verbundenen Kanten Einträge ungleich
  118. $0$.
  119. \item Die Matrix ist quadratisch und hat vollen Rang und hat damit eine eindeutige Lösung, wenn
  120. $q_p \neq 0$.
  121. \item
  122. \begin{align*}
  123. \begin{pmatrix}
  124. 3 & -1 & 0 & -1 & 0 & 0 & 0 & 0 \\
  125. -1 & 2 & 0 & 0 & -1 & 0 & 0 & 0 \\
  126. 0 & 0 & 3 & -1 & 0 & -1 & 0 & 0 \\
  127. -1 & 0 & -1 & 4 & -1 & 0 & -1 & 0 \\
  128. 0 & -1 & 0 & -1 & 3 & 0 & 0 & -1 \\
  129. 0 & 0 & -1 & 0 & 0 & 2 & -1 & 0 \\
  130. 0 & 0 & 0 & -1 & 0 & -1 & 3 & -1 \\
  131. 0 & 0 & 0 & 0 & -1 & 0 & -1 & 2
  132. \end{pmatrix}
  133. \begin{pmatrix} p_1 \\ p_2 \\ p_3 \\ p_4 \\ p_5 \\ p_6 \\ p_7 \\ p_8 \end{pmatrix}
  134. =
  135. \begin{pmatrix} 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ q_p \end{pmatrix}
  136. .\end{align*}
  137. \end{enumerate}
  138. \end{aufgabe}
  139. \begin{aufgabe}
  140. \begin{enumerate}[a)]
  141. \item Sei $x \in \R^{n} \setminus \{0\}$. Dann ist
  142. \begin{align*}
  143. (A_s x, x)_2 &= \left( \frac{1}{2}Ax + \frac{1}{2}A^{T}x, x \right)_2
  144. = \frac{1}{2} (Ax, x) + \frac{1}{2} (A^{T}x, x)
  145. = \frac{1}{2} x^{T}A^{T}x + \frac{1}{2} x^{T}Ax \\
  146. &= \frac{1}{2} x^{T} A^{T} x + \frac{1}{2} \left( x^{T} (Ax) \right)^{T}
  147. = \frac{1}{2} x^{T}A^{T}x + \frac{1}{2} x^{T}A^{T}x
  148. = x^{T}A^{T}x
  149. = (Ax, x)_2
  150. .\end{align*}
  151. Damit folgt die Behauptung.
  152. \item Sei $X \subseteq \{1, 2, \ldots, n\} $ beliebig und $A_X$ nicht positiv definit. Dann
  153. ex. ein $\widetilde{x} \in \R^{|x|} \setminus \{0\} $ mit $A_X x \le 0$. Dann
  154. ergänze $\widetilde{x}$ zu $x \in \R^{n}$ mit
  155. \[
  156. x_i := \begin{cases}
  157. x_i & i \in X \\
  158. 0 & \text{sonst}
  159. \end{cases}
  160. .\] Dann ist $x^{T}Ax = \widetilde{x}^{T}A_X\widetilde{x} \le 0$, also ist $A$ nicht positiv
  161. definit.
  162. \item Mit (a) folgt: $A$ g.d. positiv definit, wenn
  163. \[
  164. A_S = \begin{pmatrix} 2 & - \frac{\alpha}{2} \\ - \frac{\alpha}{2} & 2 \end{pmatrix}
  165. .\] positiv definit ist. Dies ist mit dem Hauptminorenkriterium für symmetrische
  166. Matrizen g.d der Fall, wenn
  167. \begin{align*}
  168. &\begin{gmatrix}[v]
  169. 2 & - \frac{\alpha}{2} \\ - \frac{\alpha}{2} & 2
  170. \end{gmatrix}
  171. = 4 - \frac{\alpha^2}{4} > 0
  172. \\
  173. \iff &16 - \alpha^2 > 0 \\
  174. \iff &|\alpha| < 4
  175. .\end{align*}
  176. \item Zunächst ist $\overline{A}^{T}
  177. = \overline{\overline{H}^{T}H}^{T} = \left( H^{T}\overline{H} \right)^{T}
  178. = \overline{H}^{T} H = A$. Also ist $A$ hermitesch.
  179. Sei nun $A$ positiv definit. Dann sind, wegen $A$ hermitesch, alle Eigenwerte reell
  180. und positiv. Also gilt $\text{det}(A) > 0$, damit $\text{Rg}(A) = n$. Also
  181. \[
  182. n = \text{Rg}(A) = \text{Rg}(\overline{H}^{T}H) \le \min \{\text{Rg}(\overline{H}^{T}), H\}
  183. = \text{Rg}(H) \le \min \{n, m\} = n
  184. .\] Also $\text{Rg}(H) = n$.
  185. Sei nun $\text{Rg}(H) = n$. Es ist $A$ semidefinit, denn $\forall x \in \mathbb{C}^{n}$ gilt
  186. \[
  187. (\overline{H}^{T}Hx, x)_2 = x^{T}\left( \overline{H}^{T}H \right)^{T} \overline{x}
  188. = x^{T}H^{T}\overline{H}\overline{x} = \left( Hx \right)^{T} \overline{\left( Hx \right) } \ge 0
  189. \qquad (*)
  190. .\] Mit dem Rangsatz ist außerdem:
  191. \[
  192. n = \text{dim}(\mathbb{C}^{n}) = \text{Rg}(H)
  193. + \text{dim } \text{ker } H = n + \text{dim } \text{ker } H \implies \text{dim } \text{ker } H = 0
  194. .\] Also folgt $\forall x \in \mathbb{C}^{n} \setminus \{0\}$:
  195. $Hx \neq 0$, also folgt mit ($*$) $A$ positiv definit.
  196. \end{enumerate}
  197. \end{aufgabe}
  198. \end{document}