Compare commits
146
Commits
cd2df03e83
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
104be68bf7
|
||
|
|
b90d3dd001
|
||
|
|
fe2412987f
|
||
|
|
0a85566e56
|
||
|
|
c2628bde37
|
||
|
|
90b01a491f
|
||
|
|
52a55a6c6f
|
||
|
|
4c32de62c4
|
||
|
|
b9afb52c4b
|
||
|
|
6bdb35767e
|
||
|
|
1544563802
|
||
|
|
f929db6df0
|
||
|
|
94e329d376
|
||
|
|
2b4c8ec637
|
||
|
|
f570713948
|
||
|
|
25f7eb4ea3
|
||
|
|
9ed7216425
|
||
|
|
f5957abd5b
|
||
|
|
59b1b8ce78
|
||
|
|
8810bdeb33
|
||
|
|
98e48b8d88
|
||
|
|
09cab8543e
|
||
|
|
f6e36c24b0
|
||
|
|
f5a077e53f
|
||
|
|
ba6b781a24
|
||
|
|
e8b33bfa2f | ||
|
|
01573c3de7 | ||
|
|
e79ca0fe16 | ||
|
|
92c0ac3814 | ||
|
|
3b712b98ec | ||
|
|
3b31abde5a | ||
|
|
f8ee1c4a1c | ||
|
|
d643acabbc | ||
|
|
775955dcd2 | ||
|
|
d37d5f9696 | ||
|
|
301a97829b | ||
|
|
cf39433131 | ||
|
|
1b3657879f | ||
|
|
9aab12b331 | ||
|
|
81453e5c4e | ||
|
|
f7a07d8b31 | ||
|
|
0fe0e42864 | ||
|
|
3d16368ee4 | ||
|
|
388117592f | ||
|
|
54a1df7cc8 | ||
|
|
7e9a0070e5 | ||
|
|
f4bad896f8 | ||
|
|
33dbcda19c | ||
|
|
7a36de698e | ||
|
|
552cfa83c1 | ||
|
|
5772764794 | ||
|
|
e5b939b142 | ||
|
|
95fad8026c | ||
|
|
99e08764e6 | ||
|
|
886c71ec07 | ||
|
|
e161be79ed | ||
|
|
8e829fadf9 | ||
|
|
e728704863 | ||
|
|
adf219d08c | ||
|
|
4933d7ee75 | ||
|
|
9bac160bae | ||
|
|
4580acee85 | ||
|
|
9967a7fc4d | ||
|
|
1a0cd4733b | ||
|
|
1d1b42c00e | ||
|
|
d582f8801f | ||
|
|
8e834eb41f | ||
|
|
ae3841f6a9 | ||
|
|
2b6a10a1f7 | ||
|
|
3de0def6c2 | ||
|
|
7b50aaedff | ||
|
|
6c2a57d911 | ||
|
|
e5b7419f09 | ||
|
|
b9742ffbd1 | ||
|
|
992c88dcfe | ||
|
|
bff3b9eef2 | ||
|
|
ac1b85daaf | ||
|
|
015ca916cc | ||
|
|
0b4be4857b | ||
|
|
7b5f0cfdaf | ||
|
|
82c3e84806 | ||
|
|
9cb5baebbd | ||
|
|
602c3a6a70 | ||
|
|
a65678b607 | ||
|
|
57ae585ceb | ||
|
|
034889ad74 | ||
|
|
b1b226cbe3 | ||
|
|
cb8766a110 | ||
|
|
012e1448e3 | ||
|
|
dd772ecd32 | ||
|
|
0d72df1a5d | ||
|
|
c7b87e4ab0 | ||
|
|
89a83c224e | ||
|
|
068c5b0194 | ||
|
|
5d22826528 | ||
|
|
9167ec3555 | ||
|
|
415d805224 | ||
|
|
39ed8f0f32 | ||
|
|
13ca03cc89 | ||
|
|
bec3bb7239 | ||
|
|
a420764b95 | ||
|
|
7fbc21a8e7 | ||
|
|
9004a1d860 | ||
|
|
eb51265783 | ||
|
|
6ca0206956 | ||
|
|
6ed3475fc7 | ||
|
|
fd52ccb6d1 | ||
|
|
2a268a07f8 | ||
|
|
b459e6ecd5 | ||
|
|
d636dfeb3f | ||
|
|
be6de1a7b3 | ||
|
|
70c1818ff1 | ||
|
|
4bd5670ddd | ||
|
|
09b9453cde | ||
|
|
997f2545ec | ||
|
|
0fbddc15c8 | ||
|
|
addd2f84d9 | ||
|
|
52fcda66cb | ||
|
|
0558a13676 | ||
|
|
a855e75413 | ||
|
|
4c49f705f1 | ||
|
|
61b60c6880 | ||
|
|
23b7e13f81 | ||
|
|
61a346e724 | ||
|
|
76c67aeca0 | ||
|
|
b6e5344942 | ||
|
|
36252d8fe0 | ||
|
|
c3c80e350d | ||
|
|
2a6c90cd6a | ||
|
|
6e9e162e3e | ||
|
|
6719e094c9 | ||
|
|
a1624d6c29 | ||
|
|
db4a3ea3d6 | ||
|
|
2b4ca0ef55 | ||
|
|
c9f5cb5030 | ||
|
|
c2a50e8b7c | ||
|
|
59f84f350d | ||
|
|
76521eb5fe | ||
|
|
9926fe88f1 | ||
|
|
743fd904bd | ||
|
|
aa50550776 | ||
|
|
154cef4ed6 | ||
|
|
0c6d5e130e | ||
|
|
333cd04e58 | ||
|
|
6da7b66d57 | ||
|
|
ca439d8b58 |
@@ -10,3 +10,12 @@
|
|||||||
*.fdb_latexmk
|
*.fdb_latexmk
|
||||||
*.toc
|
*.toc
|
||||||
*.dat
|
*.dat
|
||||||
|
*.autosave.xopp
|
||||||
|
*.xopp~
|
||||||
|
*.nav
|
||||||
|
*.out
|
||||||
|
*.snm
|
||||||
|
*.bbl
|
||||||
|
*.blg
|
||||||
|
*.table
|
||||||
|
*.gnuplot
|
||||||
|
|||||||
+15
@@ -4,3 +4,18 @@
|
|||||||
[submodule "sose2020/num/hdnum"]
|
[submodule "sose2020/num/hdnum"]
|
||||||
path = sose2020/num/hdnum
|
path = sose2020/num/hdnum
|
||||||
url = https://parcomp-git.iwr.uni-heidelberg.de/Teaching/hdnum
|
url = https://parcomp-git.iwr.uni-heidelberg.de/Teaching/hdnum
|
||||||
|
[submodule "ws2020/theo/lectures"]
|
||||||
|
path = ws2020/theo/lectures
|
||||||
|
url = https://git.flavigny.de/christian/theo-lecture
|
||||||
|
[submodule "ws2020/wtheo/uebungen"]
|
||||||
|
path = ws2020/wtheo/uebungen
|
||||||
|
url = https://git.flavigny.de/christian/wtheo-zettel
|
||||||
|
[submodule "ws2022/rav/lecture"]
|
||||||
|
path = ws2022/rav/lecture
|
||||||
|
url = git@git.mathi.uni-heidelberg.de:cmerten/ravlecture
|
||||||
|
[submodule "ws2023/groupschemes"]
|
||||||
|
path = ws2023/groupschemes
|
||||||
|
url = https://git.flavigny.de/christian/groupschemes-lecture
|
||||||
|
[submodule "ws2023/groupschemes-lecture"]
|
||||||
|
path = ws2023/groupschemes-lecture
|
||||||
|
url = https://git.flavigny.de/christian/groupschemes-lecture
|
||||||
|
|||||||
+29
-2
@@ -27,6 +27,17 @@
|
|||||||
\RequirePackage{environ}
|
\RequirePackage{environ}
|
||||||
|
|
||||||
\usetikzlibrary{quotes, angles}
|
\usetikzlibrary{quotes, angles}
|
||||||
|
\pgfplotsset{
|
||||||
|
compat=1.15,
|
||||||
|
default 2d plot/.style={%
|
||||||
|
grid=both,
|
||||||
|
minor tick num=4,
|
||||||
|
grid style={line width=.1pt, draw=gray!10},
|
||||||
|
major grid style={line width=.2pt,draw=gray!50},
|
||||||
|
axis lines=middle,
|
||||||
|
enlargelimits={abs=0.2}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
|
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
|
||||||
\DeclareOption{uebung}{
|
\DeclareOption{uebung}{
|
||||||
@@ -52,7 +63,7 @@
|
|||||||
\theoremstyle{definition}
|
\theoremstyle{definition}
|
||||||
\newmdtheoremenv{satz}{Satz}[section]
|
\newmdtheoremenv{satz}{Satz}[section]
|
||||||
\newmdtheoremenv{lemma}[satz]{Lemma}
|
\newmdtheoremenv{lemma}[satz]{Lemma}
|
||||||
\newmdtheoremenv{korrolar}[satz]{Korrolar}
|
\newmdtheoremenv{korollar}[satz]{Korollar}
|
||||||
\newmdtheoremenv{definition}[satz]{Definition}
|
\newmdtheoremenv{definition}[satz]{Definition}
|
||||||
|
|
||||||
\newtheorem{bsp}[satz]{Beispiel}
|
\newtheorem{bsp}[satz]{Beispiel}
|
||||||
@@ -151,6 +162,22 @@
|
|||||||
% contradiction
|
% contradiction
|
||||||
\newcommand{\contr}{\text{\Large\lightning}}
|
\newcommand{\contr}{\text{\Large\lightning}}
|
||||||
|
|
||||||
|
% disjoint unions: provides cupdot and bigcupdot
|
||||||
|
\makeatletter
|
||||||
|
\def\moverlay{\mathpalette\mov@rlay}
|
||||||
|
\def\mov@rlay#1#2{\leavevmode\vtop{%
|
||||||
|
\baselineskip\z@skip \lineskiplimit-\maxdimen
|
||||||
|
\ialign{\hfil$\m@th#1##$\hfil\cr#2\crcr}}}
|
||||||
|
\newcommand{\charfusion}[3][\mathord]{
|
||||||
|
#1{\ifx#1\mathop\vphantom{#2}\fi
|
||||||
|
\mathpalette\mov@rlay{#2\cr#3}
|
||||||
|
}
|
||||||
|
\ifx#1\mathop\expandafter\displaylimits\fi}
|
||||||
|
\makeatother
|
||||||
|
|
||||||
|
\newcommand{\cupdot}{\charfusion[\mathbin]{\cup}{\cdot}}
|
||||||
|
\newcommand{\bigcupdot}{\charfusion[\mathop]{\bigcup}{\cdot}}
|
||||||
|
|
||||||
\ExplSyntaxOn
|
\ExplSyntaxOn
|
||||||
|
|
||||||
% S-tackrelcompatible ALIGN environment
|
% S-tackrelcompatible ALIGN environment
|
||||||
@@ -213,7 +240,7 @@
|
|||||||
}
|
}
|
||||||
% replace all relations with align characters (&) and add the needed padding
|
% replace all relations with align characters (&) and add the needed padding
|
||||||
\regex_replace_all:nnN
|
\regex_replace_all:nnN
|
||||||
{ (\c{iff}&|&\c{iff}|\c{impliedby}&|&\c{impliedby}|\c{implies}&|&\c{implies}|\c{approx}&|&\c{approx}|\c{equiv}&|&\c{equiv}|=&|&=|\c{le}&|&\c{le}|\c{ge}&|&\c{ge}|&\c{stackrel}{.*?}{.*?}|\c{stackrel}{.*?}{.*?}&|&\c{neq}|\c{neq}&) }
|
{ (<&|&<|\c{iff}&|&\c{iff}|\c{impliedby}&|&\c{impliedby}|\c{implies}&|&\c{implies}|\c{approx}&|&\c{approx}|\c{equiv}&|&\c{equiv}|=&|&=|\c{le}&|&\c{le}|\c{ge}&|&\c{ge}|&\c{stackrel}{.*?}{.*?}|\c{stackrel}{.*?}{.*?}&|&\c{neq}|\c{neq}&) }
|
||||||
{ \c{kern} \u{l_tmp_dim_needed} \1 \c{kern} \u{l_tmp_dim_needed} }
|
{ \c{kern} \u{l_tmp_dim_needed} \1 \c{kern} \u{l_tmp_dim_needed} }
|
||||||
\l__lec_text_tl
|
\l__lec_text_tl
|
||||||
\l__lec_text_tl
|
\l__lec_text_tl
|
||||||
|
|||||||
@@ -0,0 +1,249 @@
|
|||||||
|
\ProvidesClass{notes}
|
||||||
|
\LoadClass[a4paper]{amsart}
|
||||||
|
|
||||||
|
\RequirePackage[utf8]{inputenc}
|
||||||
|
\RequirePackage[T1]{fontenc}
|
||||||
|
\RequirePackage{textcomp}
|
||||||
|
\RequirePackage[german, english]{babel}
|
||||||
|
\RequirePackage{amsmath, amssymb, amsthm}
|
||||||
|
\RequirePackage{mdframed}
|
||||||
|
\RequirePackage{tikz-cd}
|
||||||
|
\RequirePackage{fancyhdr}
|
||||||
|
\RequirePackage{geometry}
|
||||||
|
\RequirePackage{import}
|
||||||
|
\RequirePackage{pdfpages}
|
||||||
|
%\RequirePackage{transparent}
|
||||||
|
\RequirePackage{xcolor}
|
||||||
|
\RequirePackage{array}
|
||||||
|
\RequirePackage[shortlabels]{enumitem}
|
||||||
|
\RequirePackage{tikz}
|
||||||
|
\RequirePackage{pgfplots}
|
||||||
|
\RequirePackage{listings}
|
||||||
|
\RequirePackage{mathtools}
|
||||||
|
\RequirePackage{forloop}
|
||||||
|
\RequirePackage{totcount}
|
||||||
|
\RequirePackage{calc}
|
||||||
|
\RequirePackage{wasysym}
|
||||||
|
\RequirePackage{environ}
|
||||||
|
\RequirePackage{hyperref}
|
||||||
|
\RequirePackage{graphicx}
|
||||||
|
|
||||||
|
\usetikzlibrary{quotes, angles}
|
||||||
|
\pgfplotsset{
|
||||||
|
compat=1.15,
|
||||||
|
default 2d plot/.style={%
|
||||||
|
grid=both,
|
||||||
|
minor tick num=4,
|
||||||
|
grid style={line width=.1pt, draw=gray!10},
|
||||||
|
major grid style={line width=.2pt,draw=gray!50},
|
||||||
|
axis lines=middle,
|
||||||
|
enlargelimits={abs=0.2}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
\usetikzlibrary{quotes, angles, math}
|
||||||
|
\pgfplotsset{
|
||||||
|
compat=1.15,
|
||||||
|
axis lines = middle,
|
||||||
|
ticks = none,
|
||||||
|
%default 2d plot/.style={%
|
||||||
|
% ticks=none,
|
||||||
|
% axis lines = middle,
|
||||||
|
% grid=both,
|
||||||
|
% minor tick num=4,
|
||||||
|
% grid style={line width=.1pt, draw=gray!10},
|
||||||
|
% major grid style={line width=.2pt,draw=gray!50},
|
||||||
|
% axis lines=middle,
|
||||||
|
% enlargelimits={abs=0.2}
|
||||||
|
}
|
||||||
|
|
||||||
|
\newcounter{curve}
|
||||||
|
|
||||||
|
\NewDocumentCommand{\algebraiccurve}{ O{} O{$#5 = 0$} O{-4:4} O{-4:4} m }{
|
||||||
|
\addplot[id=curve\arabic{curve}, raw gnuplot, smooth, #1] function{%
|
||||||
|
f(x,y) = #5;
|
||||||
|
set xrange [#3];
|
||||||
|
set yrange [#4];
|
||||||
|
set view 0,0;
|
||||||
|
set isosample 1000,1000;
|
||||||
|
set size square;
|
||||||
|
set cont base;
|
||||||
|
set cntrparam levels incre 0,0.1,0;
|
||||||
|
unset surface;
|
||||||
|
splot f(x,y)
|
||||||
|
};
|
||||||
|
\addlegendentry{#2}
|
||||||
|
\stepcounter{curve}
|
||||||
|
}%
|
||||||
|
|
||||||
|
% PAGE GEOMETRY
|
||||||
|
\geometry{
|
||||||
|
top=1.2in,bottom=1.4in,left=1.3in,right=1.3in,
|
||||||
|
bottom=35mm
|
||||||
|
}
|
||||||
|
|
||||||
|
% PARAGRAPH no indent but skip
|
||||||
|
%\setlength{\parskip}{3mm}
|
||||||
|
%\setlength{\parindent}{0mm}
|
||||||
|
|
||||||
|
\newtheorem{satz}{Proposition}[section]
|
||||||
|
\newtheorem{theorem}[satz]{Theorem}
|
||||||
|
\newtheorem{lemma}[satz]{Lemma}
|
||||||
|
\newtheorem{korollar}[satz]{Corollary}
|
||||||
|
\theoremstyle{definition}
|
||||||
|
\newtheorem{definition}[satz]{Definition}
|
||||||
|
\newtheorem*{definition*}{Definition}
|
||||||
|
|
||||||
|
%\theoremstyle{definition}
|
||||||
|
%\newmdtheoremenv{satz}{Satz}[section]
|
||||||
|
%\newmdtheoremenv{lemma}[satz]{Lemma}
|
||||||
|
%\newmdtheoremenv{korollar}[satz]{Korollar}
|
||||||
|
%\newmdtheoremenv{definition}[satz]{Definition}
|
||||||
|
|
||||||
|
\newtheorem{bsp}[satz]{Example}
|
||||||
|
\newtheorem{bem}[satz]{Remark}
|
||||||
|
\newtheorem{aufgabe}{Exercise}
|
||||||
|
|
||||||
|
% enable aufgaben counting
|
||||||
|
\regtotcounter{aufgabe}
|
||||||
|
|
||||||
|
% temporary calculation counter
|
||||||
|
\newcounter{var}
|
||||||
|
|
||||||
|
\newcommand{\N}{\mathbb{N}}
|
||||||
|
\newcommand{\R}{\mathbb{R}}
|
||||||
|
\newcommand{\Z}{\mathbb{Z}}
|
||||||
|
\newcommand{\Q}{\mathbb{Q}}
|
||||||
|
\newcommand{\C}{\mathbb{C}}
|
||||||
|
|
||||||
|
% HEADERS
|
||||||
|
|
||||||
|
\pagestyle{headings}
|
||||||
|
|
||||||
|
\newcommand{\incfig}[1]{%
|
||||||
|
\def\svgwidth{\columnwidth}
|
||||||
|
\import{./figures/}{#1.pdf_tex}
|
||||||
|
}
|
||||||
|
\pdfsuppresswarningpagegroup=1
|
||||||
|
|
||||||
|
% code listings, define style
|
||||||
|
\lstdefinestyle{mystyle}{
|
||||||
|
commentstyle=\color{gray},
|
||||||
|
keywordstyle=\color{blue},
|
||||||
|
numberstyle=\tiny\color{gray},
|
||||||
|
stringstyle=\color{black},
|
||||||
|
basicstyle=\ttfamily\footnotesize,
|
||||||
|
breakatwhitespace=false,
|
||||||
|
breaklines=true,
|
||||||
|
captionpos=b,
|
||||||
|
keepspaces=true,
|
||||||
|
numbers=left,
|
||||||
|
numbersep=5pt,
|
||||||
|
showspaces=false,
|
||||||
|
showstringspaces=false,
|
||||||
|
showtabs=false,
|
||||||
|
tabsize=2
|
||||||
|
}
|
||||||
|
|
||||||
|
% activate my colour style
|
||||||
|
\lstset{style=mystyle}
|
||||||
|
|
||||||
|
% better stackrel
|
||||||
|
\let\oldstackrel\stackrel
|
||||||
|
\renewcommand{\stackrel}[2]{%
|
||||||
|
\oldstackrel{\mathclap{#1}}{#2}
|
||||||
|
}%
|
||||||
|
|
||||||
|
% integral d sign
|
||||||
|
\makeatletter \renewcommand\d[2][]{\ensuremath{%
|
||||||
|
\,\mathrm{d}^{#1}#2\@ifnextchar^{}{\@ifnextchar\d{}{\,}}}}
|
||||||
|
\makeatother
|
||||||
|
|
||||||
|
% contradiction
|
||||||
|
\newcommand{\contr}{\text{\Large\lightning}}
|
||||||
|
|
||||||
|
% disjoint unions: provides cupdot and bigcupdot
|
||||||
|
\makeatletter
|
||||||
|
\def\moverlay{\mathpalette\mov@rlay}
|
||||||
|
\def\mov@rlay#1#2{\leavevmode\vtop{%
|
||||||
|
\baselineskip\z@skip \lineskiplimit-\maxdimen
|
||||||
|
\ialign{\hfil$\m@th#1##$\hfil\cr#2\crcr}}}
|
||||||
|
\newcommand{\charfusion}[3][\mathord]{
|
||||||
|
#1{\ifx#1\mathop\vphantom{#2}\fi
|
||||||
|
\mathpalette\mov@rlay{#2\cr#3}
|
||||||
|
}
|
||||||
|
\ifx#1\mathop\expandafter\displaylimits\fi}
|
||||||
|
\makeatother
|
||||||
|
|
||||||
|
\newcommand{\cupdot}{\charfusion[\mathbin]{\cup}{\cdot}}
|
||||||
|
\newcommand{\bigcupdot}{\charfusion[\mathop]{\bigcup}{\cdot}}
|
||||||
|
|
||||||
|
\ExplSyntaxOn
|
||||||
|
|
||||||
|
% S-tackrelcompatible ALIGN environment
|
||||||
|
% some might also call it the S-uper ALIGN environment
|
||||||
|
% uses regular expressions to calculate the widest stackrel
|
||||||
|
% to put additional padding on both sides of relation symbols
|
||||||
|
\NewEnviron{salign}
|
||||||
|
{
|
||||||
|
\begin{align}
|
||||||
|
\lec_insert_padding:V \BODY
|
||||||
|
\end{align}
|
||||||
|
}
|
||||||
|
% starred version that does no equation numbering
|
||||||
|
\NewEnviron{salign*}
|
||||||
|
{
|
||||||
|
\begin{align*}
|
||||||
|
\lec_insert_padding:V \BODY
|
||||||
|
\end{align*}
|
||||||
|
}
|
||||||
|
|
||||||
|
% some helper variables
|
||||||
|
\tl_new:N \l__lec_text_tl
|
||||||
|
\seq_new:N \l_lec_stackrels_seq
|
||||||
|
\int_new:N \l_stackrel_count_int
|
||||||
|
\int_new:N \l_idx_int
|
||||||
|
\box_new:N \l_tmp_box
|
||||||
|
\dim_new:N \l_tmp_dim_a
|
||||||
|
\dim_new:N \l_tmp_dim_b
|
||||||
|
\dim_new:N \l_tmp_dim_needed
|
||||||
|
|
||||||
|
% function to insert padding according to widest stackrel
|
||||||
|
\cs_new_protected:Nn \lec_insert_padding:n
|
||||||
|
{
|
||||||
|
\tl_set:Nn \l__lec_text_tl { #1 }
|
||||||
|
% get all stackrels in this align environment
|
||||||
|
\regex_extract_all:nnN { \c{stackrel}{(.*?)}{(.*?)} } { #1 } \l_lec_stackrels_seq
|
||||||
|
% get number of stackrels
|
||||||
|
\int_set:Nn \l_stackrel_count_int { \seq_count:N \l_lec_stackrels_seq }
|
||||||
|
\int_set:Nn \l_idx_int { 1 }
|
||||||
|
\dim_set:Nn \l_tmp_dim_needed { 0pt }
|
||||||
|
% iterate over stackrels
|
||||||
|
\int_while_do:nn { \l_idx_int <= \l_stackrel_count_int }
|
||||||
|
{
|
||||||
|
% calculate width of text
|
||||||
|
\hbox_set:Nn \l_tmp_box {$\seq_item:Nn \l_lec_stackrels_seq { \l_idx_int + 1 }$}
|
||||||
|
\dim_set:Nn \l_tmp_dim_a {\box_wd:N \l_tmp_box}
|
||||||
|
% calculate width of relation symbol
|
||||||
|
\hbox_set:Nn \l_tmp_box {$\seq_item:Nn \l_lec_stackrels_seq { \l_idx_int + 2 }$}
|
||||||
|
\dim_set:Nn \l_tmp_dim_b {\box_wd:N \l_tmp_box}
|
||||||
|
% check if 0.5*(a-b) > minimum padding, if yes updated minimum padding
|
||||||
|
\dim_compare:nNnTF
|
||||||
|
{ 1pt * \dim_ratio:nn { \l_tmp_dim_a - \l_tmp_dim_b } { 2pt } } > { \l_tmp_dim_needed }
|
||||||
|
{ \dim_set:Nn \l_tmp_dim_needed { 1pt * \dim_ratio:nn { \l_tmp_dim_a - \l_tmp_dim_b } { 2pt } } }
|
||||||
|
{ }
|
||||||
|
\quad
|
||||||
|
% increment list index by three, as every stackrel produces three list entries
|
||||||
|
\int_incr:N \l_idx_int
|
||||||
|
\int_incr:N \l_idx_int
|
||||||
|
\int_incr:N \l_idx_int
|
||||||
|
}
|
||||||
|
% replace all relations with align characters (&) and add the needed padding
|
||||||
|
\regex_replace_all:nnN
|
||||||
|
{ (<&|&<|\c{iff}&|&\c{iff}|\c{impliedby}&|&\c{impliedby}|\c{implies}&|&\c{implies}|\c{approx}&|&\c{approx}|\c{equiv}&|&\c{equiv}|=&|&=|\c{le}&|&\c{le}|\c{ge}&|&\c{ge}|&\c{stackrel}{.*?}{.*?}|\c{stackrel}{.*?}{.*?}&|&\c{neq}|\c{neq}&|\c{simeq}&|&\c{simeq}) }
|
||||||
|
{ \c{kern} \u{l_tmp_dim_needed} \1 \c{kern} \u{l_tmp_dim_needed} }
|
||||||
|
\l__lec_text_tl
|
||||||
|
\l__lec_text_tl
|
||||||
|
}
|
||||||
|
\cs_generate_variant:Nn \lec_insert_padding:n { V }
|
||||||
|
\ExplSyntaxOff
|
||||||
@@ -0,0 +1,265 @@
|
|||||||
|
\ProvidesClass{presentation}
|
||||||
|
\LoadClass[notheorems]{beamer}
|
||||||
|
|
||||||
|
\RequirePackage[utf8]{inputenc}
|
||||||
|
\RequirePackage[T1]{fontenc}
|
||||||
|
\RequirePackage{textcomp}
|
||||||
|
\RequirePackage[german]{babel}
|
||||||
|
\RequirePackage{amsmath, amssymb, amsthm}
|
||||||
|
\RequirePackage{mdframed}
|
||||||
|
\RequirePackage{fancyhdr}
|
||||||
|
\RequirePackage{geometry}
|
||||||
|
\RequirePackage{import}
|
||||||
|
\RequirePackage{pdfpages}
|
||||||
|
\RequirePackage{transparent}
|
||||||
|
\RequirePackage{xcolor}
|
||||||
|
\RequirePackage{array}
|
||||||
|
\RequirePackage{tikz}
|
||||||
|
\RequirePackage{pgfplots}
|
||||||
|
%\RequirePackage[nobottomtitles]{titlesec}
|
||||||
|
\RequirePackage{listings}
|
||||||
|
\RequirePackage{mathtools}
|
||||||
|
\RequirePackage{forloop}
|
||||||
|
\RequirePackage{totcount}
|
||||||
|
\RequirePackage{calc}
|
||||||
|
\RequirePackage{wasysym}
|
||||||
|
\RequirePackage{environ}
|
||||||
|
|
||||||
|
\usetikzlibrary{quotes, angles}
|
||||||
|
\pgfplotsset{
|
||||||
|
compat=1.15,
|
||||||
|
default 2d plot/.style={%
|
||||||
|
grid=both,
|
||||||
|
minor tick num=4,
|
||||||
|
grid style={line width=.1pt, draw=gray!10},
|
||||||
|
major grid style={line width=.2pt,draw=gray!50},
|
||||||
|
axis lines=middle,
|
||||||
|
enlargelimits={abs=0.2}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
% beamer specific proof envs without title or qed symbol
|
||||||
|
|
||||||
|
% proof beginning (suppressing qed symbol)
|
||||||
|
\NewEnviron{proofb}
|
||||||
|
{
|
||||||
|
\begin{proof}
|
||||||
|
\renewcommand{\qedsymbol}{}
|
||||||
|
\BODY
|
||||||
|
\end{proof}
|
||||||
|
}
|
||||||
|
|
||||||
|
% proof intermediate (suppressing both)
|
||||||
|
\NewEnviron{proofi}
|
||||||
|
{
|
||||||
|
\renewcommand{\proofname}{\hskip-\labelsep\spacefactor3000 }
|
||||||
|
\begin{proof}
|
||||||
|
\renewcommand{\qedsymbol}{}
|
||||||
|
\BODY
|
||||||
|
\end{proof}
|
||||||
|
}
|
||||||
|
|
||||||
|
% proof end (suppressing title)
|
||||||
|
\NewEnviron{proofe}
|
||||||
|
{
|
||||||
|
\renewcommand{\proofname}{\hskip-\labelsep\spacefactor3000 }
|
||||||
|
\begin{proof}
|
||||||
|
\BODY
|
||||||
|
\end{proof}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
% PARAGRAPH no indent but skip
|
||||||
|
\setlength{\parskip}{3mm}
|
||||||
|
\setlength{\parindent}{0mm}
|
||||||
|
|
||||||
|
\theoremstyle{plain}
|
||||||
|
\newtheorem{satz}{Satz}[section]
|
||||||
|
\newtheorem{lemma}[satz]{Lemma}
|
||||||
|
\newtheorem{korollar}[satz]{Korollar}
|
||||||
|
|
||||||
|
\theoremstyle{definition}
|
||||||
|
\newtheorem{definition}[satz]{Definition}
|
||||||
|
|
||||||
|
\theoremstyle{remark}
|
||||||
|
\newtheorem{bsp}[satz]{Beispiel}
|
||||||
|
\newtheorem{bem}[satz]{Bemerkung}
|
||||||
|
\newtheorem{aufgabe}{Aufgabe}
|
||||||
|
|
||||||
|
% enable aufgaben counting
|
||||||
|
%\regtotcounter{aufgabe}
|
||||||
|
|
||||||
|
% temporary calculation counter
|
||||||
|
\newcounter{var}
|
||||||
|
|
||||||
|
\newcommand{\N}{\mathbb{N}}
|
||||||
|
\newcommand{\R}{\mathbb{R}}
|
||||||
|
\newcommand{\Z}{\mathbb{Z}}
|
||||||
|
\newcommand{\Q}{\mathbb{Q}}
|
||||||
|
\newcommand{\C}{\mathbb{C}}
|
||||||
|
|
||||||
|
% HEADERS
|
||||||
|
|
||||||
|
%\pagestyle{fancy}
|
||||||
|
|
||||||
|
\newcommand{\incfig}[1]{%
|
||||||
|
\def\svgwidth{\columnwidth}
|
||||||
|
\import{./figures/}{#1.pdf_tex}
|
||||||
|
}
|
||||||
|
\pdfsuppresswarningpagegroup=1
|
||||||
|
|
||||||
|
% horizontal rule
|
||||||
|
\newcommand\hr{
|
||||||
|
\noindent\rule[0.5ex]{\linewidth}{0.5pt}
|
||||||
|
}
|
||||||
|
|
||||||
|
% punkte tabelle
|
||||||
|
%\newcommand{\punkte}[1][1]{
|
||||||
|
% \newcounter{k}
|
||||||
|
% \setcounter{k}{#1}
|
||||||
|
% \@punkten{\value{k}}{\totvalue{aufgabe}}
|
||||||
|
% \setcounter{k}{#1-1}
|
||||||
|
% \setcounter{aufgabe}{\value{k}}
|
||||||
|
% \vspace{5mm}
|
||||||
|
%}
|
||||||
|
%
|
||||||
|
%\def\@punkten#1#2{
|
||||||
|
% \newcounter{n}
|
||||||
|
% % create a temporary calculation counter
|
||||||
|
% \setcounter{var}{#2-#1+1}
|
||||||
|
% \begin{tabular}{|c|*{\value{var}}{m{1cm}|}m{1cm}|@{}m{0cm}@{}}
|
||||||
|
% \hline
|
||||||
|
% Aufgabe
|
||||||
|
% \forloop{n}{#1}{\not{\value{n} > #2}}{
|
||||||
|
% & \centering A\then
|
||||||
|
% }
|
||||||
|
% & \centering $\sum$ & \\[5mm] \hline
|
||||||
|
% Punkte
|
||||||
|
% \forloop{n}{#1}{\not{\value{n} > #2}}{
|
||||||
|
% &
|
||||||
|
% }
|
||||||
|
% & & \\[5mm] \hline
|
||||||
|
% \end{tabular}
|
||||||
|
%}
|
||||||
|
|
||||||
|
% code listings, define style
|
||||||
|
\lstdefinestyle{mystyle}{
|
||||||
|
commentstyle=\color{gray},
|
||||||
|
keywordstyle=\color{blue},
|
||||||
|
numberstyle=\tiny\color{gray},
|
||||||
|
stringstyle=\color{black},
|
||||||
|
basicstyle=\ttfamily\footnotesize,
|
||||||
|
breakatwhitespace=false,
|
||||||
|
breaklines=true,
|
||||||
|
captionpos=b,
|
||||||
|
keepspaces=true,
|
||||||
|
numbers=left,
|
||||||
|
numbersep=5pt,
|
||||||
|
showspaces=false,
|
||||||
|
showstringspaces=false,
|
||||||
|
showtabs=false,
|
||||||
|
tabsize=2
|
||||||
|
}
|
||||||
|
|
||||||
|
% activate my colour style
|
||||||
|
\lstset{style=mystyle}
|
||||||
|
|
||||||
|
% better stackrel
|
||||||
|
\let\oldstackrel\stackrel
|
||||||
|
\renewcommand{\stackrel}[2]{%
|
||||||
|
\oldstackrel{\mathclap{#1}}{#2}
|
||||||
|
}%
|
||||||
|
|
||||||
|
% integral d sign
|
||||||
|
\makeatletter \renewcommand\d[2][]{\ensuremath{%
|
||||||
|
\,\mathrm{d}^{#1}#2\@ifnextchar^{}{\@ifnextchar\d{}{\,}}}}
|
||||||
|
\makeatother
|
||||||
|
|
||||||
|
% contradiction
|
||||||
|
\newcommand{\contr}{\text{\Large\lightning}}
|
||||||
|
|
||||||
|
% disjoint unions: provides cupdot and bigcupdot
|
||||||
|
\makeatletter
|
||||||
|
\def\moverlay{\mathpalette\mov@rlay}
|
||||||
|
\def\mov@rlay#1#2{\leavevmode\vtop{%
|
||||||
|
\baselineskip\z@skip \lineskiplimit-\maxdimen
|
||||||
|
\ialign{\hfil$\m@th#1##$\hfil\cr#2\crcr}}}
|
||||||
|
\newcommand{\charfusion}[3][\mathord]{
|
||||||
|
#1{\ifx#1\mathop\vphantom{#2}\fi
|
||||||
|
\mathpalette\mov@rlay{#2\cr#3}
|
||||||
|
}
|
||||||
|
\ifx#1\mathop\expandafter\displaylimits\fi}
|
||||||
|
\makeatother
|
||||||
|
|
||||||
|
\newcommand{\cupdot}{\charfusion[\mathbin]{\cup}{\cdot}}
|
||||||
|
\newcommand{\bigcupdot}{\charfusion[\mathop]{\bigcup}{\cdot}}
|
||||||
|
|
||||||
|
\ExplSyntaxOn
|
||||||
|
|
||||||
|
% S-tackrelcompatible ALIGN environment
|
||||||
|
% some might also call it the S-uper ALIGN environment
|
||||||
|
% uses regular expressions to calculate the widest stackrel
|
||||||
|
% to put additional padding on both sides of relation symbols
|
||||||
|
\NewEnviron{salign}
|
||||||
|
{
|
||||||
|
\begin{align}
|
||||||
|
\lec_insert_padding:V \BODY
|
||||||
|
\end{align}
|
||||||
|
}
|
||||||
|
% starred version that does no equation numbering
|
||||||
|
\NewEnviron{salign*}
|
||||||
|
{
|
||||||
|
\begin{align*}
|
||||||
|
\lec_insert_padding:V \BODY
|
||||||
|
\end{align*}
|
||||||
|
}
|
||||||
|
|
||||||
|
% some helper variables
|
||||||
|
\tl_new:N \l__lec_text_tl
|
||||||
|
\seq_new:N \l_lec_stackrels_seq
|
||||||
|
\int_new:N \l_stackrel_count_int
|
||||||
|
\int_new:N \l_idx_int
|
||||||
|
\box_new:N \l_tmp_box
|
||||||
|
\dim_new:N \l_tmp_dim_a
|
||||||
|
\dim_new:N \l_tmp_dim_b
|
||||||
|
\dim_new:N \l_tmp_dim_needed
|
||||||
|
|
||||||
|
% function to insert padding according to widest stackrel
|
||||||
|
\cs_new_protected:Nn \lec_insert_padding:n
|
||||||
|
{
|
||||||
|
\tl_set:Nn \l__lec_text_tl { #1 }
|
||||||
|
% get all stackrels in this align environment
|
||||||
|
\regex_extract_all:nnN { \c{stackrel}{(.*?)}{(.*?)} } { #1 } \l_lec_stackrels_seq
|
||||||
|
% get number of stackrels
|
||||||
|
\int_set:Nn \l_stackrel_count_int { \seq_count:N \l_lec_stackrels_seq }
|
||||||
|
\int_set:Nn \l_idx_int { 1 }
|
||||||
|
\dim_set:Nn \l_tmp_dim_needed { 0pt }
|
||||||
|
% iterate over stackrels
|
||||||
|
\int_while_do:nn { \l_idx_int <= \l_stackrel_count_int }
|
||||||
|
{
|
||||||
|
% calculate width of text
|
||||||
|
\hbox_set:Nn \l_tmp_box {$\seq_item:Nn \l_lec_stackrels_seq { \l_idx_int + 1 }$}
|
||||||
|
\dim_set:Nn \l_tmp_dim_a {\box_wd:N \l_tmp_box}
|
||||||
|
% calculate width of relation symbol
|
||||||
|
\hbox_set:Nn \l_tmp_box {$\seq_item:Nn \l_lec_stackrels_seq { \l_idx_int + 2 }$}
|
||||||
|
\dim_set:Nn \l_tmp_dim_b {\box_wd:N \l_tmp_box}
|
||||||
|
% check if 0.5*(a-b) > minimum padding, if yes updated minimum padding
|
||||||
|
\dim_compare:nNnTF
|
||||||
|
{ 1pt * \dim_ratio:nn { \l_tmp_dim_a - \l_tmp_dim_b } { 2pt } } > { \l_tmp_dim_needed }
|
||||||
|
{ \dim_set:Nn \l_tmp_dim_needed { 1pt * \dim_ratio:nn { \l_tmp_dim_a - \l_tmp_dim_b } { 2pt } } }
|
||||||
|
{ }
|
||||||
|
\quad
|
||||||
|
% increment list index by three, as every stackrel produces three list entries
|
||||||
|
\int_incr:N \l_idx_int
|
||||||
|
\int_incr:N \l_idx_int
|
||||||
|
\int_incr:N \l_idx_int
|
||||||
|
}
|
||||||
|
% replace all relations with align characters (&) and add the needed padding
|
||||||
|
\regex_replace_all:nnN
|
||||||
|
{ (<&|&<|\c{iff}&|&\c{iff}|\c{impliedby}&|&\c{impliedby}|\c{implies}&|&\c{implies}|\c{approx}&|&\c{approx}|\c{equiv}&|&\c{equiv}|=&|&=|\c{le}&|&\c{le}|\c{ge}&|&\c{ge}|&\c{stackrel}{.*?}{.*?}|\c{stackrel}{.*?}{.*?}&|&\c{neq}|\c{neq}&) }
|
||||||
|
{ \c{kern} \u{l_tmp_dim_needed} \1 \c{kern} \u{l_tmp_dim_needed} }
|
||||||
|
\l__lec_text_tl
|
||||||
|
\l__lec_text_tl
|
||||||
|
}
|
||||||
|
\cs_generate_variant:Nn \lec_insert_padding:n { V }
|
||||||
|
\ExplSyntaxOff
|
||||||
+1
-1
Submodule sose2020/ana/lectures updated: 01365dc0b8...12c3f170e2
Binary file not shown.
@@ -0,0 +1,189 @@
|
|||||||
|
\documentclass[uebung]{../../../lecture}
|
||||||
|
|
||||||
|
\title{Analysis II: Übungsblatt 10}
|
||||||
|
\author{Leon Burgard, Christian Merten}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\punkte
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
\begin{enumerate}[(a)]
|
||||||
|
\item Beh.: $T(t) = (T_0 - T_{a})e^{kt}+T_a$ löst das gegebene AWP.
|
||||||
|
\begin{proof}
|
||||||
|
Löse zunächst homogene DGL durch Trennung der Variablen:
|
||||||
|
\begin{align*}
|
||||||
|
\frac{\mathrm{d}T}{\d t} = kT \implies \frac{\d T}{T} = k \d t
|
||||||
|
\implies T_h = Ae^{kt}
|
||||||
|
.\end{align*}
|
||||||
|
Mit der partikulär Lösung $T_i = T_a$ ($T_a' = 0 = kT_a - kT_a$), folgt:
|
||||||
|
$T(t) = A e^{kt} + T_a$. Mit $T(0) = T_0$ folgt $A = T_0 - T_a$, also
|
||||||
|
insgesamt
|
||||||
|
\[
|
||||||
|
T(t) = (T_0 - T_a) e^{kt} + T_a
|
||||||
|
.\]
|
||||||
|
\end{proof}
|
||||||
|
\item Beh.: Es dauert $60$ Zeiteinheiten.
|
||||||
|
\begin{proof}
|
||||||
|
Mit $k \coloneqq - \frac{\ln 2}{20}$ folgt
|
||||||
|
\[
|
||||||
|
T(20) = (T_0 - T_a) \exp\left(- \frac{\ln 2}{20}\cdot 20\right) + T_a
|
||||||
|
= \frac{1}{2} (T_0 - T_a) + T_a = \frac{1}{2} (T_0 + T_a)
|
||||||
|
.\] Mit $T_0 = 100$ und $T_a = 20$ folgt $T(20) = 60$.
|
||||||
|
Damit folgt nun direkt
|
||||||
|
\begin{align*}
|
||||||
|
T(60) &= (T_0 - T_a) \exp\left( - \frac{\ln 2}{20} \cdot 60 \right) + T_a \\
|
||||||
|
&= (T_0 - T_a) \exp\left( - \ln\left( 2^{3} \right) \right) + T_a \\
|
||||||
|
&= (T_0 - T_a) \frac{1}{8} + T_a \\
|
||||||
|
&= \frac{1}{8} T_0 + \frac{7}{8} T_a
|
||||||
|
.\end{align*}
|
||||||
|
Mit $T_0 = 100$ und $T_a = 20$ folgt $T(60) = 30$.
|
||||||
|
\end{proof}
|
||||||
|
\item Beh.: $\lim_{t \to \infty} T(t) = 20$.
|
||||||
|
\begin{proof}
|
||||||
|
Es gilt da $k < 0$:
|
||||||
|
\[
|
||||||
|
\lim_{t \to \infty} T(t) = \lim_{t \to \infty} ( (T_0 - T_a) \underbrace{e^{kt}}_{\xrightarrow {t \to \infty} 0} + T_a ) = T_a
|
||||||
|
.\] Mit $T_a = 20$ aus (b) folgt die Behauptung.
|
||||||
|
\end{proof}
|
||||||
|
\end{enumerate}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
Beh.: Falls $y_0 = -1$ ist $y(t) = -1$ Lösung der AWA.
|
||||||
|
\begin{proof}
|
||||||
|
Es gilt $y(t_0) = -1 = y_0$ und $y'(t) = 0 = -2t(1 - 1)^2 = -2t(1 + y(t))^2$, $\forall t \in \R$.
|
||||||
|
\end{proof}
|
||||||
|
|
||||||
|
Beh.: Falls $y_0 \neq -1$ ist $y(t) = - \frac{1}{t_0^2 - t^2 - \frac{1}{1 + y_0}} - 1$
|
||||||
|
Lösung der AWA.
|
||||||
|
\begin{proof}
|
||||||
|
Falls $y \neq -1$: Trennung der Variablen:
|
||||||
|
\begin{salign*}
|
||||||
|
\frac{\d y}{\d t} &= -2t (1+y)^2 \\
|
||||||
|
\implies \frac{\d y}{(1+y)^2} &= -2t \d t \\
|
||||||
|
\implies \int_{c}^{y} \frac{\d y}{(1+y)^2} \d y &= \int_{t_0}^{t} -2t \d t \\
|
||||||
|
\implies - \frac{1}{1 + y} - \frac{1}{1+c} &= -t^2 + t_0^2 \\
|
||||||
|
\intertext{Damit folgt}
|
||||||
|
y(t) &= - \frac{1}{t_0^2 - t^2 + \frac{1}{1+c}} - 1
|
||||||
|
\intertext{Durch Einsetzen der Anfangsbedingung folgt}
|
||||||
|
y(t_0) &= - 1 - c -1 = y_0 \implies c = -2 - y_0
|
||||||
|
\intertext{Insgesamt folgt also}
|
||||||
|
y(t) &= - \frac{1}{t_0^2 - t^2 - \frac{1}{1 + y_0}} - 1
|
||||||
|
.\end{salign*}
|
||||||
|
Dies ist wohldefiniert da $y_0 \neq -1$.
|
||||||
|
Da $1 \neq 0$ folgt $y(t) \neq -1$ $\forall t \in \R$, d.h. keine weitere Fallunterscheidung notwendig
|
||||||
|
und $y(t)$ Lösung der AWA.
|
||||||
|
\end{proof}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
\begin{enumerate}[(a)]
|
||||||
|
\item Beh.: Das gegebene AWP hat eine Lösung $y\colon [0, b] \to \R$.
|
||||||
|
\begin{proof}
|
||||||
|
Es ist $f(t,y) = \frac{1}{1 + |y|}$ auf $\R \times \R$ stetig.
|
||||||
|
Bestimme
|
||||||
|
\[
|
||||||
|
M = \max_{(t,y) \in D} |f(t,y) | > 0
|
||||||
|
.\]
|
||||||
|
Wähle $\alpha \coloneqq b > 0$ und $\beta \coloneqq 2 \alpha M$. Dann ist $f$ insbesondere auf
|
||||||
|
\[
|
||||||
|
D = \{(t,y) \in \R \times \R \mid |t| \le \alpha, |y - y_0 | \le \beta \}
|
||||||
|
\] stetig.
|
||||||
|
Dann ex. nach dem Satz von Peano auf dem Intervall $[t_0 - T, t_0 + T]$ eine Lösung
|
||||||
|
der AWA mit
|
||||||
|
\[
|
||||||
|
T = \min \left\{ \alpha, \frac{\beta}{M} \right\} = \min \{\alpha, 2 \alpha \} = \alpha = b
|
||||||
|
.\] Mit $t_0 = 0$ existiert also inbesondere eine Lösung $y(t)$ auf $[0 + b] \subseteq [-T, T]$.
|
||||||
|
\end{proof}
|
||||||
|
\item Beh.: Diese Lösung $y$ ist für festes $y_0 \in \R$ eindeutig.
|
||||||
|
\begin{proof}
|
||||||
|
Nach VL g.z.z., dass $f(t,y)$ Lipschitz-stetig bezüglich $y$ ist. Seien dazu
|
||||||
|
$x, y \in \R$. Dann ist
|
||||||
|
\begin{salign*}
|
||||||
|
|f(t,x) - f(t,y)| &= \left| \frac{1}{1 + |x|} - \frac{1}{1+|y|} \right| \\
|
||||||
|
&= \left| \frac{|y|-|x|}{(1 + |x|)(1+|y|)} \right| \\
|
||||||
|
&\le \frac{|x-y|}{1 + |x|+|y|+|xy|} \\
|
||||||
|
&\le 1 \cdot |x-y|
|
||||||
|
.\end{salign*}
|
||||||
|
Mit $L \coloneqq 1$ folgt die Behauptung.
|
||||||
|
\end{proof}
|
||||||
|
\item Sei nun zusätzlich $v\colon [0,b] \to \R$ Lösung der AWA mit $v(0) = v_0$.
|
||||||
|
|
||||||
|
Beh.:
|
||||||
|
\[
|
||||||
|
|y(t) - v(t)| \le e^{t} |y_0 - v_0| \quad \forall t \in [0,b]
|
||||||
|
.\]
|
||||||
|
\begin{proof}
|
||||||
|
Definiere
|
||||||
|
\[
|
||||||
|
w(t) \coloneqq |y(t) - v(t)|
|
||||||
|
.\] Da $y$ und $v$ die AWA lösen, erfüllen sie die Integralgleichung. Damit folgt
|
||||||
|
\begin{salign*}
|
||||||
|
w(t) &= \left| y_0 - v_0 + \int_{t_0}^{t} f(s, y(s)) \d s - \int_{t_0}^{t} f(s, v(s)) \d s \right| \\
|
||||||
|
&\le |y_0 - v_0| + \int_{t_0}^{t} |f(s, y(s)) - f(s, v(s))| \d s \\
|
||||||
|
&\stackrel{\text{(b)}}{\le} |y_0 - v_0| + \int_{t_0}^{t} |y(s) - v(s)| \d s \\
|
||||||
|
&= |y_0 - v_0| + \int_{t_0}^{t} w(s) \d s \\
|
||||||
|
&\stackrel{\text{Lemma v. Gronwall}}{\le } e^{t-t_0} |y_0 - v_0|
|
||||||
|
.\end{salign*}
|
||||||
|
Mit $t_0 = 0$ folgt die Behauptung.
|
||||||
|
\end{proof}
|
||||||
|
\end{enumerate}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
\begin{align*}
|
||||||
|
y'(t) &= 3 (y(t))^{\frac{2}{3}}, t \in I \\
|
||||||
|
y(0) &= 0
|
||||||
|
.\end{align*}
|
||||||
|
\begin{enumerate}[(a)]
|
||||||
|
\item Beh.: Es ex. unendlich viele Lösungen für diese AWA.
|
||||||
|
\begin{proof}
|
||||||
|
Die Funktion $y(t) = (t-t_0)^{3}$ löst die AWA mit $y(t_0) = 0$. Denn
|
||||||
|
\[
|
||||||
|
y'(t) = 3 (t-t_0)^{2} = 3 (t-t_0)^{2 \cdot 3 \cdot \frac{1}{3}} = 3 \left((t-t_0)^{3}\right)^{\frac{2}{3}} = 3 (y(t))^{\frac{2}{3}} \quad (*)
|
||||||
|
.\]
|
||||||
|
Da $I \subseteq \R$ abgeschlossenes Intervall mit $0 \in I$, ex. $a, b \in \R$
|
||||||
|
mit $a < 0$, $b > 0$, s.d. $I = [a,b]$. Definiere nun
|
||||||
|
\[
|
||||||
|
y_d(t) \coloneqq \begin{cases}
|
||||||
|
0 & a \le t \le d \\
|
||||||
|
(t-d)^{3} & \text{sonst}
|
||||||
|
\end{cases}
|
||||||
|
.\] g.z.z.: $\forall d \in R$ mit $0 \le d \le b$ ist $y_d(t)$ eine Lösung der AWA.
|
||||||
|
|
||||||
|
Es gilt $y_d(t_0) = y_d(0) = 0$. Weiter ist mit für $t \neq d$:
|
||||||
|
\[
|
||||||
|
y'_d(t) = \begin{cases}
|
||||||
|
0 = 3 (y(t))^{\frac{2}{3}} & a \le t < d \\
|
||||||
|
3 (y(t))^{\frac{2}{3}} & \text{sonst}
|
||||||
|
\end{cases}
|
||||||
|
.\] Für $t = d$ gilt
|
||||||
|
\begin{align*}
|
||||||
|
\lim_{h \searrow 0} \frac{y_d(d + h) - y_d(d)}{h}
|
||||||
|
&= \lim_{h \searrow 0} \frac{(d+h-d)^{3} - (d-d)^{3}}{h} \\
|
||||||
|
&= \lim_{h \searrow 0} \frac{h^{3}}{h} \\
|
||||||
|
&= \lim_{h \searrow 0} h^2 \\
|
||||||
|
&= 0 \\
|
||||||
|
&= \lim_{h \nearrow 0} \frac{y_d(d+h) - y_d(d)}{h}
|
||||||
|
.\end{align*}
|
||||||
|
Also gilt für $t \in I$: $y_d'(t) = 3 (y_d(t))^{\frac{2}{3}}$. Damit
|
||||||
|
löst $y_d(t)$ die AWA.
|
||||||
|
\end{proof}
|
||||||
|
\item Beh.: $f(t,y) \coloneqq 3 y^{\frac{2}{3}}$ ist nicht Lipschitz-stetig.
|
||||||
|
\begin{proof}
|
||||||
|
Sei $L > 0$ beliebig. Dann wähle $x = 0$ und $y < \left(\frac{3}{L} \right)^{3}$. Dann folgt
|
||||||
|
\begin{salign*}
|
||||||
|
\left| f(x) - f(y) \right| &= \left|3 y^{\frac{2}{3}}\right| \\
|
||||||
|
&= \left|3 y^{-\frac{1}{3}}\right| |y| \\
|
||||||
|
&> \left| 3 \frac{L}{3}\right| |y| \\
|
||||||
|
&= L |y|
|
||||||
|
.\end{salign*}
|
||||||
|
\end{proof}
|
||||||
|
Die Lipschitz-stetigkeit von $f$ bezüglich $y$
|
||||||
|
ist Voraussetzung für den Eindeutigkeitssatz aus der VL.
|
||||||
|
\item siehe (a).
|
||||||
|
\end{enumerate}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\end{document}
|
||||||
Binary file not shown.
@@ -0,0 +1,201 @@
|
|||||||
|
\documentclass[uebung]{../../../lecture}
|
||||||
|
|
||||||
|
\title{Analysis II: Übungsblatt 11}
|
||||||
|
\author{Leon Burgard, Christian Merten}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\punkte
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
\begin{enumerate}[(a)]
|
||||||
|
\item Beh.: Das AWP $(*)$ hat eine globale definierte Lösung $u$.
|
||||||
|
\begin{proof}
|
||||||
|
Da $f$ stetig existiert nach Peano eine lokale Lösung $y(t)$ auf $I \coloneqq [t_0, t_0 + T]$.
|
||||||
|
Es ist also
|
||||||
|
\[
|
||||||
|
y(t) = y_0 + \int_{t_0}^{t} f(s, y(s)) \d s \quad \forall t \in I
|
||||||
|
.\]
|
||||||
|
Damit folgt $\forall t \in I$:
|
||||||
|
\begin{salign*}
|
||||||
|
\Vert y(t) \Vert &\le \Vert y_0 \Vert + \int_{t_0}^{t} \Vert f(s, y(s)) \d s \\
|
||||||
|
&\stackrel{f \text{ linear beschränkt}}{\le}
|
||||||
|
\Vert y_0 \Vert + \int_{t_0}^{t} (\alpha(s) \Vert y(s) \Vert + \beta(s)) \d s \\
|
||||||
|
&= \Vert y_0 \Vert + \int_{t_0}^{t} \alpha(s) \Vert y(s) \Vert \d s +
|
||||||
|
\int_{t_0}^{t} \beta(s) \d s
|
||||||
|
\intertext{Da $I$ kompaktes Intervall, nehmen $\alpha(s)$ und $\beta(s)$ ihr
|
||||||
|
Maximum an. Damit folgt}
|
||||||
|
\Vert y(t) \Vert &\le \Vert y_0 \Vert + \alpha_{max}\int_{t_0}^{t} \Vert y(s) \Vert \d s + \beta_{\text{max}}(t - t_0) \\
|
||||||
|
&\stackrel{t \le T}{\le} \Vert y_0 \Vert + \alpha_{max}\int_{t_0}^{t} \Vert y(s) \Vert \d s + \beta_{\text{max}}T
|
||||||
|
\intertext{Damit folgt mit dem Lemma von Gronwall}
|
||||||
|
\Vert y(t) \Vert &\le \underbrace{e^{\alpha_{\text{max}}(t-t_0)} (\Vert y_0 \Vert + T \beta_{max})}_{\eqqcolon \rho(t)} \\
|
||||||
|
&\le \rho(t)
|
||||||
|
.\end{salign*}
|
||||||
|
Da $\rho(t)$ stetig folgt globale Fortsetzbarkeit von $y(t)$.
|
||||||
|
\end{proof}
|
||||||
|
\item Beh.: $f_1$ ist linear beschränkt.
|
||||||
|
\begin{proof}
|
||||||
|
Aus der Taylorreihe von $\sin(t)$ folgt $|\sin(t)| \le |t|$. Außerdem ist
|
||||||
|
$\sqrt{|x|} \le |x| + 1$. Damit folgt direkt
|
||||||
|
\begin{salign*}
|
||||||
|
|f_1(t, (x_1, x_2))| &\le |t| |x_1|^{\frac{1}{2}} + |\sin(t)| |x_2| \\
|
||||||
|
&\le |t| (|x_1| + 1) + |t| |x_2| \\
|
||||||
|
&\le \underbrace{|t|}_{=: \alpha(t)} \left( |x_1| + |x_2| \right) + \underbrace{2 |t|}_{=: \beta(t)} \\
|
||||||
|
&= \alpha(t) + \Vert x \Vert_1 + \beta(t)
|
||||||
|
.\end{salign*}
|
||||||
|
\end{proof}
|
||||||
|
Beh.: $f_2$ ist linear beschränkt.
|
||||||
|
\begin{proof}
|
||||||
|
Es gilt
|
||||||
|
\begin{salign*}
|
||||||
|
|f_2(t, (x_1, x_2))| &\le e^{-t^2 |x_1|} + |x_1| \left| \frac{1}{1+x_2^2} \right| \\
|
||||||
|
&\le \frac{1}{e^{t^2}|x_1|} + |x_1| \\
|
||||||
|
&\le 1 + |x_1| \\
|
||||||
|
&\le \underbrace{1}_{=: \beta(t)} + \underbrace{1}_{=: \alpha(t)} \cdot \Vert x \Vert_1 \\
|
||||||
|
&= \alpha(t) \Vert x \Vert_1 + \beta(t)
|
||||||
|
.\end{salign*}
|
||||||
|
\end{proof}
|
||||||
|
\end{enumerate}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
Beh.: Das Taylorpolynom $4$-ter Ordnung ist gegeben als
|
||||||
|
\[
|
||||||
|
T_4(u, t, t_0=0) = t - t^2 + \frac{1}{2} t ^{3} - \frac{1}{6} t ^{4}
|
||||||
|
.\]
|
||||||
|
\begin{proof}
|
||||||
|
$u$ ist Lösung des AWP, d.h. es gilt
|
||||||
|
\begin{align*}
|
||||||
|
u''(t) &= - \sin(u(t)) - 2u'(t), \quad t \ge 0
|
||||||
|
\intertext{Damit folgt}
|
||||||
|
u^{(3)}(t) &= - \cos(u(t)) u'(t) - 2u''(t) \\
|
||||||
|
u^{(4)}(t) &= \sin(u(t)) u'(t)^2 - \cos(u(t)) u''(t) - 2u^{(3)}(t)
|
||||||
|
\intertext{Mit $u(0) = 0$ und $u'(0) = 1$ folgt}
|
||||||
|
u^{(3)}(0) &= 3 \\
|
||||||
|
u^{(4)}(0) &= -4
|
||||||
|
\intertext{Insgesamt folgt dann}
|
||||||
|
T_4(u, t) &= u(0) + u'(0) t + \frac{u''(0)}{2} t^2 + \frac{u^{(3)}(0)}{3!} t ^{3}
|
||||||
|
+ \frac{u^{(4)}(t)}{4!} t ^{4} \\
|
||||||
|
&= t - t^2 + \frac{1}{2} t ^{3} - \frac{1}{6} t ^{4}
|
||||||
|
.\end{align*}
|
||||||
|
\end{proof}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
Beh.: Die Matrix $A(t)$ ist gegeben als
|
||||||
|
\[
|
||||||
|
A(t) = \begin{pmatrix} 1-t & 1 \\
|
||||||
|
2t - t^2 & t-1
|
||||||
|
\end{pmatrix}
|
||||||
|
.\]
|
||||||
|
\begin{proof}
|
||||||
|
Durch Nachrechnen folgt
|
||||||
|
\[
|
||||||
|
\phi^{-1} = \begin{pmatrix} t^2 - t + 1 & -t \\ -t^2 & t+1 \end{pmatrix}
|
||||||
|
.\] Mit $\phi'(t) = A(t) \phi(t)$ folgt also
|
||||||
|
\[
|
||||||
|
A(t) = \phi'(t) \phi^{-1}(t) = \begin{pmatrix} 1 & 1 \\ 2t & 2t-1 \end{pmatrix}
|
||||||
|
\begin{pmatrix} t^2 - t + 1 & -t \\ -t^2 & t+1 \end{pmatrix}
|
||||||
|
=
|
||||||
|
\begin{pmatrix} 1-t & 1 \\
|
||||||
|
2t - t^2 & t-1
|
||||||
|
\end{pmatrix}
|
||||||
|
.\]
|
||||||
|
\end{proof}
|
||||||
|
Beh.: Die Lösung $u(t)$ ist gegeben als
|
||||||
|
\[
|
||||||
|
u(t) = \begin{pmatrix} t+1 \\ t^2 \end{pmatrix} +
|
||||||
|
\begin{pmatrix} \frac{1}{2} t^2 + t \\ \frac{1}{2} t ^{3} + \frac{3}{2} t^2 \end{pmatrix}
|
||||||
|
.\]
|
||||||
|
\begin{proof}
|
||||||
|
Nach VL gilt für die partikuläre Lösung mit $u_b(t_0 = 0) = (0,0)^{T}$ und
|
||||||
|
$b(t) = (1,t)^{T}$:
|
||||||
|
\begin{align*}
|
||||||
|
u_b(t) &= \phi(t) \left( \int_{0}^{t} \phi^{-1}(s) b(s) \d s + \begin{pmatrix} 0 \\ 0 \end{pmatrix} \right) \\
|
||||||
|
&= \phi(t) \int_{0}^{t} \begin{pmatrix} 1 - s \\ s \end{pmatrix} \d s \\
|
||||||
|
&= \begin{pmatrix} 1 + t & t \\ t^2 & t^2 -t +1 \end{pmatrix}
|
||||||
|
\begin{pmatrix}
|
||||||
|
t - \frac{1}{2}t^2 \\
|
||||||
|
\frac{1}{2} t^2
|
||||||
|
\end{pmatrix} \\
|
||||||
|
&= \begin{pmatrix} \frac{1}{2} t^2 + t \\ \frac{1}{2} t ^{3} + \frac{3}{2} t^2 \end{pmatrix}
|
||||||
|
\intertext{Mit der Anfangsbedingung $u(0) = (1,0)^{T}$ folgt}
|
||||||
|
u(t) &= c_1 \begin{pmatrix} 1 + t \\ t^2 \end{pmatrix} + c_2 \begin{pmatrix} t \\ t^2 - t + 1 \end{pmatrix} + u_b(t) \\
|
||||||
|
u(0) &= c_1 \begin{pmatrix} 1 \\ 0 \end{pmatrix} + c_2 \begin{pmatrix} 0 \\ 1 \end{pmatrix}
|
||||||
|
+ \begin{pmatrix} 0 \\ 0 \end{pmatrix} \stackrel{!}{=} \begin{pmatrix} 1 \\ 0 \end{pmatrix}
|
||||||
|
\intertext{$c_1 = 0$ also insgesamt}
|
||||||
|
u(t) &= \begin{pmatrix} t+1 \\ t^2 \end{pmatrix} +
|
||||||
|
\begin{pmatrix} \frac{1}{2} t^2 + t \\ \frac{1}{2} t ^{3} + \frac{3}{2} t^2 \end{pmatrix}
|
||||||
|
.\end{align*}
|
||||||
|
\end{proof}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
\begin{enumerate}[(a)]
|
||||||
|
\item Beh.: Bedingung $(**)$ für die eindeutige Lösbarkeit von (RWP-2.Ord) ist äquivalent
|
||||||
|
zur Bedingung $(*)$, wenn (RWP-2.Ord.) als System 1. Ordnung umformuliert wird.
|
||||||
|
\begin{proof}
|
||||||
|
Es sei ein RWP-2.Ord. wie beschrieben gegeben. Definiere
|
||||||
|
$y_1(t) \coloneqq u(t)$ und $y_2(t) \coloneqq y_1'(t)$. Dann
|
||||||
|
mit
|
||||||
|
\[
|
||||||
|
B_a = \begin{pmatrix} \alpha_0 & \alpha_1 \\ 0 & 0 \end{pmatrix}
|
||||||
|
\quad
|
||||||
|
\text{und}
|
||||||
|
\quad
|
||||||
|
B_b = \begin{pmatrix} 0 & 0 \\ \beta_0 & \beta_1 \end{pmatrix}
|
||||||
|
\] als äquivalente Randwertbedingung
|
||||||
|
\[
|
||||||
|
B_a y(a) + B_b y(b) = g := \begin{pmatrix} \eta_0 \\ \eta_1 \end{pmatrix}
|
||||||
|
.\] Sei nun $\{y, z\} $ ein beliebiges Fundamentalsystem der homogenen Gleichung
|
||||||
|
mit $\phi(a) = \mathbb{I}$. Dann gilt
|
||||||
|
$y_1(a) = z_2(a) = 1$ und $y_2(a) = z_1(a) = 0$. Damit folgt mit
|
||||||
|
\[
|
||||||
|
A \coloneqq \begin{pmatrix} \alpha_0 & \alpha_1 \\ \beta_0 y_1(b) + \beta_1 y_2(b)
|
||||||
|
& \beta_0 z_1(b) + \beta_1 z_2(b) \end{pmatrix}
|
||||||
|
\] die zu $(**)$ äquivalente Bedingung $\text{det}(A) \neq 0$.
|
||||||
|
|
||||||
|
Damit g.z.z. $A = B_a + B_b \phi(b)$.
|
||||||
|
\begin{align*}
|
||||||
|
B_a + B_b \phi(b) &= \begin{pmatrix} \alpha & \alpha_1 \\ 0 & 0 \end{pmatrix}
|
||||||
|
+ \begin{pmatrix} 0 & 0 \\ \beta_0 & \beta_1 \end{pmatrix}
|
||||||
|
\begin{pmatrix} y_1(b) & z_1(b) \\ y_2(b) & z_2(b) \end{pmatrix} \\
|
||||||
|
&= \begin{pmatrix} \alpha_0 & \alpha_1 \\ \beta_0 y_1(b) + \beta_1 y_2(b)
|
||||||
|
& \beta_0 z_1(b) + \beta_1 z_2(b) \end{pmatrix} = A
|
||||||
|
.\end{align*}
|
||||||
|
\end{proof}
|
||||||
|
\item Hier gilt
|
||||||
|
in Analogie zu (a) für (i) bis (iii): $\alpha_0 = 1$, $\alpha_1 = 0$, $\beta_0 = 1$ und
|
||||||
|
$\beta_1 = 0$. Sei außerdem $u_1 = \sin(t)$ und $u_2 = \cos(t)$.
|
||||||
|
\begin{enumerate}[(i)]
|
||||||
|
\item Beh.: Es existiert eine eindeutige Lösung.
|
||||||
|
\begin{proof}
|
||||||
|
Mit
|
||||||
|
\[
|
||||||
|
\text{det}\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} = -1 \neq 0
|
||||||
|
\] und (a) folgt die Behauptung.
|
||||||
|
\end{proof}
|
||||||
|
\item Beh.: Es existiert keine Lösung.
|
||||||
|
\begin{proof}
|
||||||
|
Das Kriterium aus (a) liefert
|
||||||
|
\[
|
||||||
|
\text{det}\begin{pmatrix} 0 & 1 \\ 0 & -1 \end{pmatrix} = 0
|
||||||
|
.\] Ang. es ex. eine Lösung $u(t)$ des RWP. Dann hat diese die
|
||||||
|
Form $u(t) = c_1 \sin(t) + c_2 \cos(t)$.
|
||||||
|
Es gilt weiter $u(0) = 0 \implies c_2 = -1$, aber
|
||||||
|
$u(\pi) = 0 \implies c_2 = 1$ $\contr$.
|
||||||
|
\end{proof}
|
||||||
|
\item Beh.: Es existieren unendlich viele Lösungen.
|
||||||
|
\begin{proof}
|
||||||
|
Das Kriterium aus (a) liefert
|
||||||
|
\[
|
||||||
|
\text{det}\begin{pmatrix} 0 & 1 \\ 0 & -1 \end{pmatrix} = 0
|
||||||
|
.\] Z.z.: $\forall c_1 \in \R$ ist $u(t) = c_1 \sin(t) + 1$ eine Lösung des
|
||||||
|
RWP. Es ist $u(0) = u(\pi) = 1$ und $u(t)$ ist mit $c_1$ und $c_2 = 0$ Lösung
|
||||||
|
des RWP.
|
||||||
|
\end{proof}
|
||||||
|
\end{enumerate}
|
||||||
|
\end{enumerate}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\end{document}
|
||||||
Binary file not shown.
@@ -32,7 +32,7 @@
|
|||||||
\end{proof}
|
\end{proof}
|
||||||
\item Beh.: Es ist mit $h = (h_1, h_2, h_3)^{T} \in \R^{3}$:
|
\item Beh.: Es ist mit $h = (h_1, h_2, h_3)^{T} \in \R^{3}$:
|
||||||
\[
|
\[
|
||||||
T_{2}^{f}(\hat{x} + h) = -e\left(-h_1 - h_2 -h_3 + \frac{1}{2} h_2^2 + h_1 h_2 + h_1h_3\right)
|
T_{2}^{f}(\hat{x} + h) = -e\left(1 -h_1 - h_2 -h_3 + \frac{1}{2} h_2^2 + h_1 h_2 + h_1h_3\right)
|
||||||
.\]
|
.\]
|
||||||
\begin{proof}
|
\begin{proof}
|
||||||
Mit $\hat{x} = (-1, -1, 0)^{T}$ folgt
|
Mit $\hat{x} = (-1, -1, 0)^{T}$ folgt
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
\begin{salign*}
|
\begin{salign*}
|
||||||
T_2^{f}(\hat{x} + h) &= f(\hat{x}) + (\nabla f(\hat{x}), h)_2 + \frac{1}{2} (H_f(\hat{x})h, h)_2 \\
|
T_2^{f}(\hat{x} + h) &= f(\hat{x}) + (\nabla f(\hat{x}), h)_2 + \frac{1}{2} (H_f(\hat{x})h, h)_2 \\
|
||||||
&= -e + eh_1 + eh_2 + eh_3 - \frac{1}{2} eh_2^2 - eh_1h_2 - eh_1h_3 \\
|
&= -e + eh_1 + eh_2 + eh_3 - \frac{1}{2} eh_2^2 - eh_1h_2 - eh_1h_3 \\
|
||||||
&= -e \left(-h_1 - h_2-h_3 + \frac{1}{2}h_2^2 + h_1h_2 + h_1 h_3\right)
|
&= -e \left(1 -h_1 - h_2-h_3 + \frac{1}{2}h_2^2 + h_1h_2 + h_1 h_3\right)
|
||||||
.\end{salign*}
|
.\end{salign*}
|
||||||
\end{proof}
|
\end{proof}
|
||||||
\end{enumerate}
|
\end{enumerate}
|
||||||
@@ -170,7 +170,7 @@
|
|||||||
$F(x,y)$ stetig partiell differenzierbar, da alle partiellen Ableitungen stetig sind.
|
$F(x,y)$ stetig partiell differenzierbar, da alle partiellen Ableitungen stetig sind.
|
||||||
Außerdem gilt $F(x^{0}, y^{0}) = 0$.
|
Außerdem gilt $F(x^{0}, y^{0}) = 0$.
|
||||||
|
|
||||||
Damit folgt mit dem SIF: Es ex. eine eindeutige diff'bare Funktion $g\colon \R^2 \to \R^2$, für
|
Damit folgt mit dem SIF: Es ex. diff'bare Funktion $g\colon \R^2 \to \R^2$, für
|
||||||
die in einer Umgebung von $(x^{0}, y^{0})$ gilt:
|
die in einer Umgebung von $(x^{0}, y^{0})$ gilt:
|
||||||
\[
|
\[
|
||||||
F(x, g(x)) = 0 \implies y = g(x)
|
F(x, g(x)) = 0 \implies y = g(x)
|
||||||
|
|||||||
Binary file not shown.
@@ -0,0 +1,289 @@
|
|||||||
|
\documentclass[uebung]{../../../lecture}
|
||||||
|
|
||||||
|
\title{Analysis II: Übungsblatt 9}
|
||||||
|
\author{Leon Burgard, Christian Merten}
|
||||||
|
|
||||||
|
\usepackage[]{gauss}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\punkte
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
Sei
|
||||||
|
\[
|
||||||
|
f\colon \begin{pmatrix} x \\ y \\ z \end{pmatrix} \mapsto \begin{pmatrix} u \\ v \\ w \end{pmatrix}
|
||||||
|
\coloneqq \begin{pmatrix} yz \\ x + 2z \\ xy \end{pmatrix}
|
||||||
|
.\]
|
||||||
|
Dann ist die Umkehrfunktion $g = f^{-1}$ gegeben als
|
||||||
|
\begin{align*}
|
||||||
|
g(u, v, w) = \begin{pmatrix} \frac{wv}{w + 2u} \\ \frac{w + 2u}{v} \\ \frac{vu}{w + 2u} \end{pmatrix}
|
||||||
|
.\end{align*} Denn $\forall x, y, z \in \R$ gilt
|
||||||
|
\begin{align*}
|
||||||
|
g(f(x,y,z)) = g(yz, x+2z, xy) = \begin{pmatrix} x \\ y \\ z \end{pmatrix}
|
||||||
|
.\end{align*}
|
||||||
|
Analog für $f(g(u,v,w)) = (u,v,w)^{T}$.
|
||||||
|
|
||||||
|
Für die Jacobimatrizen folgt
|
||||||
|
\begin{align*}
|
||||||
|
D_f(x,y,z) = \begin{pmatrix} 0 & z & y \\ 1 & 0 & 2 \\ y & x & 0 \end{pmatrix}
|
||||||
|
\quad
|
||||||
|
\text{und}
|
||||||
|
\quad
|
||||||
|
D_g(u,v,w) = \begin{pmatrix} - 2 \frac{wv}{(w + 2u)^2} & \frac{w}{w+2u} & \frac{2uv}{(w + 2u)^2}\\
|
||||||
|
\frac{2}{v} & -\frac{2 + 2u}{v^2} & \frac{1}{v} \\
|
||||||
|
\frac{vw}{(w + 2u)^2} & \frac{u}{w + 2u} & -\frac{vu}{(w + 2u)^2}\end{pmatrix}
|
||||||
|
.\end{align*}
|
||||||
|
Für den Punkt $(x,y,z)^{T} = (2,1,0)$ folgt $f(2,1,0) = (0,2,2)^{T}$. Damit folgt
|
||||||
|
\begin{align*}
|
||||||
|
D_f(2,1,0) = \begin{pmatrix}
|
||||||
|
0 & 0 & 1 \\
|
||||||
|
1 & 0 & 2 \\
|
||||||
|
1 & 2 & 0
|
||||||
|
\end{pmatrix}
|
||||||
|
\quad
|
||||||
|
\text{und}
|
||||||
|
\quad
|
||||||
|
D_g(0,2,2) = \begin{pmatrix}
|
||||||
|
-2 & 1 & 0 \\
|
||||||
|
1 & -\frac{1}{2} & \frac{1}{2} \\
|
||||||
|
1 & 0 & 0
|
||||||
|
\end{pmatrix}
|
||||||
|
.\end{align*}
|
||||||
|
Damit folgt
|
||||||
|
\begin{align*}
|
||||||
|
D_f(2,1,0) D_g(0,2,2) =
|
||||||
|
\begin{pmatrix}
|
||||||
|
0 & 0 & 1 \\
|
||||||
|
1 & 0 & 2 \\
|
||||||
|
1 & 2 & 0
|
||||||
|
\end{pmatrix}
|
||||||
|
\begin{pmatrix}
|
||||||
|
-2 & 1 & 0 \\
|
||||||
|
1 & -\frac{1}{2} & \frac{1}{2} \\
|
||||||
|
1 & 0 & 0
|
||||||
|
\end{pmatrix}
|
||||||
|
=
|
||||||
|
\begin{pmatrix} 1 & 0 & 0 \\
|
||||||
|
0 & 1 & 0 \\
|
||||||
|
0 & 0 & 1\end{pmatrix}
|
||||||
|
.\end{align*}
|
||||||
|
Also $D_f(2,1,0)^{-1} = D_g(0,2,2)$.
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
Sei
|
||||||
|
\[
|
||||||
|
P\coloneqq \{(x,y,z)^{T} \in \R^{3} \mid x + y - z = 1\}
|
||||||
|
\quad
|
||||||
|
\text{und}
|
||||||
|
\quad
|
||||||
|
Z \coloneqq \{(x,y,z)^{T} \in \R^{3} \mid x^2 + y^2 = 1\}
|
||||||
|
.\] Setze
|
||||||
|
\begin{align*}
|
||||||
|
&f\colon \R^{3} \to \R, x \mapsto \Vert x \Vert_2^2 \\
|
||||||
|
&g\colon \R^{3} \to \R^2, x \mapsto \begin{pmatrix} x+y-z-1 \\ x^2 + y^2 - 1 \end{pmatrix}
|
||||||
|
.\end{align*}
|
||||||
|
Dann ist die Nebenbedingung äquivalent zu $g(x) = 0$. Minimiere nun $f(x)$ unter $g(x) = 0$.
|
||||||
|
Es gilt
|
||||||
|
\begin{align*}
|
||||||
|
J_g(x) = \begin{pmatrix} 1 & 1 & -1 \\ 2x & 2y & 0 \end{pmatrix}
|
||||||
|
\quad
|
||||||
|
\text{und}
|
||||||
|
\quad
|
||||||
|
\nabla f(x) = \begin{pmatrix} 2x \\ 2y \\ 2z \end{pmatrix}
|
||||||
|
.\end{align*}
|
||||||
|
Es gilt $\text{Rg}(J_g(x)) = 2$, also ist mit Lagrangeregel notwendige Bedingung für
|
||||||
|
Minimum:
|
||||||
|
\[
|
||||||
|
J_f(\hat{x})^{T} \lambda = \nabla f(\hat{x})
|
||||||
|
.\]
|
||||||
|
Damit folgt das Gleichungssystem
|
||||||
|
\begin{align}
|
||||||
|
x + y - z - 1 &= 0 \\
|
||||||
|
x^2 + y^2 - 1 &= 0 \\
|
||||||
|
\lambda_1 + 2 x \lambda_2 &= 2x \\
|
||||||
|
\lambda_1 + 2y \lambda_2 &= 2y \\
|
||||||
|
- \lambda_1 &= 2z
|
||||||
|
.\end{align}
|
||||||
|
Sei zunächst $x \neq y$. Ziehe (4) von (3) ab. Damit folgt
|
||||||
|
\begin{align*}
|
||||||
|
\lambda_2 (x - y) = x - y \implies \lambda_2 = 1
|
||||||
|
.\end{align*}
|
||||||
|
Aus (5) folgt direkt $\lambda_1 = - 2z$. Damit folgt mit (3):
|
||||||
|
\begin{align*}
|
||||||
|
- 2z +2x = 2x \implies -2z = 0 \implies z = 0
|
||||||
|
.\end{align*}
|
||||||
|
Eingesetzt in (1) und in (2) ergibt das
|
||||||
|
\[
|
||||||
|
x + y - 1 = 0 \implies x = 1 - y \stackrel{\text{(2)}}{\implies} (1-y)^2 + y^2 - 1 = 0 \implies y (y-1) = 0 \implies y_1 = 0 \land y_2 = 1
|
||||||
|
.\] Damit ergeben sich $x_1 = 1 - y_1 = 1$ und $x_2 = 1 - y_2 = 0$, also
|
||||||
|
$P_1 = (1, 0, 0)^{T}$ und $P_2 = (0,1,0)^{T}$. Hier gilt
|
||||||
|
$f(P_1) = \Vert P_1\Vert_2^2 = 1$ und $f(P_2) =\Vert P_2 \Vert_2^2 = 1$.
|
||||||
|
|
||||||
|
Falls nun $x = y$. Dann folgt aus (2) direkt $x = \pm \frac{1}{\sqrt{2} }$ und damit mit (1)
|
||||||
|
$z = \pm \frac{2}{\sqrt{2} } - 1$. Allerdings ist dann bereits $f(\pm \frac{1}{\sqrt{2}}, \pm \frac{1}{\sqrt{2}}, \pm \frac{2}{\sqrt{2} } - 1) > 1$, d.h. dies kann kein Minimum sein.
|
||||||
|
|
||||||
|
Es bleiben also $P_1$ und $P_2$. Da $f(P_1) = f(P_2)$ sind beide Minima.
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
Definiere
|
||||||
|
\begin{align*}
|
||||||
|
&f(x) \colon \R^{3} \to \R, x \mapsto 2x_1^2 + 2x_1 x_3 + 2x_2^2 + x_2x_3 + 3x_3^2 + 3x_1 - 8x_2 + 2x_3 \\
|
||||||
|
&g(x) \colon \R^{3} \to \R^2, x \mapsto \begin{pmatrix} -x_1 + 3x_2 - 2x^{3} - 7 \\
|
||||||
|
-3x_1 + 2x_2 -x_3 -2
|
||||||
|
\end{pmatrix}
|
||||||
|
.\end{align*}
|
||||||
|
Damit ist das gegebene Optimierungsproblem äquivalent zu der Minimierung von $f$ unter $g(x) = 0$.
|
||||||
|
|
||||||
|
Mit
|
||||||
|
\[
|
||||||
|
Q \coloneqq \begin{pmatrix} 4 & 0 & 2 \\
|
||||||
|
0 & 4 & 1 \\
|
||||||
|
2 & 1 & 6
|
||||||
|
\end{pmatrix}
|
||||||
|
\quad
|
||||||
|
\text{und}
|
||||||
|
\quad
|
||||||
|
c \coloneqq \begin{pmatrix} -3 \\ 8 \\ -2 \end{pmatrix}
|
||||||
|
.\] folgt
|
||||||
|
\[
|
||||||
|
f(x) = \frac{1}{2} x^{T} Qx - c^{T} x
|
||||||
|
.\] Mit
|
||||||
|
\[
|
||||||
|
A \coloneqq \begin{pmatrix} -1 & 3 & -2 \\ -3 & 2 & -1 \end{pmatrix}
|
||||||
|
\quad
|
||||||
|
\text{und}
|
||||||
|
\quad
|
||||||
|
b \coloneqq \begin{pmatrix} 7 \\ 2 \end{pmatrix}
|
||||||
|
\] folgt
|
||||||
|
\[
|
||||||
|
g(x) = Ax - b
|
||||||
|
.\]
|
||||||
|
Es ist $\forall x \in \R^{3}$
|
||||||
|
\begin{salign*}
|
||||||
|
f(x) &= \frac{1}{2} x^{T} Q x - c^{T} x \\
|
||||||
|
&= \frac{1}{2} \sum_{i=1}^{n} x_i (Qx)_i - \sum_{i=1}^{n} c_i x_i \\
|
||||||
|
&= \frac{1}{2} \sum_{i=1}^{n} x_i \sum_{j=1}^{n} Q_{ij} x_j - \sum_{i=1}^{n} c_i x_i \\
|
||||||
|
&= \frac{1}{2} \left[ \sum_{i=1}^{n} Q_{ii} x_i^2 + \sum_{i,j=1, i\neq j}^{n} Q_{ij} x_i x_j \right]
|
||||||
|
- \sum_{i=1}^{n} c_i x_i
|
||||||
|
\intertext{Da $Q$ symmetrisch, folgt $Q_{ij} = Q_{ji}$, also}
|
||||||
|
\frac{\partial f}{\partial x_i}
|
||||||
|
&= \frac{1}{2} \left[ 2 Q_{ii} x_i + 2 \sum_{j=1}^{n} Q_{ij} x_j \right] - c_i \\
|
||||||
|
&= \sum_{j=1}^{n} Q_{ij} x_j - c_i \\
|
||||||
|
&= (Qx)_i - c_i
|
||||||
|
\intertext{Insgesamt folgt}
|
||||||
|
\nabla f(x) &= Qx - c
|
||||||
|
.\end{salign*}
|
||||||
|
Mit der Definition von $g$ und $A$ folgt außerdem direkt $J_g(x) = A$. Wegen $\text{Rg}(A) = 2$ folgt
|
||||||
|
mit der Lagrangeregel und die Bedingung für ein Minimum für $\lambda \in \R^2$:
|
||||||
|
\begin{align*}
|
||||||
|
A^{T} \lambda &= Qx - c \\
|
||||||
|
Ax &= b
|
||||||
|
.\end{align*}
|
||||||
|
Löse zunächst $Ax = b$:
|
||||||
|
\begin{align*}
|
||||||
|
\begin{gmatrix}[p] -1 & 3 & -2 & 7 \\
|
||||||
|
-3 & 2 & -1 & 2
|
||||||
|
\rowops
|
||||||
|
\add[-3]{0}{1}
|
||||||
|
\end{gmatrix}
|
||||||
|
\to
|
||||||
|
\begin{gmatrix}[p]
|
||||||
|
-1 & -3 & 2 & -7 \\
|
||||||
|
0 & -7 & 5 & -19
|
||||||
|
\rowops
|
||||||
|
\mult{0}{-1}
|
||||||
|
\mult{1}{-\frac{1}{7}}
|
||||||
|
\add[3]{1}{0}
|
||||||
|
\end{gmatrix}
|
||||||
|
\to
|
||||||
|
\begin{gmatrix}[p]
|
||||||
|
1 & 0 & -\frac{1}{7} & \frac{8}{7} \\
|
||||||
|
0 & 1 & -\frac{5}{7} & \frac{19}{7}
|
||||||
|
\end{gmatrix}
|
||||||
|
.\end{align*}
|
||||||
|
Damit folgt als Lösungsmenge
|
||||||
|
\[
|
||||||
|
L = \begin{pmatrix} \frac{8}{7} \\ \frac{19}{7} \\ 0 \end{pmatrix}
|
||||||
|
+ \text{Lin}\left( \begin{pmatrix} -\frac{1}{7} \\ -\frac{5}{7} \\ -1 \end{pmatrix} \right)
|
||||||
|
= \begin{pmatrix} 1 \\ 2 \\ -1 \end{pmatrix} + \text{Lin}\left( \begin{pmatrix} 1 \\ 5 \\ 7 \end{pmatrix} \right)
|
||||||
|
.\] Also folgt für $a \in \R$:
|
||||||
|
\[
|
||||||
|
x = \begin{pmatrix} 1 + a \\ 2 + 5a \\ -1 + 7a \end{pmatrix}
|
||||||
|
.\] Setze jetzt in $A^{T} \lambda = Qx - c$ ein:
|
||||||
|
\begin{align*}
|
||||||
|
A^{T} \lambda &= Qx -c
|
||||||
|
= \begin{pmatrix} 5 + 18a \\ -1 + 27 a \\ 49 a \end{pmatrix}
|
||||||
|
.\end{align*}
|
||||||
|
und löse
|
||||||
|
\[
|
||||||
|
\begin{pmatrix} -1 & -3 & -18 \\
|
||||||
|
3 & 2 & -27 \\
|
||||||
|
-2 & -1 & -49
|
||||||
|
\end{pmatrix}
|
||||||
|
\begin{pmatrix} \lambda_1 \\ \lambda_2 \\ a \end{pmatrix}
|
||||||
|
=
|
||||||
|
\begin{pmatrix} 5 \\ -1 \\ 0 \end{pmatrix}
|
||||||
|
.\] Kurze Rechnung ergibt $a = 0$. Damit folgt
|
||||||
|
\[
|
||||||
|
x = \begin{pmatrix} 1 \\ 2 \\ -1 \end{pmatrix}
|
||||||
|
.\] Da $f(1, 2, -1) = -12$ und für $y = (2,7,6)^{T} \in L$ ist $f(y) = 242 > -12$ folgt
|
||||||
|
$x = (1,2,-1)^{T}$ löst das Minimierungsproblem.
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
\begin{enumerate}[(a)]
|
||||||
|
\item Definiere:
|
||||||
|
\begin{align*}
|
||||||
|
x_1 &\coloneqq v_1(t) \\
|
||||||
|
x_2 &\coloneqq v_1'(t) \\
|
||||||
|
x_3 &\coloneqq v_2(t) \\
|
||||||
|
x_4 &\coloneqq v_2'(t) \\
|
||||||
|
x_5 &\coloneqq v_2''(t) \\
|
||||||
|
x_6 &\coloneqq v_2'''(t)
|
||||||
|
.\end{align*}
|
||||||
|
Das gegebene Gleichungssystem lässt sich dann so formulieren
|
||||||
|
\begin{align*}
|
||||||
|
x_6'(t) - a ( g(t) - b x_3(t)) &= f(t) \\
|
||||||
|
x_2'(t) + b x_3(t) &= g(t)
|
||||||
|
.\end{align*}
|
||||||
|
Dann folgt für das gegebene Gleichungssystem das äquivalente Gleichungssystem 1. Ordnung:
|
||||||
|
\begin{align*}
|
||||||
|
x' = \begin{pmatrix} x_2 \\
|
||||||
|
g(t) - b x_3(t) \\
|
||||||
|
x_4 \\
|
||||||
|
x_5 \\
|
||||||
|
x_6 \\
|
||||||
|
a (g(t) - b x_3(t)) + f(t)
|
||||||
|
\end{pmatrix}
|
||||||
|
.\end{align*}
|
||||||
|
\item Seien $u_1$, $u_2$ Lösungen von $(*)$. Dann gilt
|
||||||
|
\[
|
||||||
|
W(t) = \text{det} \begin{pmatrix} u_1(t) & u_2(t) \\
|
||||||
|
\frac{\d}{\d t} u_1(t) & \frac{\d}{\d t} u_2(t)
|
||||||
|
\end{pmatrix}
|
||||||
|
= u_1 \frac{\d}{\d t} u_2(t) - u_2(t) \frac{\d}{\d t} u_1(t)
|
||||||
|
.\] Damit folgt
|
||||||
|
\begin{salign*}
|
||||||
|
\frac{\d}{\d t} W(t) &= \frac{\d}{\d t}\left( u_1 \frac{\d}{\d t}u_2 \right)
|
||||||
|
- \frac{\d}{\d t} \left( u_2 \frac{\d}{\d t} u_1 \right) \\
|
||||||
|
&= \left( \frac{\d}{\d t} u_1 \right)\left( \frac{\d}{\d t} u_2 \right)
|
||||||
|
+ u_1 \frac{\mathrm{d}^2}{\d t^2} u_2 - \left( \frac{\d}{\d t} u_2 \right)
|
||||||
|
\left( \frac{\d}{\d t} u_1 \right)
|
||||||
|
- u_2 \frac{\mathrm{d}^2}{\d t^2} u_1 \\
|
||||||
|
&=
|
||||||
|
u_1 \frac{\mathrm{d}^2}{\d t^2} u_2
|
||||||
|
- u_2 \frac{\mathrm{d}^2}{\d t^2} u_1 \\
|
||||||
|
&\stackrel{(*)}{=}
|
||||||
|
u_1 \left[ - p \frac{\d}{\d t} u_2 - q u_2 \right]
|
||||||
|
- u_2 \left[ - p \frac{\d}{\d t} u_1 - q u_1 \right] \\
|
||||||
|
&= - u_1 p \frac{\d }{\d t}u_2 - u_1 q u_2 + u_2 p \frac{\d }{\d t} u_1 + u_2 q u_1 \\
|
||||||
|
&= -p \left( u_1 \frac{\d}{\d t} u_2 - u_2 \frac{\d }{\d t} u_1\right) \\
|
||||||
|
&= -p W(t)
|
||||||
|
.\end{salign*}
|
||||||
|
\end{enumerate}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\end{document}
|
||||||
Binary file not shown.
@@ -0,0 +1,296 @@
|
|||||||
|
\documentclass[uebung]{../../../lecture}
|
||||||
|
|
||||||
|
\title{Lineare Algebra II: Übungsblatt 10}
|
||||||
|
\author{Miriam Philipp, Dominik Daniel, Christian Merten}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\punkte[36]
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
Seien
|
||||||
|
\[
|
||||||
|
A = \begin{pmatrix} 0 & 2 & 0 \\
|
||||||
|
1 & 1 & 1 \\
|
||||||
|
0 & 3 & 2
|
||||||
|
\end{pmatrix} \in M_{3,3}(\R)
|
||||||
|
\] und $f_A$ die lineare Abbildung $\R^{3} \xrightarrow{A\cdot } \R^{3}$.
|
||||||
|
|
||||||
|
Beh.: Die
|
||||||
|
Darstellungsmatrix von $\bigwedge^2 f_A\colon \bigwedge^2\R^{3} \to \bigwedge^2\R^{3}$ bezüglich
|
||||||
|
der Basis $ \mathcal{B} = (e_1 \wedge e_2, e_1 \wedge e_3, e_2 \wedge e_3)$ ist gegeben als
|
||||||
|
\[
|
||||||
|
M_{\mathcal{B}}^{\mathcal{B}}\left({\bigwedge}^2 f_A\right) =
|
||||||
|
\begin{pmatrix}
|
||||||
|
-2 & 0 & 2 \\
|
||||||
|
0 & 0 & 4 \\
|
||||||
|
3 & 2 & -1
|
||||||
|
\end{pmatrix}
|
||||||
|
.\]
|
||||||
|
\begin{proof}
|
||||||
|
Berechne Bild der Basisvektoren unter $\bigwedge^2f_A$:
|
||||||
|
\begin{align*}
|
||||||
|
{\bigwedge}^2f_A(e_1 \wedge e_2) &= f_A(e_1) \wedge f_A(e_2) \\
|
||||||
|
&= e_2 \wedge (2 e_1 + e_2 + 3e_3) \\
|
||||||
|
&= 2 e_2 \wedge e_1 + e_2 \wedge e_2 + 3 e_2 \wedge e_3 \\
|
||||||
|
&= -2 e_1 \wedge e_2 + 3 e_2 \wedge e_3
|
||||||
|
\intertext{Für restliche Basisvektoren analog}
|
||||||
|
{\bigwedge}^2f_A(e_1 \wedge e_3) &= 2 e_2 \wedge e_3 \\
|
||||||
|
{\bigwedge}^2f_A(e_2 \wedge e_3) &= 2 e_1 \wedge e_2 + 4 e_1 \wedge e_3 - 1 e_2 \wedge e_3
|
||||||
|
.\end{align*}
|
||||||
|
Durch Ablesen der Koeffizienten folgt die Behauptung.
|
||||||
|
\end{proof}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
Seien $R$ ein Ring und $M$ ein $R$-Modul.
|
||||||
|
\begin{enumerate}[(a)]
|
||||||
|
\item Beh.: Ist $M$ endlich erzeugt und frei, so ist $M$ flach.
|
||||||
|
\begin{proof}
|
||||||
|
Seien $N, L$ $R$-Moduln und $\varphi\colon N \to L$ ein injektiver $R$-Modul.hom.
|
||||||
|
|
||||||
|
$M$ ist endlich erzeugt und frei. Fixiere Basis $(x_1, \ldots, x_n)$. Dann ist
|
||||||
|
$M \stackrel{\sim }{=} R^{n}$. D.h. es existieren R-Mod.iso.
|
||||||
|
$\Phi_1\colon M \otimes_R N \to R^{n} \otimes_R N$ und
|
||||||
|
$\Phi_2\colon M \otimes_R L \to R^{n} \otimes_R L$. Weiter ex. R.-Mod.isomorphismen
|
||||||
|
$f_1\colon R^{n} \otimes_R N \to N^{n}$ und $f_2\colon R^{n} \otimes_R L \to L^{n}$
|
||||||
|
mit $f_1((r_1, \ldots, r_n), x) = (r_1 x, \ldots, r_n x)$, analog für $f_2$.
|
||||||
|
|
||||||
|
Weiter definiere:
|
||||||
|
\begin{align*}
|
||||||
|
\psi\colon N^{n} &\to L^{n} \\
|
||||||
|
(n_1, \ldots, n_n) &\mapsto (\varphi(n_1), \ldots, \varphi(n_n))
|
||||||
|
.\end{align*}
|
||||||
|
$\psi$ ist $R$-Modulhom. und injektiv, da $\varphi$ injektiv ist. Definiere nun weiter
|
||||||
|
\begin{align*}
|
||||||
|
\Psi \colon M \otimes_R N \xrightarrow{\Phi_1} R^{n} \otimes_R N
|
||||||
|
\xrightarrow{f_1} N^{n}
|
||||||
|
\xrightarrow{\psi} L^{n}
|
||||||
|
\xrightarrow{f_2^{-1}} R^{n} \otimes_R L
|
||||||
|
\xrightarrow{\Phi_{2}^{-1}} M \otimes_R L
|
||||||
|
.\end{align*}
|
||||||
|
|
||||||
|
Beh.: $\Psi$ ist injektiver $R$-Modul.hom. mit $\text{id}_M \otimes \varphi = \Psi$.
|
||||||
|
|
||||||
|
$\Psi$ ist Verknüpfung von injektiven $R$-Modul.homomorphismen,
|
||||||
|
also selbst injektiver $R$-Mod.hom. Sei nun $a \otimes b \in M \otimes_R N$ beliebig.
|
||||||
|
Dann ist ex. $r_1, \ldots, r_n \in R$, s.d. $a = \sum_{i=1}^{n} r_i x_i$. Damit
|
||||||
|
folgt
|
||||||
|
\begin{salign*}
|
||||||
|
\Phi_1(a \otimes b) &= (r_1, \ldots, r_n) \otimes b \\
|
||||||
|
f_1((r_1, \ldots, r_n) \otimes b) &= (r_1 b, \ldots, r_n b) \\
|
||||||
|
\psi(r_1 b, \ldots, r_n b) &= (r_1 \varphi(b), \ldots, r_n \varphi(b)) \\
|
||||||
|
f_2^{-1}(r_1 \varphi(b), \ldots, r_n \varphi(b)) &=
|
||||||
|
(r_1, \ldots, r_n) \otimes \varphi(b) \\
|
||||||
|
\Phi_2^{-1}((r_1, \ldots, r_n) \otimes \varphi(b))
|
||||||
|
&= (a \otimes \varphi(b))
|
||||||
|
\intertext{Also folgt}
|
||||||
|
\Psi(a \otimes b) &= a \otimes \varphi(b) = (\text{id}_M \otimes \varphi)(a \otimes b)
|
||||||
|
.\end{salign*}
|
||||||
|
Also stimmen $\Psi$ und $\text{id}_M \otimes \varphi$ auf den Erzeugern überein, also
|
||||||
|
gilt $\Psi = \text{id}_M \otimes \varphi$. Damit ist auch $\text{id}_M \otimes \varphi$
|
||||||
|
injektiv.
|
||||||
|
\end{proof}
|
||||||
|
\item Seien $M$ flach, $N$ flacher $R$-Modul und $\varphi\colon M \to N$ injektiver
|
||||||
|
$R$-Mod.hom.
|
||||||
|
|
||||||
|
Beh.: $\varphi \otimes \varphi\colon M \otimes_R M \to N \otimes_R N$ ist
|
||||||
|
injektiv.
|
||||||
|
\begin{proof}
|
||||||
|
Es gilt
|
||||||
|
\[
|
||||||
|
\varphi \otimes \varphi
|
||||||
|
= \underbrace{(\text{id}_N \otimes \varphi)}_{\text{injektiv, da } N \text{ flach}}
|
||||||
|
\circ \underbrace{(\varphi \otimes \text{id}_M)}_{\text{injektiv, da } M \text{ flach}}
|
||||||
|
.\] Damit ist $\varphi \otimes \varphi$ als Verknüpfung zweier injektiver $R$-Mod.homs.
|
||||||
|
auch injektiv.
|
||||||
|
\end{proof}
|
||||||
|
\item Beh.: $\Z / 2\Z$ als $\Z$ Modul ist nicht flach.
|
||||||
|
\begin{proof}
|
||||||
|
Betrachte $\varphi\colon \Z \to \Z$, $r \mapsto 2r$. $\varphi$ ist injektiver
|
||||||
|
$R$-Modulhomomorphismus, aber
|
||||||
|
\[
|
||||||
|
(\varphi \otimes \text{id}_{\Z / 2\Z})( 1 \otimes \overline{1})
|
||||||
|
= \varphi(1) \otimes \overline{1} = 2 \otimes \overline{1}
|
||||||
|
= 1 \otimes (2\cdot \overline{1}) = 1 \otimes \overline{0} = 0
|
||||||
|
.\] $1 \otimes \overline{1} \neq 0$ in $\Z \otimes_R \Z / 2 \Z$, denn
|
||||||
|
mit $\beta\colon \Z \times \Z / 2\Z, (z, \overline{a}) \mapsto z \cdot \overline{a}$
|
||||||
|
bilinear und $\beta(1, \overline{1}) = \overline{1} \neq 0$ ist mit UT angewendet auf
|
||||||
|
$\beta$ und $\Z / 2 \Z$
|
||||||
|
$1 \otimes \overline{1} \neq 0$. Damit ist $\text{ker } (\varphi \otimes \text{id}_{\Z / 2\Z}) \neq \{0\} $, also $\varphi \otimes \text{id}_{\Z / 2 \Z}$ nicht injektiv.
|
||||||
|
\end{proof}
|
||||||
|
\end{enumerate}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
Seien $R$ ein Ring und $M$ ein e.e. freier $R$-Modul.
|
||||||
|
\begin{enumerate}[(a)]
|
||||||
|
\item Seien $N$ e.e. freier $R$-Modul und $\varphi\colon M \to N$ injektiver
|
||||||
|
$R$-Mod.hom.
|
||||||
|
|
||||||
|
Beh.: $\bigwedge^2 \varphi\colon \bigwedge^2 M \to \bigwedge^2 N$ ist injektiv.
|
||||||
|
\begin{proof}
|
||||||
|
Da $M$ und $N$ e.e. und frei ex. nach 35(a) und (b) eindeutige injektive
|
||||||
|
$R$-Mod.homs. $f\colon \bigwedge^2 M \to M \otimes_R M$ und
|
||||||
|
$g\colon \bigwedge^2 N \to N \otimes_R N$ mit
|
||||||
|
$f(a \wedge b) = a \otimes b - b \otimes a$, analog für $g$.
|
||||||
|
|
||||||
|
Definiere nun $\tilde{g}\colon \bigwedge^2N \to \text{Bild}(g)$. $\tilde{g}$ ist
|
||||||
|
damit surjektiv und injektiv, also $R$-Modul.iso., inbes. ex.
|
||||||
|
$\tilde{g}^{-1}\colon \text{Bild}(g) \to \bigwedge^2 N$.
|
||||||
|
|
||||||
|
Definiere weiter
|
||||||
|
\[
|
||||||
|
\psi\colon {\bigwedge}^2 M \xrightarrow[\text{inj. nach 35(b)}]{f} M \otimes_R M
|
||||||
|
\xrightarrow[\text{inj. nach 37(b)}]{\varphi \otimes \varphi} N \otimes_R N
|
||||||
|
\xrightarrow[\text{inj. nach 35(b)}]{\tilde{g}^{-1}} {\bigwedge}^2 N
|
||||||
|
.\] Z.z.: $\psi$ wohldefiniert, g.z.z.
|
||||||
|
$\text{Bild}((\varphi \otimes \varphi) \circ f) = \text{Bild}(g)$. Dazu
|
||||||
|
seien $a, b \in M$. Dann gilt
|
||||||
|
\begin{salign*}
|
||||||
|
(\varphi \otimes \varphi)(f(a \wedge b))
|
||||||
|
&= (\varphi \otimes \varphi)(a \otimes b - b \otimes a) \\
|
||||||
|
&= (\varphi(a) \otimes \varphi(b) - \varphi(b) \otimes \varphi(a)) \\
|
||||||
|
&= g(\varphi(a) \wedge \varphi(b)) \in \text{Bild}(g)
|
||||||
|
\intertext{Da Elemente der Form $a \wedge b$ $\bigwedge^2M$
|
||||||
|
erzeugen, folgt Behauptung. Damit ist $\psi$ als
|
||||||
|
Verkettung von injektiven $R$-Mod.homs, injektiver $R$-Mod.hom.
|
||||||
|
Bleibt zu zeigen: $\psi = \bigwedge^2 \varphi$. Mit obiger Rechnung folgt sofort}
|
||||||
|
\psi(a \wedge b) &=
|
||||||
|
\tilde{g}^{-1}((\varphi \otimes \varphi)f(a \wedge b)) \\
|
||||||
|
&= \tilde{g}^{-1}(g(\varphi(a) \wedge \varphi(b)))\\
|
||||||
|
&= \varphi(a) \wedge \varphi(b) \\
|
||||||
|
&= {\bigwedge}^2 \varphi(a \wedge b)
|
||||||
|
.\end{salign*}
|
||||||
|
Da $\bigwedge^2M$ von Elementen der Form $a \wedge b$ erzeugt wird, folgt $\psi = \bigwedge^2\varphi$.
|
||||||
|
Da $\psi$ injektiv als Verkettung von injektiven $R$-Mod.homs, ist $\bigwedge^2\varphi$ injektiv.
|
||||||
|
\end{proof}
|
||||||
|
\item Beh.: Für $m_1, m_2 \in M$ sind folgende Aussagen äquivalent:
|
||||||
|
\begin{enumerate}[(i)]
|
||||||
|
\item Die Familie $(m_1, m_2)$ ist linear unabhängig.
|
||||||
|
\item Aus $r (m_1 \wedge m_2) = 0$ in $\bigwedge^2M$ mit $r \in R$ folgt $r = 0$.
|
||||||
|
\end{enumerate}
|
||||||
|
\begin{proof}
|
||||||
|
(i) $\implies$ (ii): Definiere
|
||||||
|
\begin{align*}
|
||||||
|
\varphi\colon R &\to {\bigwedge}^2 M \\
|
||||||
|
r &\mapsto r (m_1 \wedge m_2)
|
||||||
|
.\end{align*}
|
||||||
|
Z.z.: $\varphi$ ist injektiv. Sei $(e_1, e_2)$ die Standardbasis
|
||||||
|
des $R^2$. Definiere damit
|
||||||
|
\begin{align*}
|
||||||
|
\Phi&\colon R \to {\bigwedge}^2 R^2, \quad
|
||||||
|
r \mapsto r (e_1 \wedge e_2) \\
|
||||||
|
\psi&\colon R^2 \to M, \quad
|
||||||
|
\psi(e_i) = m_i \quad i=1,2
|
||||||
|
.\end{align*}
|
||||||
|
Da $\{e_1 \wedge e_2 \}$ Basis von $\bigwedge^2 R^2$, ist $e_1 \wedge e_2$ l.u. und
|
||||||
|
damit $\Phi$ injektiv. Weiter sind $R^2$ und $M$ e.e. und frei und
|
||||||
|
$\psi$ injektiver $R$-Mod.hom. Mit (a) folgt damit, dass
|
||||||
|
$\bigwedge^2 \psi$ injektiv ist.
|
||||||
|
Außerdem gilt für $r \in R$ beliebig:
|
||||||
|
\begin{salign*}
|
||||||
|
\left({\bigwedge}^2 \psi\right)(\Phi(r)) &= ({\bigwedge}^2\psi)(r (e_1 \wedge e_2)) \\
|
||||||
|
&= r (\psi(e_1) \wedge \psi(e_2)) \\
|
||||||
|
&= r (m_1 \wedge m_2) \\
|
||||||
|
&= \varphi(r)
|
||||||
|
.\end{salign*}
|
||||||
|
Damit gilt $\varphi = \bigwedge^2 \psi \circ \Phi$ und damit
|
||||||
|
$\varphi$ injektiv, als Verkettung injektiver $R$-Mod.homs.
|
||||||
|
|
||||||
|
(ii) $\implies$ (i): Kontraposition. Seien $(m_1, m_2)$ linear abhängig. Dann ex.
|
||||||
|
ein $\alpha \in R$ mit $m_1 = \alpha m_2$. Damit folgt
|
||||||
|
\[
|
||||||
|
1 \cdot (m_1 \wedge m_2) = 1 \cdot (\alpha m_2 \wedge m_2) = \alpha (m_2 \wedge m_2) = 0
|
||||||
|
,\] aber $1 \neq 0$ in $R$, da $R \neq 0$ nach Konvention der VL von Kapitel 9.
|
||||||
|
\end{proof}
|
||||||
|
\item Beh.: Für $\text{Rang}(M) = 2$ und $\varphi \in \text{End}_R(M)$ sind
|
||||||
|
die folgenden Aussagen äquivalent:
|
||||||
|
\begin{enumerate}[(i)]
|
||||||
|
\item $\varphi$ ist injektiv
|
||||||
|
\item $\text{det}(\varphi) \in R$ ist kein Nullteiler
|
||||||
|
\end{enumerate}
|
||||||
|
\begin{proof}
|
||||||
|
(i) $\implies$(ii): Da $\varphi$ injektiv, ist $\bigwedge^2 \varphi$ injektiv.
|
||||||
|
Sei $(x_1, x_2)$ Basis von $M$. Dann gilt
|
||||||
|
\begin{salign*}
|
||||||
|
{\bigwedge}^2\varphi(\underbrace{x_1 \wedge x_2}_{\neq 0})
|
||||||
|
= \varphi(x_1) \wedge \varphi(x_2)
|
||||||
|
= \text{det}(\varphi) (x_1 \wedge x_2)
|
||||||
|
\neq 0
|
||||||
|
.\end{salign*}
|
||||||
|
Also gilt $\text{det}(\varphi) \neq 0$.
|
||||||
|
Sei nun $r \in R$ beliebig mit $\text{det}(\varphi) r = 0$. Dann betrachte
|
||||||
|
\begin{salign*}
|
||||||
|
{\bigwedge}^2 \varphi(r x_1 \wedge x_2)
|
||||||
|
= \varphi(r x_1) \wedge \varphi(x_2)
|
||||||
|
= \text{det}(\varphi) r (x_1 \wedge x_2)
|
||||||
|
= 0
|
||||||
|
= r \underbrace{(\text{det}(\varphi) x_1 \wedge x_2)}_{\neq 0}
|
||||||
|
.\end{salign*}
|
||||||
|
Da $(x_1, x_2)$ Basis sind auch $\text{det}(\varphi) x_1$ und $x_2$ linear unabhängig, d.h.
|
||||||
|
mit (b) folgt $r = 0$.
|
||||||
|
|
||||||
|
(ii) $\implies$ (i): Sei $m \in M$ beliebig mit $\varphi(m) = 0$ und $(x_1, x_2)$ Basis
|
||||||
|
von $M$.
|
||||||
|
Ang.: $m \neq 0$. Dann ex. $a, b \in R$ mit $m = ax_1 + b x_2$ mit
|
||||||
|
$a \neq 0 \lor b\neq 0$. O.E.: $a \neq 0$. Dann folgt
|
||||||
|
\begin{salign*}
|
||||||
|
0 &= \varphi(m) \wedge \varphi(x_2) \\
|
||||||
|
&= \text{det}(\varphi) (m \wedge x_2) \\
|
||||||
|
&= \text{det}(\varphi) (a x_1 + b x_2) \wedge x_2 \\
|
||||||
|
&= \text{det}(\varphi) (a x_1 \wedge x_2) \\
|
||||||
|
&= \text{det}(\varphi) \cdot a (x_1 \wedge x_2)
|
||||||
|
.\end{salign*}
|
||||||
|
Da $x_1$, $x_2$ l.u., folgt mit (b), dass $\text{det}(\varphi) \cdot a = 0$. Da
|
||||||
|
$\text{det}(\varphi) $ kein Nullteiler, folgt $a \neq 0$ $\contr$.
|
||||||
|
\end{proof}
|
||||||
|
\end{enumerate}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
Seien $N = \Z$, $M = \bigoplus_{i \in \N} \Z / 2 \Z$ und
|
||||||
|
$f\colon N \to M \oplus M$, $g: N \oplus M \to M$ gegeben durch
|
||||||
|
\[
|
||||||
|
f(n) = (2n, 0) \quad \text{und} \quad g(n, (\overline{m_1}, \ldots, )) = (\overline{n}, \overline{m_1}, \ldots)
|
||||||
|
.\]
|
||||||
|
\begin{enumerate}[(a)]
|
||||||
|
\item Beh.: Die Folge $0 \to N \xrightarrow{f} N \oplus M \xrightarrow{g} M \to 0$ ist eine
|
||||||
|
kurze exakte Folge von $\Z$-Moduln.
|
||||||
|
\begin{proof}
|
||||||
|
Offensichtlicherweise ist $f$ injektiv und $g$ surjektiv. Bleibt zu zeigen:
|
||||||
|
$\text{ker } g = \text{im } f$.
|
||||||
|
|
||||||
|
,,$\subseteq $``: Sei $x \in \text{ker } g$. Dann ex. $n, m_1, m_2, \ldots \in \Z$ mit
|
||||||
|
$x = (n, (\overline{m_1}, \ldots))$. Da $g(x) = 0$ folgt
|
||||||
|
$\overline{n} = \overline{m_1}= \ldots = 0$. Damit ex. $z \in \Z$ mit $z = 2 z$. Also
|
||||||
|
ist $f(z) = (2z, 0) = (n, 0) = (n, (\overline{m_1}, \overline{m_2}, \ldots)) = x$.
|
||||||
|
Damit ist $x \in \text{im }f$.
|
||||||
|
|
||||||
|
,,$\supseteq$``: Sei $x \in \text{im } f$. Dann $\exists n \in \Z$, s.d.
|
||||||
|
$f(n) = (2n, 0) = x$. Damit folgt
|
||||||
|
$g(x) = g(2n, 0) = (\overline{2n}, 0, \ldots) = (\overline{0}, \overline{0}, \ldots) = 0$. Also
|
||||||
|
$x \in \text{ker } g$.
|
||||||
|
\end{proof}
|
||||||
|
\item Beh.: Die Folge aus (a) zerfällt nicht.
|
||||||
|
\begin{proof}
|
||||||
|
Ang.: Die Folge aus (a) zerfällt. Dann ex. ein $\Z$-Untermodul $T \subseteq N \oplus M$,
|
||||||
|
s.d. $g|_T\colon T \to M$ Isomorphismus ist. Wähle
|
||||||
|
$x \coloneqq (\overline{1}, \overline{0}, \ldots) \in M$. Da $g|_T$ surjektiv,
|
||||||
|
ex. ein $y \in T$, s.d. $g(y) = x$. Es ex. $n, m_1, \ldots \in \Z$ mit
|
||||||
|
$y = (n, (\overline{m_1}, \ldots))$. Wegen
|
||||||
|
\[
|
||||||
|
g(y) = g(n, (\overline{m_1}, \ldots)) = (\overline{n}, \overline{m_1}, \ldots)
|
||||||
|
= (\overline{1}, \overline{0}, \ldots) = x
|
||||||
|
\] folgt $n \equiv 1$ $(\text{mod } n)$. Da $T$ $\Z$-Untermodul, ist auch
|
||||||
|
$2y = (2n, (\overline{2 m_1}, \ldots)) = (2n, 0) \in T$. Damit folgt
|
||||||
|
\[
|
||||||
|
g(y) = g(2n, 0) = (\overline{2n}, \overline{0}, \ldots) = (\overline{0}, \overline{0}, \ldots) = 0
|
||||||
|
.\]
|
||||||
|
Da $n \neq 0$ und $\Z$ nullteilerfrei,
|
||||||
|
folgt $y = (2n,0) \neq 0$, folgt $\text{ker } g|_T \neq \{0\} $ $\contr$.
|
||||||
|
\end{proof}
|
||||||
|
\end{enumerate}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\end{document}
|
||||||
Binary file not shown.
@@ -0,0 +1,299 @@
|
|||||||
|
\documentclass[uebung]{../../../lecture}
|
||||||
|
|
||||||
|
\title{Lineare Algebra II: Übungsblatt 11}
|
||||||
|
\author{Dominik Daniel, Miriam Philipp, Christian Merten}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\punkte[40]
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
Sei $R$ ein nullteilerfreier Ring und $M$ ein $R$-Modul.
|
||||||
|
\begin{enumerate}[(a)]
|
||||||
|
\item Beh.: Auf der Menge $R \times (R \setminus \{0\})$ wird durch $(r_1, s_1) \sim (r_2, s_2) \iff r_1s_2 = r_2s_1$
|
||||||
|
eine Äquivalenzrelation definiert.
|
||||||
|
\begin{proof}
|
||||||
|
Reflexivität und Symmetrie sind klar.
|
||||||
|
|
||||||
|
Seien weiter $r_1, r_2, r_3 \in R$ und $s_1, s_2, s_3 \in R\setminus \{0\} $ mit
|
||||||
|
$(r_1, s_1) \sim (r_2, s_2)$ und $(r_2, s_2) \sim (r_3, s_3)$. Dann gilt
|
||||||
|
\[
|
||||||
|
r_1 s_2 = r_2 s_1 \land r_2 s_3 = s_2 r_3
|
||||||
|
.\]
|
||||||
|
Damit folgt
|
||||||
|
\begin{salign*}
|
||||||
|
\underbrace{r_1 s_2}_{= r_2 s_1} s_3 = \underbrace{r_2 s_3}_{= s_2 r_3} s_1
|
||||||
|
= s_2 r_1 s_3 \\
|
||||||
|
\implies s_2(r_1 s_3) = s_2 (s_1 r_3) \\
|
||||||
|
\implies s_2 (r_1 s_3 - s_1 r_3) = 0
|
||||||
|
.\end{salign*}
|
||||||
|
Da $s_2 \neq 0$ und $R$ nullteilerfrei, folgt
|
||||||
|
\begin{salign*}
|
||||||
|
r_1 s_3 - s_1 r_3 = 0 \implies r_1 s_3 = s_1 r_3 \implies (r_1, s_1) \sim (r_3, s_3)
|
||||||
|
.\end{salign*}
|
||||||
|
Das zeigt die Transitivität von $\sim$ und damit die Behauptung.
|
||||||
|
\end{proof}
|
||||||
|
\item Beh.: Die Operationen
|
||||||
|
\[
|
||||||
|
\frac{r_1}{s_1} + \frac{r_2}{s_2} \coloneqq \frac{r_1s_2 + r_2s_1}{s_1 s_2}
|
||||||
|
\quad \text{und} \quad
|
||||||
|
\frac{r_1}{s_1} \cdot \frac{r_2}{s_2} \coloneqq \frac{r_1 r_2}{s_1s_2}
|
||||||
|
\] sind wohldefiniert.
|
||||||
|
\begin{proof}
|
||||||
|
Seien $r_1, \tilde{r}_1, r_2 \in R$ und $s_1, \tilde{s}_1, s_2 \in R \setminus \{0\} $
|
||||||
|
mit $(r_1, s_1) \sim (\tilde{r}_1, \tilde{s}_1)$.
|
||||||
|
|
||||||
|
Z.z.: $(r_1s_2 + r_2s_1, s_1s_2) \sim (\tilde{r}_1 s_2 + r_2 \tilde{s}_1, \tilde{s}_1 s_2)$.
|
||||||
|
Es ist
|
||||||
|
\begin{salign*}
|
||||||
|
(r_1 s_2 + r_2s_1) \tilde{s}_1 s_2 &= r_1 s_2 \tilde{s}_1 s_2 + r_2 s_1 \tilde{s}_1 s_2 \\
|
||||||
|
&\stackrel{r_1 \tilde{s}_1 = \tilde{r}_1 s_1}{=}
|
||||||
|
s_1 s_2 \tilde{r}_1 s_2 + r_2 s_1 \tilde{s}_1 s_2 \\
|
||||||
|
&= s_1s_2(\tilde{r}_1 s_2 + r_2 \tilde{s}_1)
|
||||||
|
.\end{salign*}
|
||||||
|
Damit folgt die Behauptung.
|
||||||
|
|
||||||
|
Z.z.: $(r_1r_2, s_1s_2) \sim (\tilde{r}_1r_2, \tilde{s}_1 s_2)$.
|
||||||
|
Es ist
|
||||||
|
\begin{salign*}
|
||||||
|
r_1 r_2 \tilde{s}_1 s_2
|
||||||
|
&\stackrel{r_1 \tilde{s}_1 = \tilde{r}_1 s_1}{=} s_1 s_2 \tilde{r}_1 r_2
|
||||||
|
.\end{salign*}
|
||||||
|
Damit folgt die Behauptung.
|
||||||
|
|
||||||
|
Wohldefiniertheit folgt für zweites Argument aus Symmetriegründen.
|
||||||
|
\end{proof}
|
||||||
|
\item Beh.: Auf der Menge $M \times (R \setminus \{0\} )$ wird durch
|
||||||
|
\[
|
||||||
|
(x_1, r_1) \sim (x_2, r_2) \iff \exists s \in R \setminus \{0\} \text{ mit } s r_1 x_2 = s r_2 x_1
|
||||||
|
\] eine Äquivalenzrelation definiert.
|
||||||
|
\begin{proof}
|
||||||
|
Reflexivität und Symmetrie sind klar.
|
||||||
|
|
||||||
|
Seien weiter $x_1, x_2, x_3 \in R$ und $r_1, r_2, r_3 \in R\setminus \{0\} $ mit
|
||||||
|
$(x_1, r_1) \sim (x_2, r_2)$ und $(x_2, r_2) \sim (x_3, r_3)$. Dann ex.
|
||||||
|
$s_1, s_2 \in R \setminus \{0\} $ mit $s_1 r_1 x_2 = s_1 r_2 x_1$ und
|
||||||
|
$s_2 r_2 x_3 = s_2 r_3 x_2$.
|
||||||
|
|
||||||
|
Definiere $s \coloneqq s_1 s_2 r_2$. Es ist $s \neq 0$, da $s_1, s_2, r_2 \in R \setminus \{0\} $
|
||||||
|
und $R$ nullteilerfrei. Dann folgt
|
||||||
|
\begin{salign*}
|
||||||
|
s_1 s_2 r_2 \cdot r_1 x_3 = s_1 r_1 \underbrace{s_2 r_2 x_3}_{= s_2 r_3 x_2}
|
||||||
|
= s_2 r_3 \underbrace{s_1 r_1 x_2}_{s_1 r_2 x_1}
|
||||||
|
= s_1 s_2 r_2 \cdot r_3 x_1
|
||||||
|
.\end{salign*}
|
||||||
|
Das zeigt die Transitivität von $\sim$ und damit die Behauptung.
|
||||||
|
\end{proof}
|
||||||
|
\item Beh.: Mit $R = \Z$ und $M = \Z / 2 \Z$ ist die gegebene Relation nicht
|
||||||
|
transitiv.
|
||||||
|
\begin{proof}
|
||||||
|
Es ist
|
||||||
|
\[
|
||||||
|
(\overline{1}, 1) \sim (\overline{0}, 2) \land (\overline{0}, 2) \sim (\overline{0},1)
|
||||||
|
,\] denn $\overline{1} \cdot 2 = \overline{0} = 1 \cdot \overline{0}$ und
|
||||||
|
$\overline{0} \cdot 1 = \overline{0} = 2 \cdot \overline{0}$. Aber
|
||||||
|
$\overline{1}\cdot 1 = \overline{1} \neq \overline{0} = 1\cdot \overline{0}$. Also
|
||||||
|
ist $(\overline{1}, 1) \not\sim (\overline{0}, 1)$
|
||||||
|
\end{proof}
|
||||||
|
\end{enumerate}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
\begin{enumerate}[(a)]
|
||||||
|
\item Beh.: Seien $R$ ein nullteilerfreier Ring und $M$ ein e.e. $R$-Modul. Dann sind die folgenden
|
||||||
|
Aussagen sind äquivalent:
|
||||||
|
\begin{enumerate}[(i)]
|
||||||
|
\item $M$ ist ein Torsions-$R$-Modul
|
||||||
|
\item Es gilt $\text{Ann}(M) \neq (0)$
|
||||||
|
\end{enumerate}
|
||||||
|
\begin{proof}
|
||||||
|
(i) $\implies$ (ii): Sei $T(M) = M$. Da $M$ e.e. existiert ein endliches ES.
|
||||||
|
$\{x_1, \ldots, x_n\} \subseteq M$ von $M$.
|
||||||
|
Da $x_1, \ldots, x_n \in M = T(M)$ existieren $s_1, \ldots, s_n \in R \setminus \{0\} $
|
||||||
|
mit
|
||||||
|
\[
|
||||||
|
x_1 s_1 = x_2 s_2 = \ldots = x_n s_n = 0 \quad (*)
|
||||||
|
.\] Wähle $a \coloneqq s_1 \cdot \ldots \cdot s_n$. Es ist $a \neq 0$, da
|
||||||
|
$s_1, \ldots, s_n \neq 0$ und $R$ nullteilerfrei. Sei
|
||||||
|
nun $m \in M$ beliebig. Dann ex. $\alpha_1, \ldots, \alpha_n \in R$ mit
|
||||||
|
$m = \sum_{i=1}^{n} \alpha_i x_i$. Damit folgt
|
||||||
|
\[
|
||||||
|
a m = \sum_{i=1}^{n} a \alpha_i x_i = \sum_{i=1}^{n} \alpha_i s_1 \cdot \ldots \cdot s_n x_i
|
||||||
|
\stackrel{(*)}{=} 0
|
||||||
|
.\] Damit ist $0 \neq a \in \text{Ann}(M)$, also $\text{Ann}(M) \neq (0)$.
|
||||||
|
|
||||||
|
(ii) $\implies$ (i): Sei $a \in \text{Ann}(M)$ mit $a \neq 0$. Dann gilt
|
||||||
|
$\forall m \in M$: $a m = 0$. Da $a \neq 0$ folgt $m \in T(M)$, also $M = T(M)$.
|
||||||
|
\end{proof}
|
||||||
|
\item Sei $R = \Z$ und $M = \oplus_{n \in \N} \Z / 2^{n} \Z$.
|
||||||
|
|
||||||
|
Beh.: $M$ ist ein Torsions-$R$-Modul.
|
||||||
|
\begin{proof}
|
||||||
|
Sei $m \in M$ beliebig. Dann ex. $m_i \in \Z / 2^{i} \Z$ mit
|
||||||
|
$m = (m_i)_{i \in \N}$ wobei $m_i = 0$ für fast alle $i \in \N$.
|
||||||
|
Es ex. also eine Indexmenge $I \subseteq \N$ mit $\# I < \infty$ s.d.
|
||||||
|
$m_i \neq 0$ $\forall i \in I$ und $m_i = 0$ $\forall i \in \N \setminus I$.
|
||||||
|
|
||||||
|
Definiere nun
|
||||||
|
\[
|
||||||
|
a \coloneqq \prod_{i \in I} 2^{i}
|
||||||
|
.\] $a$ ist wohldefiniert, da $I$ endlich ist. Außerdem gilt
|
||||||
|
$a \neq 0$ da $2^{i} \neq 0$ $\forall i \in \N$ und $\Z$ nullteilerfrei.
|
||||||
|
Weiter gilt $\forall i \in I$: $a \cdot m_i = 0$, denn $\exists r_i \in \Z$ mit
|
||||||
|
$m_i = r_i + \Z / 2^{i} \Z$. Da $2^{i} \mid a$ ex. $s_i \in \Z$ mit
|
||||||
|
$a = s_i \cdot 2^{i}$. Damit folgt
|
||||||
|
\[
|
||||||
|
a m_i = a \left( r_i + 2^{i} \Z \right)
|
||||||
|
= s_i r_i 2^{i} + 2^{i} \Z = 2^{i} \Z = \overline{0} \in \Z / 2^{i} \Z
|
||||||
|
.\] Insgesamt folgt damit $(a m)_i = 0$ $\forall i \in \N$, also
|
||||||
|
$a m = 0$.
|
||||||
|
\end{proof}
|
||||||
|
|
||||||
|
Beh.: $\text{Ann}(M) = (0)$.
|
||||||
|
\begin{proof}
|
||||||
|
Ang. $\exists a \in \text{Ann}(M)$ mit $a \neq 0$. Dann ist $a \in \Z$ und
|
||||||
|
es ex. $k \in \N$ s.d. $2^{k} > |a|$. Damit folgt
|
||||||
|
$2^{k} \nmid a$, also $a \not\equiv 0$ $(\text{mod } 2^{k})$ $(*)$. Wähle nun
|
||||||
|
$m \coloneqq (m_1, m_2, \ldots)$ mit
|
||||||
|
\[
|
||||||
|
m_i = \begin{cases}
|
||||||
|
0 & i \neq 2^{k} \\
|
||||||
|
\overline{1} & i = 2^{k}
|
||||||
|
\end{cases}
|
||||||
|
.\] Es ist $m_i = 0$ für fast alle $i \in N$ also $m \in M$, aber
|
||||||
|
\[
|
||||||
|
a \cdot m_k =
|
||||||
|
a \cdot \overline{1}
|
||||||
|
=
|
||||||
|
a + 2^{i} \Z \stackrel{(*)}{\neq} 0
|
||||||
|
.\] Damit folgt $a m \neq 0$, also $a \not\in \text{Ann}(M)$ $\contr$.
|
||||||
|
\end{proof}
|
||||||
|
\end{enumerate}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
Sei $M$ der $\R[t]$-Modul $\R[t]/(t^2)$.
|
||||||
|
\begin{enumerate}[(a)]
|
||||||
|
\item Beh.: $T(M) = M$.
|
||||||
|
\begin{proof}
|
||||||
|
Sei $\overline{f} \in \R[t] / (t^2)$ beliebig. Dann wähle $a \coloneqq t^2 \in \R[t]$.
|
||||||
|
Es ist $a \neq 0$ und
|
||||||
|
\[
|
||||||
|
a m = t^2 f + (t^2) = (t^2) = 0 \in \R[t] / (t^2)
|
||||||
|
.\]
|
||||||
|
\end{proof}
|
||||||
|
Beh.: $\text{Rang}(M) = 0$.
|
||||||
|
\begin{proof}
|
||||||
|
Sei $m \in M$. Dann ist $m \in T(M)$. Also ex. $s \in \R[t] \setminus \{0\} $
|
||||||
|
mit $s m = 0$. Also ist $m$ linear abhängig. Die
|
||||||
|
max. Anzahl l.u. Elemente in $M$ ist also $0$. Damit folgt die Behauptung.
|
||||||
|
\end{proof}
|
||||||
|
\item Beh (i).: $\mathcal{B} = \{\overline{1}, \overline{t}\} $ ist Basis von $\R[t] / (t^2)$ als $\R$-Modul.
|
||||||
|
\begin{proof}
|
||||||
|
Sei $\overline{f} \in \R[t] / (t^2)$ beliebig. $\R$ ist Körper, also ist $\R[t]$
|
||||||
|
Euklidscher Ring. Also existieren $r, q \in \R[t]$ mit $\text{deg}(r) < \text{deg}(t^2) = 2$
|
||||||
|
und
|
||||||
|
\[
|
||||||
|
f = q t^2 + r
|
||||||
|
.\]
|
||||||
|
Da $\text{deg}(r) < 2$ ex. $a_0, a_1 \in \R$ mit
|
||||||
|
\[
|
||||||
|
r = a_0 + a_1 t
|
||||||
|
.\] Damit folgt
|
||||||
|
\[
|
||||||
|
\overline{f} = f + (t^2) = q t^2 + r + (t^2) = a_0 + a_1 t + (t^2)
|
||||||
|
= a_0 \overline{1} + a_1 \overline{1}
|
||||||
|
.\] Also ist $\mathcal{B}$ ES. von $\R[t] / (t^2)$ als $\R$-Modul.
|
||||||
|
|
||||||
|
Seien außerdem weiter $a, b \in \R$ mit
|
||||||
|
\[
|
||||||
|
a \overline{1} + b \overline{t} = 0 \implies a + bt + (t^2) = 0 \implies
|
||||||
|
a + bt \in (t^2)
|
||||||
|
.\] Wegen $\text{deg}(a + bt) \le 1$ folgt $a = b = 0$. Also
|
||||||
|
$\mathcal{B}$ l.u. und $\mathcal{B}$ Basis von $\R[t] / (t^2)$ als $\R$- Modul.
|
||||||
|
\end{proof}
|
||||||
|
Beh.: $\R[t] / (t^2)$ ist torsionsfreier $\R$-Modul vom Rang $2$.
|
||||||
|
\begin{proof}
|
||||||
|
Wegen (i) ist $\R[t] / (t^2)$ frei mit Rang $2$ als
|
||||||
|
$\R$-Modul und damit auch torsionsfrei nach VL.
|
||||||
|
\end{proof}
|
||||||
|
\item Beh.: $\ell(M) = 2$ mit Kompositionsfaktoren $t / (t^2)$ und $\R[t] / (t^2)$.
|
||||||
|
\begin{proof}
|
||||||
|
Nach VL sind die Untermoduln von $\R[t] / (t^2)$ gerade die Untermoduln
|
||||||
|
$N$ von $\R[t]$ mit $(t^2) \subseteq N$. Diese sind gerade
|
||||||
|
die Ideale $N$ im HIR $\R[t]$ mit $(t^2) \subseteq N$, also
|
||||||
|
$\{(t^2), (t), (1)\} $. Damit sind die Untermoduln von $\R[t] / (t^2)$ gegeben als
|
||||||
|
\[
|
||||||
|
\left\{ (t^2)/(t^2), (t) / (t^2), (1) / (t^2)\right\}
|
||||||
|
=
|
||||||
|
\left\{ 0, (t) / (t^2), \R[t] / (t^2)\right\}
|
||||||
|
.\] Als längste Filtrierung ergibt sich damit sofort
|
||||||
|
\[
|
||||||
|
0 \subsetneqq (t) / (t^2) \subsetneqq \R[t] / (t^2)
|
||||||
|
.\] Also folgt $\ell(M) = 2$. Die Kompositionsfaktoren ergeben sich unter
|
||||||
|
Benutzung der Isomorphiesätze der VL als:
|
||||||
|
\begin{align*}
|
||||||
|
( (t) / (t^2) ) / 0 &\stackrel{\sim}{=} (t) / (t^2) \\
|
||||||
|
( (1) / (t^2)) / ( (t) / (t^2)) &\stackrel{\sim}{=} (1) / (t)
|
||||||
|
= \R[t] / (t^2)
|
||||||
|
.\end{align*}
|
||||||
|
Diese sind nach VL einfach, da die Filtrierung Länge $2 = \ell(M)$ hat.
|
||||||
|
\end{proof}
|
||||||
|
\end{enumerate}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
Seien $R$ ein Ring und $M$, $N$ zwei $R$-Moduln und $\varphi\colon M \to N$ ein $R$-Mod.hom.
|
||||||
|
\begin{enumerate}[(a)]
|
||||||
|
\item Beh.: Es gilt $\ell(\text{ker } \varphi) = \ell(\text{im }\varphi) = \ell(M)$.
|
||||||
|
\begin{proof}
|
||||||
|
Definiere $\tilde{\varphi}\colon M \to \text{im }\varphi$, $m \mapsto \varphi(m)$. Dann
|
||||||
|
ist $\tilde{\varphi}$ surjektiv. Sei weiter
|
||||||
|
$\iota \colon \text{ker } \varphi \to M$ die kanonische Inklusion. Da $\iota$ injektiv
|
||||||
|
und $\text{im }\iota = \text{ker } \varphi = \text{ker } \tilde{\varphi}$ ist die kurze Folge
|
||||||
|
\[
|
||||||
|
0 \to \text{ker } \varphi \to M \to \text{im } \varphi \to 0
|
||||||
|
\] exakt. Also folgt $\ell(\text{ker } \varphi) + \ell(\text{im }\varphi) = \ell(M)$.
|
||||||
|
\end{proof}
|
||||||
|
\item Beh.: Für $\ell(M) < \infty$ gilt $\ell(L) < \ell(M)$ für jeden echten $R$-Untermodul
|
||||||
|
$L \subsetneqq M$.
|
||||||
|
\begin{proof}
|
||||||
|
Sei $\ell(M) = n$ und $L \subsetneqq M$ Untermodul. Ang.: $\ell(L) \ge n$. Dann
|
||||||
|
ex. Filtrierung von $L$ der Länge $n$:
|
||||||
|
\[
|
||||||
|
0 \subsetneqq L_1 \subsetneqq L_2 \subsetneqq \ldots \subsetneqq L_n = L
|
||||||
|
.\] Dann ist aber
|
||||||
|
\[
|
||||||
|
0 \subsetneqq L_1 \subsetneqq L_2 \subsetneqq \ldots \subsetneqq L \subsetneqq M
|
||||||
|
\] eine Filtrierung von $M$ der Länge $n+1$ $\contr$.
|
||||||
|
\end{proof}
|
||||||
|
\item Beh.: Für $\ell(M) < \infty$ und $N = M$ gilt
|
||||||
|
\[
|
||||||
|
\varphi \text{ injektiv } \iff \varphi \text{ surjektiv } \iff \varphi \text{ bijektiv}
|
||||||
|
.\]
|
||||||
|
\begin{proof}
|
||||||
|
(i) $\implies$ (ii): Sei $\varphi$ injektiv. Dann ist $\text{ker } \varphi = 0$. Also
|
||||||
|
$\ell(\text{ker } \varphi) = 0$. Damit folgt aus (a)
|
||||||
|
\[
|
||||||
|
\ell(M) = \ell(\text{ker } \varphi) + \ell(\text{im } \varphi) =
|
||||||
|
\ell(\text{im } \varphi)
|
||||||
|
.\] Da $\ell(M) < \infty$ und $\text{im }\varphi$ Untermodul von $M$, aber
|
||||||
|
$\ell(\text{im } \varphi) = \ell(M)$ folgt mit (b), dass $\text{im }\varphi$ kein
|
||||||
|
echter Untermodul von $M$ ist. Also folgt $\text{im }\varphi = M$, also
|
||||||
|
$\varphi$ surjektiv.
|
||||||
|
|
||||||
|
(ii) $\implies$ (iii): Sei $\varphi$ surjektiv. g.z.z. $\varphi$ injektiv.
|
||||||
|
Es folgt aus (a):
|
||||||
|
\begin{align*}
|
||||||
|
\ell(M) &= \ell(\text{im }\varphi) + \ell(\text{ker } \varphi) \\
|
||||||
|
&= \ell(M) + \ell(\text{ker }\varphi)
|
||||||
|
.\end{align*}
|
||||||
|
Da $\ell(M) \in \N_0$ folgt $\ell(\text{ker } \varphi) = 0$. Also nach VL
|
||||||
|
$\text{ker }\varphi = 0$, also $\varphi$ injektiv.
|
||||||
|
|
||||||
|
(iii) $\implies$ (i): trivial.
|
||||||
|
\end{proof}
|
||||||
|
\end{enumerate}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\end{document}
|
||||||
Binary file not shown.
@@ -0,0 +1,239 @@
|
|||||||
|
\documentclass[uebung]{../../../lecture}
|
||||||
|
|
||||||
|
\title{Lineare Algebra II: Übungsblatt 9}
|
||||||
|
\author{Miriam Philipp, Dominik Daniel, Christian Merten}
|
||||||
|
|
||||||
|
\usepackage[]{gauss}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\punkte[32]
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
\begin{enumerate}[(a)]
|
||||||
|
\item Beh.: $\sqrt{2} $ ist EW von $A$ und $\sqrt{3}$ ist EW von $B$.
|
||||||
|
\begin{proof}
|
||||||
|
Es ist $\chi_{A}^{\text{char}} = t^2 - 2$. Damit folgt
|
||||||
|
$\chi_{A}^{\text{char}} (\sqrt{2} ) = 0$.
|
||||||
|
|
||||||
|
Weiter ist $\chi_{B}^{\text{char}} = t^2 - 3$. Damit folgt
|
||||||
|
$\chi_{B}^{\text{char}} (\sqrt{3}) = 0$.
|
||||||
|
\end{proof}
|
||||||
|
\item Beh.:
|
||||||
|
\[
|
||||||
|
C = \begin{pmatrix} 0 & 3 & 2 & 0 \\
|
||||||
|
1 & 0 & 0 & 2 \\
|
||||||
|
1 & 0 & 0 & 3 \\
|
||||||
|
0 & 1 & 1 & 0\end{pmatrix}
|
||||||
|
.\]
|
||||||
|
\begin{proof}
|
||||||
|
Es ist mit Kroneckerprodukt
|
||||||
|
\begin{salign*}
|
||||||
|
A \otimes E_2 &= \begin{pmatrix} 0 & 2 \\ 1 & 0 \end{pmatrix}
|
||||||
|
\otimes \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}
|
||||||
|
= \begin{pmatrix} 0 & \begin{matrix} 2 & 0 \\ 0 & 2 \end{matrix} \\ \begin{matrix} 1 & 0 \\ 0 & 1 \end{matrix} & 0 \end{pmatrix} \\
|
||||||
|
E_2 \otimes B &= \begin{pmatrix}
|
||||||
|
\begin{matrix} 0 & 3 \\ 1 & 0 \end{matrix} & 0 \\
|
||||||
|
0 & \begin{matrix} 0 & 3 \\ 1 & 0 \end{matrix}
|
||||||
|
\end{pmatrix}
|
||||||
|
.\end{salign*}
|
||||||
|
Mit $C = A \otimes E_2 + E_2 \otimes B$ folgt die Behauptung.
|
||||||
|
\end{proof}
|
||||||
|
\item Beh.: $\chi_{C}^{\text{char}} = t ^{4} -10t^2 + 1$ und
|
||||||
|
$\chi_{C}^{\text{char}} (\sqrt{2} + \sqrt{3}) = 0$.
|
||||||
|
\begin{proof}
|
||||||
|
\begin{align*}
|
||||||
|
\chi_{C}^{\text{char}} = \text{det}(tE_4 - C)
|
||||||
|
= \begin{gmatrix}[v]
|
||||||
|
t & -3 & -2 & 0 \\
|
||||||
|
-1 & t & 0 & -2 \\
|
||||||
|
-1 & 0 & t & -3 \\
|
||||||
|
0 & -1 & -1 & t
|
||||||
|
\rowops
|
||||||
|
\add[-1]{1}{2}
|
||||||
|
\add[t]{1}{0}
|
||||||
|
\end{gmatrix}
|
||||||
|
=
|
||||||
|
\begin{gmatrix}[v] 0 & -3+t^2 & -2 & -2t \\
|
||||||
|
-1 & t & 0 & -2 \\
|
||||||
|
0 & -t & t & -1 \\
|
||||||
|
0 & -1 & -1 & t
|
||||||
|
\end{gmatrix} \\
|
||||||
|
= \begin{gmatrix}[v]
|
||||||
|
-3 + 3t^2 & -2 -2t^2 & -2t \\
|
||||||
|
0 & 0 & -1 \\
|
||||||
|
-1-t^2 & -1+t^2 & t
|
||||||
|
\colops
|
||||||
|
\add[t]{2}{1}
|
||||||
|
\add[-t]{2}{0}
|
||||||
|
\end{gmatrix}
|
||||||
|
=
|
||||||
|
\begin{gmatrix}[v]
|
||||||
|
-3 + 3t^2 & -2-2t^2 \\
|
||||||
|
-1-t^2 & -1+t^2
|
||||||
|
\end{gmatrix}
|
||||||
|
= 1 - 10t^2 + t ^{4}
|
||||||
|
.\end{align*}
|
||||||
|
Betrachte $F(A) \in \text{End}_\R(\R^2)$ und $F(B) \in \text{End}_\R(\R^2)$. Dann
|
||||||
|
ist $\sqrt{2}$ EW von $F(A)$ und $\sqrt{3} $ EW von $F(B)$. Damit folgt mit 31(c):
|
||||||
|
$\sqrt{2} + \sqrt{3} $ EW von $F(A) \otimes \text{id} + \text{id} \otimes F(B) \in \text{End}_\R(\R^2 \otimes_R \R^2)$.
|
||||||
|
Es gilt $F(A) \otimes \text{id} + \text{id} \otimes F(B) = F(C)$. Damit folgt
|
||||||
|
$\chi_{C}^{\text{char}}(\sqrt{2} + \sqrt{3}) = \chi_{F(C)}^{\text{char}}(\sqrt{2} +\sqrt{3}) = 0 $.
|
||||||
|
\end{proof}
|
||||||
|
\end{enumerate}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
\begin{enumerate}[(a)]
|
||||||
|
\item Seien $f_1, \ldots, f_n \in V^{*}$. Beh.: Es ex. eine eindeutige lineare
|
||||||
|
Abb. $\varphi_{f_1, \ldots, f_n}\colon V^{\otimes n} \to K$ mit
|
||||||
|
\[
|
||||||
|
\varphi_{f_1, \ldots, f_n}(x_1 \otimes \ldots \otimes x_n)
|
||||||
|
= f(x_1) \cdot \ldots \cdot f_n(x_n) \qquad \forall x_1, \ldots, x_n \in V
|
||||||
|
.\]
|
||||||
|
\begin{proof}
|
||||||
|
Definiere $\mu\colon V^{n} \to K$,
|
||||||
|
$(x_1, \ldots, x_n) \mapsto f_1(x_1) \cdot \ldots \cdot f_n(x_n)$. $\mu$ ist $n$-fach
|
||||||
|
multilinear, da $f_1, \ldots, f_n$ linear und $\mu$ Produkt von linearen Abbildungen. Die
|
||||||
|
Behauptung folgt mit (UM) angewendet auf $\mu$.
|
||||||
|
\end{proof}
|
||||||
|
\item Beh.: Es gibt eine eindeutige lineare Abbildung $\Phi_n \colon (V^{*})^{\otimes n} \to (V^{\otimes n})^{*}$ mit
|
||||||
|
\[
|
||||||
|
\Phi_n(f_1 \otimes \ldots \otimes f_n) = \varphi_{f_1, \ldots, f_n} \qquad \forall f_1, \ldots, f_n \in V^{*}
|
||||||
|
.\]
|
||||||
|
\begin{proof}
|
||||||
|
Definiere $\mu\colon (V^{*})^{n} \to (V^{\otimes n})^{*}$, $(f_1, \ldots, f_n) \mapsto \varphi_{f_1, \ldots, f_n}$. $\mu$ multilinear, denn $\forall x_1, \ldots, x_n \in V$ gilt
|
||||||
|
\begin{align*}
|
||||||
|
\mu(f_1 + \lambda g_1, f_2, \ldots, f_n)(x_1 \otimes \ldots \otimes x_n) &= \varphi_{(f_1 + \lambda g_1),f_2, \ldots, f_n}(x_1 \otimes \ldots \otimes x_n) \\
|
||||||
|
&= (f_1 + \lambda g_1)(x_1) \cdot f_2(x_2) \cdot \ldots \cdot f_n(x_n) \\
|
||||||
|
&= f_1(x_1) \cdot \ldots \cdot f_n(x_n) + \lambda g_1(x_1) \cdot f_2(x_2) \cdot \ldots \cdot f_n(x_n) \\
|
||||||
|
&= \varphi_{f_1, \ldots, f_n}(x_1 \otimes \ldots \otimes x_n)
|
||||||
|
+ \lambda \varphi_{g_1, f_2, \ldots, f_n}(x_1 \otimes \ldots \otimes x_n) \\
|
||||||
|
&= \mu(f_1, \ldots, f_n) + \lambda \mu(g_1, f_2, \ldots, f_n)
|
||||||
|
.\end{align*}
|
||||||
|
Damit stimmt $\mu(f_1 + \lambda g_2, f_2, \ldots, f_n)$ mit $\mu(f_1, \ldots, f_n) + \lambda \mu(g_1, f_2, \ldots, f_n)$ auf den Erzeugern von $V^{\otimes n}$ überein, d.h. auf ganz $V^{\otimes n}$, also folgt
|
||||||
|
\[
|
||||||
|
\mu(f_1 + \lambda g_2, f_2, \ldots, f_n) = \mu(f_1, \ldots, f_n) + \lambda \mu(g_1, f_2, \ldots, f_n)
|
||||||
|
.\] Analog für die anderen Argumente.
|
||||||
|
|
||||||
|
Die Behauptung folgt jetzt wieder mit (UM) angewendet auf $\mu$.
|
||||||
|
\end{proof}
|
||||||
|
\item Beh.: Für $n = 2$ und $V$ e.d. ist $\Phi_2$ ein Iso.
|
||||||
|
\begin{proof}
|
||||||
|
Da $V$ e.d. folgt $\text{dim } V = \text{dim } V^{*}$. Sei $k = \text{dim } V = \text{dim } V^{*}$. Dann gilt nach VL:
|
||||||
|
\[
|
||||||
|
V \otimes_K V \stackrel{\sim }{=} K^{k} \otimes_K K^{k} \stackrel{\sim }{=} V^{*} \otimes_K V^{*}
|
||||||
|
.\] Damit g.z.z., dass $\Phi_2$ injektiv ist. Sei $(v_i)_{i \in I}$ Basis von $V$ und
|
||||||
|
$(v_i^{*})_{i \in I}$ die dazu duale Basis von $V^{*}$. Dann ist nach VL
|
||||||
|
$(v_i^{*} \otimes v_j^{*})_{(i,j) \in I^2}$ Basis von $V^{*} \otimes_K V^{*}$. Sei
|
||||||
|
nun $f \in V^{*} \otimes V^{*}$ mit $\Phi_2(f) = 0$. Dann gilt
|
||||||
|
\begin{salign*}
|
||||||
|
\Phi_2(f) &= \Phi_2 \left[ \sum_{(i,j) \in I^2} \alpha_{ij} (v_i^{*} \otimes v_j^{*}) \right] \\
|
||||||
|
&= \sum_{(i,j) \in I^2} \alpha_{ij} \Phi_2(v_i^{*} \otimes v_j^{*}) \\
|
||||||
|
&= \sum_{(i,j) \in I^2} \alpha_{ij} \varphi_{v_i^{*}, v_{j}^{*}}
|
||||||
|
\intertext{Damit folgt $\forall x, y \in V$}
|
||||||
|
0 &= \sum_{(i,j) \in I^2} \alpha_{ij} v_{i}^{*}(x) \cdot v_j^{*}(y)
|
||||||
|
.\end{salign*}
|
||||||
|
Sei nun $(k,l) \in I^2$ beliebig. Dann setze $x\coloneqq v_k$, $y\coloneqq v_l$. Damit folgt
|
||||||
|
\begin{align*}
|
||||||
|
\sum_{(i,j) \in I^2} \alpha_{ij} v_i^{*}(v_k) v_j^{*}(v_l)
|
||||||
|
= \sum_{(i,j) \in I^2} \alpha_{ij} \delta_{ik} \delta_{jl}
|
||||||
|
= \alpha_{kl} = 0
|
||||||
|
.\end{align*}
|
||||||
|
Also $\alpha_{kl} = 0$ $\forall (k,l) \in I^2$. Damit ist $f= 0$ und $\Phi_2$ injektiv.
|
||||||
|
\end{proof}
|
||||||
|
\end{enumerate}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
\begin{enumerate}[(a)]
|
||||||
|
\item Seien $m \in \N$ und $(x_1, \ldots, x_m)$ ES. von $M$. Beh.: Für $n \in \N$ mit $n \le m$
|
||||||
|
ist die Familie
|
||||||
|
\[
|
||||||
|
(x_{i_1} \land \cdots \land x_{i_n})_{1 \le i_1 < \ldots < i_n \le m}
|
||||||
|
\] ein ES. von $\bigwedge^{n} M$.
|
||||||
|
\begin{proof}
|
||||||
|
Da $\bigwedge^{n} M$ von Elementen der Form $y_1 \land \ldots \land y_n$ erzeugt
|
||||||
|
wird für $y_1, \ldots, y_n \in M$, g.z.z., dass diese Elemente von der angegebenen Familie
|
||||||
|
erzeugt werden. Dazu seien $y_1, \ldots, y_n \in M$ beliebig. Da $(x_1, \ldots, x_n)$ ES
|
||||||
|
von $M$, ex. $(\alpha_{ij})_{i,j=1}^{n,m}$ s.d. $\forall i = 1, \ldots, n$
|
||||||
|
\[
|
||||||
|
y_i = \sum_{j=1}^{m} \alpha_{ij}x_j
|
||||||
|
.\] Damit folgt
|
||||||
|
\begin{salign*}
|
||||||
|
y_1 \land \ldots \land y_n &= \sum_{j=1}^{m} \alpha_{1j}x_j \land \ldots \land \sum_{j=1}^{m} \alpha_{nj} x_j \\
|
||||||
|
&= \alpha_{11}x_1 \land \ldots \land \alpha_{n1}x_1 +
|
||||||
|
\alpha_{12}x_2 \land \alpha_{21}x_1 \land \ldots \land \alpha_{n1} x_1
|
||||||
|
+ \ldots + \alpha_{1m}x_m \land \ldots \land \alpha_{nm} x_m
|
||||||
|
.\end{salign*}
|
||||||
|
Streichen der Nullterme (Summanden mit gleichen Faktoren im Sinne von $\land$)
|
||||||
|
und Sortierung der $x_j$ innerhalb der Summanden durch mehrfache Anwendung der
|
||||||
|
Antisymmetrie zeigt die Behauptung.
|
||||||
|
\end{proof}
|
||||||
|
\item Sei nun $R = \Z[\sqrt{-5}]$ und $I = (2, 1 + \sqrt{-5}) \subseteq R$. Beh.: $\bigwedge^2I = 0$.
|
||||||
|
\begin{proof}
|
||||||
|
Da $\{2, 1 + \sqrt{-5} \} $ ES von $I$ als $R$-Modul ist, folgt mit (a),
|
||||||
|
dass $2 \wedge (1 + \sqrt{-5}) $ bereits $I$ erzeugt. Es genügt also z.z., dass
|
||||||
|
$2 \wedge (1 + \sqrt{-5}) = 0$ in $\bigwedge^2I$. Es gilt
|
||||||
|
\begin{align*}
|
||||||
|
3 \cdot (2 \wedge (1 + \sqrt{-5}) ) &= 6 \wedge (1 + \sqrt{-5})
|
||||||
|
= (1 - \sqrt{-5})\left[ (1 + \sqrt{-5}) \wedge (1 + \sqrt{-5}) \right] = 0 \\
|
||||||
|
2 \cdot (2 \wedge ( 1 + \sqrt{-5})) &= (1+\sqrt{-5})\cdot (2 \wedge 2) = 0
|
||||||
|
\intertext{Damit folgt}
|
||||||
|
2 \wedge (1 + \sqrt{-5} ) &= 3 \cdot (2 \wedge 1 + \sqrt{-5}) - 2 \cdot (2 \wedge 1 + \sqrt{-5}) = 0
|
||||||
|
.\end{align*}
|
||||||
|
\end{proof}
|
||||||
|
\end{enumerate}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
\begin{enumerate}[(a)]
|
||||||
|
\item Beh.: Es gibt einen eindeutigen $R$-Mod.hom. $f\colon \bigwedge^2 M \to M \otimes_R M$ mit
|
||||||
|
\[
|
||||||
|
f(a \wedge b) = a \otimes b - b \otimes a
|
||||||
|
.\]
|
||||||
|
\begin{proof}
|
||||||
|
Definiere $\varphi\colon M^2 \to M \otimes_R M$, $(a,b) \mapsto a \otimes b - b \otimes a$.
|
||||||
|
$\varphi$ ist alternierend, denn:
|
||||||
|
\begin{itemize}
|
||||||
|
\item $\varphi$ bilinear:
|
||||||
|
\begin{align*}
|
||||||
|
\varphi(a + \lambda b, c) &= (a + \lambda b) \otimes c - c \otimes (a + \lambda b) \\
|
||||||
|
&= a \otimes c + \lambda (b \otimes c)
|
||||||
|
- c \otimes a - \lambda (c \otimes b) \\
|
||||||
|
&= a \otimes c - c \otimes a
|
||||||
|
+ \lambda (b \otimes c - c \otimes b) \\
|
||||||
|
&= \varphi(a,c) + \lambda(b,c)
|
||||||
|
.\end{align*}
|
||||||
|
Analog für zweites Argument.
|
||||||
|
\item $\varphi(a,a) = a \otimes a - a \otimes a = 0$ $\forall a \in M$.
|
||||||
|
\end{itemize}
|
||||||
|
Damit folgt die Behauptung mit (UA) angewendet auf $\varphi$.
|
||||||
|
\end{proof}
|
||||||
|
\item Beh.: Sei $M$ endlich erzeugt und frei. Dann ist die Abbildung $f$ aus (a) injektiv.
|
||||||
|
\begin{proof}
|
||||||
|
Sei $(x_1, \ldots, x_m)$ Basis von $M$. Definiere $I \coloneqq \{1, \ldots, m\}$. Dann
|
||||||
|
ist nach VL $(x_i \otimes x_j)_{(i,j) \in I^2}$ Basis von $M \otimes_R M$. Sei
|
||||||
|
$x \in \bigwedge^2M$ mit $f(x) = 0$. Dann ex. mit 34(a) ein $(\alpha_{ij})_{i,j=1}^{m} \in R^{(I)}$
|
||||||
|
mit $\alpha_{ij} = 0$ für $i \ge j$ und
|
||||||
|
\[
|
||||||
|
x = \sum_{(i,j) \in I^2, j > i} \alpha_{ij} (x_i \wedge x_j)
|
||||||
|
.\]
|
||||||
|
Damit folgt
|
||||||
|
\begin{salign*}
|
||||||
|
0 &= f(x) \\
|
||||||
|
&= f\left( \sum_{(i,j) \in I^2, j >i} \alpha_{ij}(x_i \wedge x_j) \right) \\
|
||||||
|
&= \sum_{(i,j) \in I^2, j > i} \alpha_{ij} f(x_i \wedge x_j) \\
|
||||||
|
&= \sum_{(i,j) \in I^2,j > i} \alpha_{ij} (x_i \otimes x_j - x_j \otimes x_i) \\
|
||||||
|
&\stackrel{x_i \otimes x_i - x_i \otimes x_i = 0}{=} \sum_{(i,j) \in I^2, j \ge i} \alpha_{ij} (x_i \otimes x_j - x_j \otimes x_i) \\
|
||||||
|
\intertext{Setze $\alpha_{ji} \coloneqq - \alpha_{ij}$ für $j > i$. Damit folgt}
|
||||||
|
0 &= \sum_{i,j \in I^2, j \ge i} \alpha_{ij} (x_i \otimes x_j) + \alpha_{ji} (x_j \otimes x_i) \\
|
||||||
|
&= \sum_{(i,j) \in I^2} \alpha_{ij} (x_i \otimes x_j)
|
||||||
|
.\end{salign*}
|
||||||
|
Da $(x_i \otimes x_j)_{(i,j) \in I}$ Basis von $M \otimes_R M$, insbes. l.u., d.h.
|
||||||
|
$\alpha_{ij} = 0$ $\forall (i,j) \in I^2$. Also $x = 0$ und $f$ injektiv.
|
||||||
|
\end{proof}
|
||||||
|
\end{enumerate}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\end{document}
|
||||||
+1
-1
Submodule sose2020/num/hdnum updated: 206ffcacaf...7ebd4e5759
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,262 @@
|
|||||||
|
\documentclass[uebung]{../../../lecture}
|
||||||
|
|
||||||
|
\title{Einführung in die Numerik: Übungsblatt 10}
|
||||||
|
\author{Leon Burgard, Christian Merten}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\punkte
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
Beh.: Seien $n$ paarweise verschiedene Stützstellen $\{x_0, \ldots, x_{n-1}\} $ gegeben
|
||||||
|
und eine Permutation derselben $\{\tilde{x}_0, \ldots, \tilde{x}_{n-1}\} $. Dann gilt
|
||||||
|
\[
|
||||||
|
f[x_0, \ldots, x_{n-1}] = f[\tilde{x}_0, \ldots, \tilde{x}_{n-1}]
|
||||||
|
.\]
|
||||||
|
\begin{proof}
|
||||||
|
Es gilt nach VL mit der Newtondarstellung für das Interpolationspolynom
|
||||||
|
zu den Stützstellen $x_0, \ldots, x_{n-1}$:
|
||||||
|
\begin{salign*}
|
||||||
|
p(x) &= \sum_{i=0}^{n-1} y[x_0, \ldots, x_i] N_i(x) \\
|
||||||
|
&= \sum_{i=0}^{n-2} y[x_0, \ldots, x_i] N_i(x) + y[x_0, \ldots, x_{n-1}] N_{n-1}(x) \\
|
||||||
|
&= \mathcal{O}(x^{n-2}) + y[x_0, \ldots, x_{n-1}] \prod_{i=0}^{n-2} (x - x_i) \\
|
||||||
|
&= \mathcal{O}(x^{n-2}) + y[x_0, \ldots, x_{n-1}] \left(x^{n-1} + \mathcal{O}(x^{n-2})\right) \\
|
||||||
|
&= y[x_0, \ldots, x_{n-1}] x^{n-1} + \mathcal{O}(x^{n-2})
|
||||||
|
.\end{salign*}
|
||||||
|
Der Leitkoeffizient des Interpolationspolynoms in der Monombasis ist also
|
||||||
|
$y[x_0, \ldots, x_{n-1}]$. Dieser ist unabhängig von der Reihenfolge der Stützstellen. Damit
|
||||||
|
folgt die Behauptung.
|
||||||
|
\end{proof}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
Beh.: Für $N \ge 2 \pi 10^{3}$ gilt $\displaystyle \max_{0 \le x \le 1} |f(x) - s(x)| < 10^{-12}$.
|
||||||
|
\begin{proof}
|
||||||
|
Es ist $f \in C^{4}([0, 1])$. Dann gilt nach VL
|
||||||
|
\[
|
||||||
|
\delta \coloneqq \max_{0 \le x \le 1} |f(x) - s(x)| \le h^{4} \max_{0 \le x \le 1} |f^{(4)}(x)|
|
||||||
|
.\] Mit $f(x) = \sin(2\pi x)$ folgt sofort
|
||||||
|
\[
|
||||||
|
f^{(4)}(x) = 16 \pi^{4} \sin(2 \pi x) \quad \text{also}\quad
|
||||||
|
\max_{0 \le x \le 1} |f^{(4)}(x)| = 16 \pi^{4}
|
||||||
|
.\] Mit $h = \frac{1}{N}$ ergibt sich
|
||||||
|
\[
|
||||||
|
\delta \le 16 \frac{\pi^{4}}{N^{4}} \implies N \ge 2 \pi \sqrt[4]{\delta } = 2 \pi 10^{3}
|
||||||
|
.\]
|
||||||
|
\end{proof}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
Beh.: Das komplexe trigonometrische Interpolationspolynom ist gegeben als
|
||||||
|
\[
|
||||||
|
t ^{*}(x) = \frac{1}{2} - \frac{1}{4} e^{ix} - \frac{1}{4} e^{3ix}
|
||||||
|
.\]
|
||||||
|
\begin{proof}
|
||||||
|
Die Stützstellen sind als $x_j = \frac{2 \pi j}{4}$, $j = 0, \ldots, 3$ gegeben. Damit folgt
|
||||||
|
\begin{salign*}
|
||||||
|
f(x_0) &= f(0) = \min \{0, 2\} = 0 \\
|
||||||
|
f(x_1) &= f\left(\frac{\pi}{2}\right) = \min \left\{ \frac{1}{2}, \frac{3}{2} \right\} = \frac{1}{2} \\
|
||||||
|
f(x_2) &= f(\pi) = \min \{1, 1\} = 1 \\
|
||||||
|
f(x_3) &= f\left( \frac{3}{2}\pi \right) = \min \left\{ \frac{3}{2}, \frac{1}{2} \right\} = \frac{1}{2}
|
||||||
|
.\end{salign*}
|
||||||
|
Die Interpolationsbedingung ist erfüllt, denn
|
||||||
|
\begin{salign*}
|
||||||
|
t ^{*}(x_0) &= \frac{1}{2} - \frac{1}{4} - \frac{1}{4} = 0 = f(x_0) \\
|
||||||
|
t ^{*}(x_1) &= \frac{1}{2} - \frac{1}{4} \underbrace{e^{i \frac{\pi}{2}}}_{= i} - \frac{1}{4}
|
||||||
|
\underbrace{e^{i \frac{3}{2} \pi}}_{= -i} = \frac{1}{2} = f(x_1) \\
|
||||||
|
t ^{*}(x_2) &= \frac{1}{2} - \frac{1}{4} \underbrace{e^{i \pi}}_{= -1} - \frac{1}{4}
|
||||||
|
\underbrace{e^{i \pi}}_{= -1} = 1 = f(x_2) \\
|
||||||
|
t ^{*}(x_3) &= \frac{1}{2} - \frac{1}{4} \underbrace{e^{i \frac{3}{2} \pi}}_{= i} - \frac{1}{4}
|
||||||
|
\underbrace{e^{i \frac{3}{2} \pi}}_{= -i} = \frac{1}{2} = f(x_3)
|
||||||
|
.\end{salign*}
|
||||||
|
Aus der Eindeutigkeit des komplexen trigonometrischen Interpolationspolynoms folgt die Behauptung.
|
||||||
|
\end{proof}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
\begin{enumerate}[a)]
|
||||||
|
\item
|
||||||
|
\begin{enumerate}[(1)]
|
||||||
|
\item Es ist
|
||||||
|
\[
|
||||||
|
f_1''(x) = 6x - 14 \implies f_1''(0) = -14 \neq 0
|
||||||
|
.\] Also erfüllt $f_1$ nicht die natürlichen Randbedingungen, also $f_1 \not\in S(X)$.
|
||||||
|
\item Es gilt für $0 \le x < 1$:
|
||||||
|
\begin{salign*}
|
||||||
|
f_2(x) &= -\frac{1}{2} x^{3} \xrightarrow{x \to 1} -\frac{1}{2}\\
|
||||||
|
f_2'(x) &= -\frac{3}{2} x^2 \xrightarrow{x \to 1} - \frac{3}{2} \\
|
||||||
|
f_2''(x) &= - 3x \xrightarrow{x \to 1} -3 \text{ und } f_2''(0) = 0
|
||||||
|
\intertext{Für $1 \le x \le 2$ gilt:}
|
||||||
|
f_2(x) &= (x-1)^{3} -\frac{1}{2} x^{3} \implies f_2(1) = -\frac{1}{2} \\
|
||||||
|
f_2'(x) &= 3(x-1)^2 - \frac{3}{2} x^2 \implies f_2'(1) = -\frac{3}{2} \\
|
||||||
|
f_2''(x) &= 3x - 6 \implies f_2''(1) = -3 \text{ und } f_2''(2) = 0
|
||||||
|
.\end{salign*}
|
||||||
|
$f_2$ ist auf beiden Teilintervallen ein Polynom von Grad $3$ und damit
|
||||||
|
auf den Teilintervallen beliebig oft stetig differenzierbar. Außerdem
|
||||||
|
ist $f_2$ $2$ mal stetig differenzierbar an der Stelle $1$, also insgesamt
|
||||||
|
$f_2 \in C^{2}([0, 2])$. Die natürlichen Randbedingungen sind außerdem erfüllt, also
|
||||||
|
folgt $f_2 \in S(X)$.
|
||||||
|
\item Es ist
|
||||||
|
\[
|
||||||
|
f_3''(x) = 6x - 2 \implies f_3''(0) = -2 \neq 0
|
||||||
|
.\] Also erfüllt $f_3$ nicht die natürlichen Randbedingungen, also $f_3 \not\in S(X)$.
|
||||||
|
\end{enumerate}
|
||||||
|
\item Der interpolierende Spline $s$ von $f(x) = x^{3}$ folgt mit der Darstellung der VL direkt
|
||||||
|
als
|
||||||
|
\[
|
||||||
|
s(x) = \begin{cases}
|
||||||
|
1 + 4x + 4,5 x^2 + 1,5 x^{3} & x \in [0, 1) \\
|
||||||
|
8 + 8,5(x-1) - 1,5(x-1)^{3} & x \in [1,2]
|
||||||
|
\end{cases}
|
||||||
|
.\]
|
||||||
|
\end{enumerate}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
Auszüge aus \textit{splines.cc}:
|
||||||
|
\begin{lstlisting}[language=C++, title=Schneller Löser für tridiagonale Matrizen, captionpos=b]
|
||||||
|
template<typename REAL>
|
||||||
|
void solveTriDiag(hdnum::DenseMatrix<REAL> &A, std::vector<REAL> &x, std::vector<REAL> &b) {
|
||||||
|
int N = b.size();
|
||||||
|
x[0] = A[0][0];
|
||||||
|
// LU Zerlegung
|
||||||
|
REAL l;
|
||||||
|
for (int j=1; j<N; j++) {
|
||||||
|
// berechne l faktor
|
||||||
|
l = A[j][j-1] / x[j-1];
|
||||||
|
// modifiziere diagonalelemente und rechte seite
|
||||||
|
x[j] = A[j][j] - l * A[j-1][j];
|
||||||
|
b[j] = b[j] - l * b[j-1];
|
||||||
|
}
|
||||||
|
// Loesen durch Rueckwaertseinsetzen
|
||||||
|
x[N-1] = b[N-1] / x[N-1];
|
||||||
|
for (int j=N-2; j>=0; j--) {
|
||||||
|
x[j] = (b[j] - A[j][j+1]*x[j+1])/x[j];
|
||||||
|
}
|
||||||
|
}\end{lstlisting}
|
||||||
|
Implementation in einer Klasse \lstinline{CubicSpline}. Die Funktion \lstinline{getCubicSpline}
|
||||||
|
entspricht dem ersten Konstruktor.
|
||||||
|
\begin{lstlisting}[language=C++, title=Konstruktion und Auswertung eines kubischen Splines, captionpos=b]
|
||||||
|
template<typename REAL>
|
||||||
|
class CubicSpline {
|
||||||
|
public:
|
||||||
|
// erstelle einen kubischen spline mit vorgegebenen stuetzstellen
|
||||||
|
// und werten
|
||||||
|
CubicSpline(std::vector<REAL> xs, std::vector<REAL> ys) {
|
||||||
|
calculateCoefficients(xs, ys);
|
||||||
|
}
|
||||||
|
|
||||||
|
// erstelle einen kubischen spline mit vorgegebenen stuetzstellen
|
||||||
|
// und einer zu interpolierenden funktion
|
||||||
|
CubicSpline(std::vector<REAL> xs, REAL(*f)(REAL)) {
|
||||||
|
int N = xs.size();
|
||||||
|
std::vector<double> ys(N);
|
||||||
|
for (int i=0; i<N; i++) {
|
||||||
|
ys[i] = f(xs[i]);
|
||||||
|
}
|
||||||
|
calculateCoefficients(xs, ys);
|
||||||
|
}
|
||||||
|
|
||||||
|
// erstelle einen kubischen spline an aequidistanten stuetzstellen
|
||||||
|
// und einer zu interpolierenden funktion
|
||||||
|
CubicSpline(REAL a, REAL b, int N, REAL(*f)(REAL)) {
|
||||||
|
std::vector<double> xs(N+1);
|
||||||
|
std::vector<double> ys(N+1);
|
||||||
|
for (int i=0; i<=N; i++) {
|
||||||
|
xs[i] = a + (1.0*i)/N*(b-a);
|
||||||
|
ys[i] = f(xs[i]);
|
||||||
|
}
|
||||||
|
calculateCoefficients(xs, ys);
|
||||||
|
}
|
||||||
|
|
||||||
|
// werte kubischen spline an vorgegebener stelle aus
|
||||||
|
REAL evaluate(REAL x) {
|
||||||
|
for (int i=1; i<x_s.size(); i++) {
|
||||||
|
if (x > x_s[i] && i < x_s.size() - 1) {
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
return a_0[i-1] + a_1[i-1] *(x - x_s[i]) + a_2[i-1]*std::pow(x - x_s[i], 2) + a_3[i-1]*std::pow(x-x_s[i], 3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// gebe alle interpolations polynome aus
|
||||||
|
void print() {
|
||||||
|
for(int i=0; i<x_s.size()-1; i++) {
|
||||||
|
printf("p_%d(x) = %4.2f + %4.2f(x - %4.2f) + %4.2f(x - %4.2f)^2 + %4.2f(x - %4.2f)^3\n",
|
||||||
|
i, a_0[i], a_1[i], x_s[i], a_2[i], x_s[i], a_3[i], x_s[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
// stuetzstellen
|
||||||
|
std::vector<REAL> x_s;
|
||||||
|
// koeffizienten
|
||||||
|
std::vector<REAL> a_0;
|
||||||
|
std::vector<REAL> a_1;
|
||||||
|
std::vector<REAL> a_2;
|
||||||
|
std::vector<REAL> a_3;
|
||||||
|
|
||||||
|
void calculateCoefficients(std::vector<REAL> xs, std::vector<REAL> ys) {
|
||||||
|
// stuetzstellen from x_0 ... to x_n
|
||||||
|
int n = xs.size()-1;
|
||||||
|
// copy stuetzstellen
|
||||||
|
x_s = std::vector<double>(n+1);
|
||||||
|
x_s = xs;
|
||||||
|
// setup (n-1)x(n-1) matrix for a_2
|
||||||
|
hdnum::DenseMatrix<REAL> A(n-1,n-1);
|
||||||
|
std::vector<REAL> b(n-1);
|
||||||
|
std::vector<REAL> x(n-1);
|
||||||
|
REAL h; // h_i
|
||||||
|
REAL h1; // h_{i+1}
|
||||||
|
// setup LGS for a_2
|
||||||
|
// A has tridiagonal structure
|
||||||
|
for (int i = 1; i<n; i++) {
|
||||||
|
h = xs[i] - xs[i-1];
|
||||||
|
h1 = xs[i+1] - xs[i];
|
||||||
|
b[i-1] = 3 * ((ys[i+1] - ys[i])/h1 - (ys[i] - ys[i-1])/h);
|
||||||
|
if (i > 1) {
|
||||||
|
A[i-1][i-2] = h;
|
||||||
|
} if (i < n-1) {
|
||||||
|
A[i-1][i] = h1;
|
||||||
|
}
|
||||||
|
A[i-1][i-1] = 2 * (h + h1);
|
||||||
|
}
|
||||||
|
// initialize vectors
|
||||||
|
a_0 = std::vector<double>(n);
|
||||||
|
a_1 = std::vector<double>(n);
|
||||||
|
a_2 = std::vector<double>(n);
|
||||||
|
a_3 = std::vector<double>(n);
|
||||||
|
solveTriDiag(A,a_2,b);
|
||||||
|
// natuerliche randbedingung
|
||||||
|
a_2[n-1] = 0;
|
||||||
|
// berechne restliche koeffizienten
|
||||||
|
for (int i = 1; i<=n; i++) {
|
||||||
|
h = xs[i] - xs[i-1]; // h_i
|
||||||
|
h1 = xs[i+1] - xs[i]; // h_{i+1}
|
||||||
|
a_0[i-1] = ys[i];
|
||||||
|
if (i == 1) { // a_2[-1] = 0
|
||||||
|
a_1[i-1] = (ys[i] - ys[i-1])/h + (h/3)*(2*a_2[i-1]);
|
||||||
|
a_3[i-1] = (a_2[i-1])/(3*h);
|
||||||
|
} else {
|
||||||
|
a_1[i-1] = (ys[i] - ys[i-1])/h + h/3*(2*a_2[i-1] + a_2[i-2]);
|
||||||
|
a_3[i-1] = (a_2[i-1] - a_2[i-2])/(3 * h);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};\end{lstlisting}
|
||||||
|
\begin{figure}[h]
|
||||||
|
\centering
|
||||||
|
\begin{tikzpicture}
|
||||||
|
\begin{axis}[xtick=\empty, ytick=\empty]
|
||||||
|
\addplot[purple] table {saurier.dat};
|
||||||
|
\end{axis}
|
||||||
|
\end{tikzpicture}
|
||||||
|
\caption{Rekonstruktion des Sauriers}
|
||||||
|
\label{fig:}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\end{document}
|
||||||
Binary file not shown.
@@ -17,7 +17,7 @@
|
|||||||
0 & S\end{pmatrix}
|
0 & S\end{pmatrix}
|
||||||
= \begin{pmatrix}
|
= \begin{pmatrix}
|
||||||
A_{11} & A_{12} \\
|
A_{11} & A_{12} \\
|
||||||
A_{21} A_{11}A_{11}^{-1} A_{22}A_{11}^{-1}A_{12} + S
|
A_{21} A_{11}A_{11}^{-1} & A_{21}A_{11}^{-1}A_{12} + S
|
||||||
\end{pmatrix}
|
\end{pmatrix}
|
||||||
= \begin{pmatrix}
|
= \begin{pmatrix}
|
||||||
A_{11} & A_{12} \\
|
A_{11} & A_{12} \\
|
||||||
|
|||||||
Binary file not shown.
@@ -0,0 +1,214 @@
|
|||||||
|
\documentclass[uebung]{../../../lecture}
|
||||||
|
|
||||||
|
\title{Einführung in die Numerik: Übungsblatt 8}
|
||||||
|
\author{Leon Burgard, Christian Merten}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\punkte
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
Sei $A \in \R^{n \times n}$ symmetrisch und positiv definit. Betrachte
|
||||||
|
\[
|
||||||
|
F\colon \R^{n} \to \R, \quad F(x) = \frac{1}{2} (Ax,x)_2 - (b,x)_2
|
||||||
|
.\]
|
||||||
|
\begin{enumerate}[1.]
|
||||||
|
\item Beh.: $\nabla F(x) = Ax - b$.
|
||||||
|
\begin{proof}
|
||||||
|
Es ist
|
||||||
|
\begin{salign*}
|
||||||
|
F(x) &= \frac{1}{2} \sum_{i,j=1}^{n} a_{ij}x_j x_i - \sum_{i=1}^{n} b_i x_i
|
||||||
|
\intertext{Da $A$ symmetrisch, gilt $a_{ij} = a_{ji}$. Damit folgt}
|
||||||
|
\frac{\partial F}{\partial x_i} &= \frac{1}{2} \left(2 \sum_{j=1, i\neq j}^{n} a_{ij}x_j
|
||||||
|
+ 2 a_{ii} x_i \right) - b_i \\
|
||||||
|
&= \sum_{j=1}^{n} a_{ij} x_j - b_i \\
|
||||||
|
&= (Ax)_i - b_i
|
||||||
|
\intertext{Also folgt}
|
||||||
|
\nabla F(x) &= Ax - b
|
||||||
|
.\end{salign*}
|
||||||
|
\end{proof}
|
||||||
|
\item Beh.: $x^{*}$ löst $Ax = b$ g.d. wenn $x^{*}$ das eindeutige Minimum von $F$ ist.
|
||||||
|
\begin{proof}
|
||||||
|
,,$\implies$``: Sei $x^{*}$ Lösung von $Ax = b$. Dann ist
|
||||||
|
$\nabla F(x^{*}) = Ax^{*} -b = b - b = 0$. Außerdem gilt da $A$ symmetrisch
|
||||||
|
\[
|
||||||
|
H_f(x) = \left( \frac{\partial^2F}{\partial x_i \partial x_j} \right)_{i,j=1}^{n} = A^{T} = A
|
||||||
|
.\] Da $A$ positiv definit, ist $x^{*}$ Minimum von $F$. Da $A$ symmetrisch
|
||||||
|
und positiv definit, ist $A$ regulär, also hat $\nabla F(x)$ keine weiteren Nullstellen.
|
||||||
|
$x^{*}$ ist also eindeutiges Minimum.
|
||||||
|
|
||||||
|
,,$\impliedby$``: Sei $x^{*}$ Minimum von $F$. Dann gilt $\nabla F(x^{*}) = 0$, also
|
||||||
|
$Ax^{*} - b = 0$, d.h. $Ax^{*} = b$.
|
||||||
|
\end{proof}
|
||||||
|
\item Seien $x, p \in \R^{n}$ mit $p \neq 0$. Beh.: $g(\alpha) = F(x + \alpha p)$ nimmt
|
||||||
|
bei
|
||||||
|
\[
|
||||||
|
\alpha = \frac{(p, b-Ax)_2}{(p,Ap)_2}
|
||||||
|
\] sein Minimum an.
|
||||||
|
\begin{proof}
|
||||||
|
Es ist
|
||||||
|
\[
|
||||||
|
g'(\alpha) = (\nabla F(x + \alpha p), p)_2 = (Ax, p)_2 + \alpha (Ap, p)_2 - (b,p)_2
|
||||||
|
.\] Eingesetzt ergibt sich
|
||||||
|
\begin{salign*}
|
||||||
|
g'\left( \frac{(p, b-Ax)_2}{(p,Ap)_2} \right) &=
|
||||||
|
(Ax,p)_2 + (p,b-Ax)_2 - (b,p)_2 \\
|
||||||
|
&= (Ax - b, p)_2 + (b - Ax, p)_2 \\
|
||||||
|
&= (0,p)_2 \\
|
||||||
|
&= 0
|
||||||
|
.\end{salign*}
|
||||||
|
Weiter gilt da $A$ positiv definit und $p \neq 0$:
|
||||||
|
\[
|
||||||
|
g''(\alpha) = (Ap, p)_2 > 0
|
||||||
|
.\] Also ist $\alpha$ Minimum von $g$.
|
||||||
|
\end{proof}
|
||||||
|
\end{enumerate}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
Sei $\R \ni a \neq 0$ und
|
||||||
|
\[
|
||||||
|
f(x) = x^2 - a
|
||||||
|
.\]
|
||||||
|
\begin{enumerate}[1.]
|
||||||
|
\item
|
||||||
|
\begin{enumerate}[(a)]
|
||||||
|
\item $g_R'(x) = 1 - \frac{2x}{a} \implies 0 = 1 - \frac{2x}{a} \implies x = \frac{a}{2}$,
|
||||||
|
$g_R''(x) = - \frac{2}{a} < 0$. Also ist $x = \frac{a}{2}$ Maximum und
|
||||||
|
einziges Extremum von $g_R$,
|
||||||
|
inbes. auf $[0, a]$. Weiter ist $g\left( \frac{a}{2} \right) = \frac{a}{4} + 1$.
|
||||||
|
|
||||||
|
Wegen $g(0) = 1 = g(a)$ folgt $g([0,a]) = [1, 1 + \frac{a}{4}]$.
|
||||||
|
\item Für $a > $, $\sigma = \frac{1}{a}$ und $0 < x,y < a$ gilt
|
||||||
|
\begin{salign*}
|
||||||
|
|g(x) - g(y)| &= | x - \frac{x^2}{a} + 1 - (y - \frac{y^2}{a} + 1)| \\
|
||||||
|
&= |x-y + \frac{1}{a}(y^2 - x^2)| \\
|
||||||
|
&= |x-y - \frac{1}{a}(x-y)(y+x)| \\
|
||||||
|
&= |x-y| |1 - \underbrace{\frac{1}{a}(y+x)}_{< 2a}| \\
|
||||||
|
&< |x-y| |-1| \\
|
||||||
|
&= |x-y|
|
||||||
|
.\end{salign*}
|
||||||
|
\item Aus (b) folgt
|
||||||
|
\[
|
||||||
|
q \coloneqq |1 - \frac{1}{a} (\underbrace{x^{k+1} + x^{k}}_{\to 2\sqrt{a}}) |
|
||||||
|
\xrightarrow{x^{k} \to \sqrt{a}} 1 - \frac{2 \sqrt{a} }{a}
|
||||||
|
.\]
|
||||||
|
\end{enumerate}
|
||||||
|
\item Sei nun
|
||||||
|
\[
|
||||||
|
g_N(x) = x - \frac{x^2 - a}{2x}
|
||||||
|
.\]
|
||||||
|
Sei $z \in \R$ beliebig. Dann ex. mit Taylor ein $\eta_x$ zwischen $x$ und $z$ und
|
||||||
|
ein $\eta_y$ zwischen $y$ und $z$, s.d.
|
||||||
|
\begin{salign*}
|
||||||
|
g_N(x) &= g_N'(z)(x - z) + \underbrace{g_N''(\eta_x)(x - z)^2}_{\text{Restglied}} \\
|
||||||
|
g_N(y) &= g_N'(z)(y - z) + \underbrace{g_N''(\eta_y)(y - z)^2}_{\text{Restglied}} \\
|
||||||
|
\intertext{Damit folgt}
|
||||||
|
g_N(y) - g_N(y) &= g_N'(z)(y-y) + g_N''(\eta_y)(y - z)^2 + g_N''(\eta_y)(y - z)^2
|
||||||
|
.\end{salign*}
|
||||||
|
Es gilt weiter
|
||||||
|
\begin{align*}
|
||||||
|
g_N'(x) &= 1 - \frac{4x^2 - 2x^2 + 2a}{4x^2} = 1 - \frac{x^2 + a}{2x^2} = \frac{1}{2} - \frac{a}{2x^2} \\
|
||||||
|
g_N''(x) &= \frac{a}{x^{3}}
|
||||||
|
.\end{align*}
|
||||||
|
Mit $z = \frac{x+y}{2}$ folgt
|
||||||
|
\begin{salign*}
|
||||||
|
|g(x) - g(y)| &= \left| \left( \frac{1}{2} - \frac{2a}{(x+y)^2} \right) (x-y) + \frac{a(x-y)^2}{4} \left( \frac{1}{\eta_x^{3}} + \frac{1}{\eta_{y}^{3}} \right) \right| \\
|
||||||
|
&= |x - y| \left| \frac{1}{2} - \frac{2a}{(x+y)^2} + \frac{a|x-y|}{4} \left( \frac{1}{\eta_{x}^{3}} + \frac{1}{\eta_y^{3}} \right) \right|
|
||||||
|
.\end{salign*}
|
||||||
|
Z.z.: $\exists \epsilon > 0$, s.d. für $|x - \sqrt{a}|, |y - \sqrt{a}| < \epsilon$, $\left| \frac{1}{2} - \frac{2a}{(x+y)^2} + \frac{a|x-y|}{4} \left( \frac{1}{\eta_{x}^{3}} + \frac{1}{\eta_y^{3}} \right) \right| < 1$ gilt.
|
||||||
|
|
||||||
|
Für $x \to \sqrt{a} $ und $y \to \sqrt{a}$ folgt $\eta_x \to \sqrt{a} $ und $\eta_y \to \sqrt{a} $.
|
||||||
|
Damit folgt
|
||||||
|
\begin{salign*}
|
||||||
|
\left| \frac{1}{2} - \frac{2a}{\underbrace{(x+y)^2}_{\to 4 \sqrt{a} }} + \frac{a\overbrace{|x-y|}^{\to 0}}{4}
|
||||||
|
\underbrace{\left( \frac{1}{\eta_{x}^{3}} + \frac{1}{\eta_y^{3}} \right)}_{\to \frac{1}{2 \sqrt{a}^{3}}} \right| \longrightarrow 0
|
||||||
|
.\end{salign*}
|
||||||
|
Also für $\epsilon$ klein genug, folgt $|g(x) - g(y)| < |x-y|$ für
|
||||||
|
$|x - \sqrt{a}|, |y - \sqrt{a}| < \epsilon$.
|
||||||
|
|
||||||
|
\item Es gilt für $0 < x^{k} \neq \sqrt{a}$:
|
||||||
|
\[
|
||||||
|
x^{k+1} = g_N(x^{k}) = x^{k} - \frac{(x^{k})^2 - a}{2x^{k}}
|
||||||
|
.\]
|
||||||
|
Es gilt damit
|
||||||
|
\begin{alignat*}{3}
|
||||||
|
&&0 &< (\underbrace{x^{k})^{2} - a}_{\neq 0})^2
|
||||||
|
= (x^{k})^{4} - 2(x^{k})^2 a + a^2 \\
|
||||||
|
&\implies& 4 (x^{k})^2 a &< (x^{k})^{4} + 2(x^{k})^2a + a^2 \\
|
||||||
|
&\implies& 2 x^{k} \sqrt{a} &< (x^{k})^2 + a
|
||||||
|
= 2 (x^{k})^2 - (x^{k})^2 + a\\
|
||||||
|
&\implies& \sqrt{a} &< x^{k} - \frac{(x^{k})^2 - a}{2x^{k}}
|
||||||
|
= x^{k+1} \qquad (*)
|
||||||
|
.\end{alignat*}
|
||||||
|
Für $x^{k} > \sqrt{a} $ gilt zudem
|
||||||
|
\begin{align*}
|
||||||
|
x^{k+1} &= x^{k} - \underbrace{\frac{(x^{k})^2 - a}{2 x^{k}}}_{> 0} \\
|
||||||
|
&< x^{k}
|
||||||
|
.\end{align*}
|
||||||
|
|
||||||
|
Damit folgt für $x^{k} > \sqrt{a} $ konvergiert $x^{k+1}$ monoton gegen $\sqrt{a} $. Falls
|
||||||
|
$x^{k} < \sqrt{a} $, dann ist wegen ($*$) $x^{k+1} > \sqrt{a} $. Dann tritt wieder der erste
|
||||||
|
Fall ein und es liegt ebenfalls Konvergenz vor.
|
||||||
|
\end{enumerate}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
Sei $f\colon \R^{n} \to \R^{n}$. Betrachte
|
||||||
|
\[
|
||||||
|
F(x) = \Vert f(x) \Vert_2^2
|
||||||
|
\] und
|
||||||
|
\[
|
||||||
|
H(\alpha) = \Vert f(x^{k}) + \alpha J_f(x^{k})p^{k}\Vert_2^2
|
||||||
|
.\] Es gilt
|
||||||
|
\begin{align*}
|
||||||
|
H'(\alpha) &= 2 \left[ f(x^{k}) + \alpha J_f(x^{k})p^{k} \right]^{T} J_f(x^{k})p^{k} \\
|
||||||
|
&= 2 \left[ (fx^{k}, J_f(x^{k})p^{k})_2 + \alpha (J_f(x^{k}) p^{k}, J_f(x^{k}) p^{k})_2 \right]
|
||||||
|
\intertext{$\alpha_{opt}$ eingesetzt ergibt}
|
||||||
|
H'(\alpha_{opt}) &= 2 \left[ (f(x^{k}, J_f(x^{k})p^{k})_2 - (f(x^{k}), J_f(x^{k}) p^{k})_2 \right] \\
|
||||||
|
&= 0
|
||||||
|
\intertext{Weiter ist wegen $p^{k} \neq 0$}
|
||||||
|
H''(\alpha) &= (J_f(x^{k})p^{k}, J_f(x^{k})p^{k})_2 \\
|
||||||
|
&> 0
|
||||||
|
.\end{align*}
|
||||||
|
Also hat $H$ bei $\alpha_{opt}$ ein Minimum.
|
||||||
|
|
||||||
|
Iterationen:
|
||||||
|
\begin{enumerate}[1.]
|
||||||
|
\item Relaxation:
|
||||||
|
\[
|
||||||
|
x^{k+1} = x^{k} + \alpha_{opt} f(x^{k})
|
||||||
|
.\]
|
||||||
|
\item Gradientenverfahren: Es gilt
|
||||||
|
\[
|
||||||
|
\frac{\partial F}{\partial x_j} = \sum_{i=1}^{n} 2 f_i(x) \frac{\partial f_i}{\partial x_j}
|
||||||
|
= 2 \left( f(x), (J_f(x))_{j-\text{te Spalte}} \right)_2
|
||||||
|
\implies \nabla F = 2 J_f(x^{k})^{T} f(x^{k})
|
||||||
|
.\] Damit folgt
|
||||||
|
\[
|
||||||
|
x^{k+1} = x^{k} - 2 \alpha_{opt} J_f(x^{k})^{T} f(x^{k})
|
||||||
|
.\]
|
||||||
|
\item Newton-Verfahren:
|
||||||
|
\[
|
||||||
|
x^{k+1} = x^{k} + \alpha_{opt} J_f^{-1}(x^{k}) f(x^{k})
|
||||||
|
.\]
|
||||||
|
\end{enumerate}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\newpage
|
||||||
|
\begin{aufgabe}
|
||||||
|
Siehe \textit{prog\_nonlinear\_solvers\_methods.cc} und \textit{prog\_nonlinear\_solvers\_fractal.cc}.
|
||||||
|
|
||||||
|
Nullstellen mit Newtonverfahren sie Programmcode.
|
||||||
|
Gewählte Parameter für Relaxationsverfahren:
|
||||||
|
Startpunkt $(2,1)^{T}$, $\sigma = 0.35$.
|
||||||
|
Damit konvergiert das Verfahren in $49$ Iterationsschritten mit einer Abweichung von
|
||||||
|
$\Vert f(x_i) \Vert_2 < 10^{-15}$.
|
||||||
|
\begin{figure}[h!]
|
||||||
|
\includegraphics[width=.5\textwidth]{raster_changed.pdf}
|
||||||
|
\includegraphics[width=.5\textwidth]{4-root-polynomial.pdf}
|
||||||
|
\caption{Links: Verändertes Raster, Rechts: Polynom $x^{4} - 3x^{3} + 5x + 3$}
|
||||||
|
\end{figure}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\end{document}
|
||||||
Binary file not shown.
@@ -0,0 +1,211 @@
|
|||||||
|
\documentclass[uebung]{../../../lecture}
|
||||||
|
|
||||||
|
\title{Einführung in die Numerik: Übungsblatt 9}
|
||||||
|
\author{Leon Burgard, Christian Merten}
|
||||||
|
|
||||||
|
\usepackage[]{subcaption}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\punkte
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
\begin{enumerate}[a)]
|
||||||
|
\item Es ergibt sich durch Ausrechnen:
|
||||||
|
\begin{salign*}
|
||||||
|
a_0 &= y_0 = \frac{1}{2} \\
|
||||||
|
a_1 &= \frac{y_1 - a_0 N_0(t_1)}{N_1(t_1)} = \frac{1 - \frac{1}{2}}{1 - \frac{1}{4}} = \frac{2}{3} \\
|
||||||
|
a_2 &= \frac{y_2 - a_0 N_0(t_2) - a_1N_1(t_2)}{N_2(t_2)} = -\frac{4}{45}
|
||||||
|
\intertext{Damit folgt}
|
||||||
|
p_2(t) &= \frac{1}{2} + \frac{2}{3}\left( t - \frac{1}{4} \right) - \frac{4}{45} \left( t - \frac{1}{4} \right) (t- 1)
|
||||||
|
.\end{salign*}
|
||||||
|
\item Es folgt für $t_3 = 9$ $y_3 = 3$, also
|
||||||
|
\begin{salign*}
|
||||||
|
a_3 &= \frac{y_3 - a_0N_0(t_3) - a_1N_1(t_3) - a_2 N_2(t_3)}{N_3(t_3)}
|
||||||
|
= \frac{13}{1575}
|
||||||
|
\intertext{Damit folgt}
|
||||||
|
p_3(t) &= \frac{1}{2} + \frac{2}{3}\left( t - \frac{1}{4} \right) - \frac{4}{45} \left( t - \frac{1}{4} \right) (t- 1) + \frac{13}{1575} \left( t - \frac{1}{4} \right) (t-1)(t-4)
|
||||||
|
.\end{salign*}
|
||||||
|
\item Graph:\\
|
||||||
|
\begin{tikzpicture}
|
||||||
|
\begin{axis}[default 2d plot,
|
||||||
|
xmin=0,xmax=10,
|
||||||
|
legend pos=outer north east]
|
||||||
|
\addplot[domain=0:10, smooth,green]{0.5 + 2/3*(x-1/4) - 4/45*(x-1/4)*(x-1)};
|
||||||
|
\addlegendentry{$p_2(t)$}
|
||||||
|
\addplot[domain=0:10, smooth, blue]{0.5 + 2/3*(x-1/4) - 4/45*(x-1/4)*(x-1)+13/1575*(x-1/4)*(x-1)*(x-4)};
|
||||||
|
\addlegendentry{$p_3(t)$}
|
||||||
|
\addplot[domain=0:10, smooth, red]{sqrt(x)};
|
||||||
|
\addlegendentry{$\sqrt{t}$}
|
||||||
|
\end{axis}
|
||||||
|
\end{tikzpicture}
|
||||||
|
\end{enumerate}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
\begin{enumerate}[a)]
|
||||||
|
\item Bezeichne:
|
||||||
|
\begin{align*}
|
||||||
|
&r_{i,0}(x) \coloneqq y_i \\
|
||||||
|
&r_{i,k}(x) \coloneqq \frac{(x-x_i) p_{i+1, k-1}(x) - (x- x_{i+k})p_{i,k-1}(x)}{x_{i+k}-x_i}
|
||||||
|
.\end{align*}
|
||||||
|
Z.z.: $p_{i,0}(x) = r_{i,0}(x)$ und $p_{i,k}(x) = r_{i,k}(x)$.
|
||||||
|
|
||||||
|
$r_{i,0}$ bzw. $r_{i,k}$ sind Polynome vom Grad $0$ bzw. $k$. D.h. es genügt zu zeigen,
|
||||||
|
dass sie die Interpolationseigenschaft erfüllen. Die Behauptung folgt dann aus der
|
||||||
|
Eindeutigkeit des Interpolationspolynoms.
|
||||||
|
|
||||||
|
Für $r_{i,0}(x)$ ist die Interpolationseigenschaft trivialerweise für die eine Stützstelle
|
||||||
|
$x_i$ erfüllt, denn $r_{i,0}(x_i) = y_i$.
|
||||||
|
|
||||||
|
Für $r_{i,k}$ gilt für $i \le j \le i+k$:
|
||||||
|
\begin{salign*}
|
||||||
|
r_{i,k}(x_{j}) &= \frac{(x_j-x_i) p_{i+1, k-1}(x_j) - (x_j- x_{i+k})p_{i,k-1}(x_j)}{x_{i+k}-x_i} \\
|
||||||
|
&\stackrel{(*)}{=} \frac{(x_j - x_i) y_j - (x_j - x_{i+k})y_j}{x_{i+k}-x_i} \\
|
||||||
|
&= y_j \frac{x_j - x_i - x_j + x_{i+k}}{x_{i+k}-x_i} \\
|
||||||
|
&= y_j \frac{x_{i+k} - x_i}{x_{i+k}-x_i} \\
|
||||||
|
&= y_j
|
||||||
|
.\end{salign*}
|
||||||
|
$(*)$: Falls $j = i$, dann ist $p_{i+1,k-1}(x_j)$ i.A. nicht $y_j$, aber dann ist
|
||||||
|
$(x_j - x_i) = (x_i - x_i) = 0$, also gilt dennoch $(x_j - x_i) p_{i+1,k-1}(x_j) = (x_j - x_i)y_j$.
|
||||||
|
Analog für $j = i+k$.
|
||||||
|
\item Durch Berechnung von $p_{0,3}(61.7)$ mit dem Schema aus (a) erhält man die Tageslänge
|
||||||
|
am Ort $E$ mit $19$h $29,55$m.
|
||||||
|
\end{enumerate}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
\begin{enumerate}[a)]
|
||||||
|
\item
|
||||||
|
\begin{itemize}
|
||||||
|
\item Für die Koeffizienten $a_i$ gilt $a_i = y_i$. Also keine Operationen nötig.
|
||||||
|
\item Auswertung von $L_i^{(n)}(\xi) = \prod_{j=0,j\neq i}^{n} \frac{(\xi-x_j)}{x_i - x_j} $:
|
||||||
|
$n$ Faktoren mit $3$ Operationen plus $n-1$ Multiplikationen für das Produkt. Gesamt:
|
||||||
|
$3n + n-1 = 4n-1$.
|
||||||
|
|
||||||
|
Auswertung von $p(\xi)$: $n+1$ Summanden mit $4n-1$ Operationen plus Multiplikation
|
||||||
|
mit $y_i$, ergibt $(n+1)\cdot (4n-1+1) = 4n^2$. Mit zusätzlich $n$ Additionen
|
||||||
|
für die Auswertung der Summe ergibt sich insgesamt $4n^2 + n = \mathcal{O}(n^2)$.
|
||||||
|
\end{itemize}
|
||||||
|
\item
|
||||||
|
\begin{itemize}
|
||||||
|
\item
|
||||||
|
Berechnung der Koeffizienten erfordert die Lösung eines LGS mit unterer Dreicksmatrix.
|
||||||
|
Dies erfordert $\mathcal{O}(n^2)$ Operationen.
|
||||||
|
\item Auswertung von $N_i(\xi) = \prod_{j=0}^{i-1} (\xi - x_j) $ erfordert $1$ Addition pro Faktor und
|
||||||
|
insgesamt $i-1$ Multiplikationen für das Produkt, also insgesamt: $2i - 1$.
|
||||||
|
|
||||||
|
Auswertung von $p(\xi)$ erfordert entsprechend die Auswertung von $N_i(\xi)$ und die
|
||||||
|
Multiplikation mit dem Koeffizienten und Summation über alle $(n+1)$ Summanden. Ergibt also
|
||||||
|
insgesamt mit kleinem Gauß $(n+1)(n+2) = n^2 + 3n + 2 = \mathcal{O}(n^2)$.
|
||||||
|
\end{itemize}
|
||||||
|
\item
|
||||||
|
\begin{itemize}
|
||||||
|
\item Berechnung der Koeffizienten erfordert die Lösung eines vollen LGS, also
|
||||||
|
$\mathcal{O}(n^{3})$ Operationen.
|
||||||
|
\item Auswertung eines Summanden: $a_i t ^{i}$ erfordert $i-1 + 1 = i$ Multiplikationen.
|
||||||
|
|
||||||
|
Auswertung von $p(x)$ erfordert das Summieren von $n+1$ Summanden, also $n$ zusätzliche Additionen.
|
||||||
|
Insgesamt folgt also wieder mit kleinem Gauß $\frac{(n+1)(n+2)}{2} + n = \frac{n^2 + 3n + 2}{2} + n = \frac{n^2 + 5n +4}{2} = \mathcal{O}(n^2)$.
|
||||||
|
\end{itemize}
|
||||||
|
\item Auswertung von $p_{i,k}$ im Neville Schema erfordert
|
||||||
|
\begin{align*}
|
||||||
|
N(k) &= 2 + N(k-1) + 1 + 1 + 1 + N(k-1) + 1 + 1 \\
|
||||||
|
&= 7 + 2 N(k-1) \\
|
||||||
|
&= 7 + 2 \cdot 7 + 4 \cdot N(k-2) = \ldots = \sum_{j=0}^{k-1} 7 \cdot 2^{j} \\
|
||||||
|
&= 7 \frac{2^{k} - 1}{2 - 1} \\
|
||||||
|
&= 7 (2^{k} - 1) \\
|
||||||
|
&= \mathcal{O}(2^{k})
|
||||||
|
.\end{align*}
|
||||||
|
\end{enumerate}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\begin{aufgabe}
|
||||||
|
\begin{enumerate}[a)]
|
||||||
|
\item Auszug aus \textit{polynom.cc}
|
||||||
|
\begin{lstlisting}[language=C++, title=Auswertung des Interpolationspolynoms für vorgegebene Stüztstellen, captionpos=b]
|
||||||
|
// Auswertung von p_{i,k}(t) mit Neville Schema bei t=x
|
||||||
|
template<typename REAL>
|
||||||
|
REAL evaluateNeville(REAL x, std::vector<REAL> &xs, std::vector<REAL> &ys, int i, int k) {
|
||||||
|
if(k == 0) {
|
||||||
|
return ys[i];
|
||||||
|
} else {
|
||||||
|
// nevile rekursionsformel
|
||||||
|
return ((x - xs[i])*evaluateNeville(x, xs, ys,i+1,k-1) - (x - xs[i+k])*evaluateNeville(x, xs, ys, i, k-1))/(xs[i+k]-xs[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Auswertung eines Interpolationspolynoms p(t) bei t=x
|
||||||
|
template<typename REAL>
|
||||||
|
REAL evaluate(REAL x, std::vector<REAL> &xs, std::vector<REAL> &ys) {
|
||||||
|
// nutze neville verfahren mit p(x) = p_{0,n}(x)
|
||||||
|
evaluateNeville(x, xs, ys, 0, xs.size()-1);
|
||||||
|
}\end{lstlisting}
|
||||||
|
\item Auszug aus \textit{polynom.cc}
|
||||||
|
\begin{lstlisting}[language=C++, title=Auswertung von I-Polynomen für äquidistante Stützstellen, captionpos=b]
|
||||||
|
// Auswertung eines Interpolationspolynoms einer Funktion bei vorgegebenen Stuetzstellen
|
||||||
|
template <typename REAL>
|
||||||
|
REAL evaluateFunction(REAL x, std::vector<REAL> &xs, REAL(*f)(REAL)) {
|
||||||
|
std::vector<double> ys(xs.size());
|
||||||
|
for (int i = 0; i < xs.size(); i++) {
|
||||||
|
// berechne stuetzstellen
|
||||||
|
ys[i] = f(xs[i]);
|
||||||
|
}
|
||||||
|
// verwende polynominterpolation
|
||||||
|
return evaluate(x, xs, ys);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Auswertung eines Interpolationspolynoms einer Funktion bei aequidistanten Stuetzstellen
|
||||||
|
template <typename REAL>
|
||||||
|
REAL evaluateFunctionEqualDist(REAL x, REAL a, REAL b, REAL h, REAL(*f)(REAL)) {
|
||||||
|
std::vector<double> xs(std::floor((b-a)/h));
|
||||||
|
std::vector<double> ys(xs.size());
|
||||||
|
for (int i = 0; i < xs.size(); i++) {
|
||||||
|
// berechne stuetzstellen
|
||||||
|
xs[i] = a + i*h;
|
||||||
|
// und funktionswerte
|
||||||
|
ys[i] = f(xs[i]);
|
||||||
|
}
|
||||||
|
// werte polynom aus
|
||||||
|
return evaluate(x, xs, ys);
|
||||||
|
}\end{lstlisting}
|
||||||
|
\begin{figure}[h]
|
||||||
|
\begin{subfigure}[b]{.5\linewidth}
|
||||||
|
\begin{tikzpicture}
|
||||||
|
\begin{axis}[default 2d plot, xmin=-1, xmax=1]
|
||||||
|
\addplot[green] table {f1_5.dat};
|
||||||
|
\addlegendentry{$n=5$}
|
||||||
|
\addplot[orange] table {f1_10.dat};
|
||||||
|
\addlegendentry{$n=10$}
|
||||||
|
\addplot[blue] table {f1_20.dat};
|
||||||
|
\addlegendentry{$n=20$}
|
||||||
|
\addplot[red, samples=100] {1/(1+x^2)};
|
||||||
|
\addlegendentry{$\frac{1}{1+x^2}$}
|
||||||
|
\end{axis}
|
||||||
|
\end{tikzpicture}
|
||||||
|
\caption{$f_1 = \frac{1}{1+x^2}$}
|
||||||
|
\end{subfigure}
|
||||||
|
\begin{subfigure}[b]{.5\linewidth}
|
||||||
|
\begin{tikzpicture}
|
||||||
|
\begin{axis}[default 2d plot, xmin=-0.5, xmax=0.5, legend pos=outer north east,
|
||||||
|
restrict y to domain=-1:5]
|
||||||
|
\addplot[green] table {f2_5.dat};
|
||||||
|
\addlegendentry{$n=5$}
|
||||||
|
\addplot[orange] table {f2_10.dat};
|
||||||
|
\addlegendentry{$n=10$}
|
||||||
|
\addplot[blue] table {f2_20.dat};
|
||||||
|
\addlegendentry{$n=20$}
|
||||||
|
\addplot[red, samples=5000] {sqrt(abs(x))};
|
||||||
|
\addlegendentry{$\sqrt{|x|} $}
|
||||||
|
\end{axis}
|
||||||
|
\end{tikzpicture}
|
||||||
|
\caption{$f_2 = \sqrt{|x|} $}
|
||||||
|
\end{subfigure}
|
||||||
|
\end{figure}
|
||||||
|
\item Für $\frac{1}{1+x^2}$ funktioniert die Interpolation mit äquidistanten Stützstellen sehr gut.
|
||||||
|
Für $\sqrt{|x|} $ entstehen durch die nicht differenzierbare Stelle bei $x=0$ sehr große Abweichungen,
|
||||||
|
die zu den Rändern mit wachsendem Polynomgrad sogar zunehmen.
|
||||||
|
\end{enumerate}
|
||||||
|
\end{aufgabe}
|
||||||
|
|
||||||
|
\end{document}
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
#include <iostream>
|
||||||
|
#include <vector>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
// Auswertung von p_{i,k}(t) mit Neville Schema bei t=x
|
||||||
|
template<typename REAL>
|
||||||
|
REAL evaluateNeville(REAL x, std::vector<REAL> &xs, std::vector<REAL> &ys, int i, int k) {
|
||||||
|
if(k == 0) {
|
||||||
|
return ys[i];
|
||||||
|
} else {
|
||||||
|
// nevile rekursionsformel
|
||||||
|
return ((x - xs[i])*evaluateNeville(x, xs, ys,i+1,k-1) - (x - xs[i+k])*evaluateNeville(x, xs, ys, i, k-1))/(xs[i+k]-xs[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Auswertung eines Interpolationspolynoms p(t) bei t=x
|
||||||
|
template<typename REAL>
|
||||||
|
REAL evaluate(REAL x, std::vector<REAL> &xs, std::vector<REAL> &ys) {
|
||||||
|
// nutze neville verfahren mit p(x) = p_{0,n}(x)
|
||||||
|
evaluateNeville(x, xs, ys, 0, xs.size()-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Auswertung eines Interpolationspolynoms einer Funktion bei vorgegebenen Stuetzstellen
|
||||||
|
template <typename REAL>
|
||||||
|
REAL evaluateFunction(REAL x, std::vector<REAL> &xs, REAL(*f)(REAL)) {
|
||||||
|
std::vector<double> ys(xs.size());
|
||||||
|
for (int i = 0; i < xs.size(); i++) {
|
||||||
|
// berechne stuetzstellen
|
||||||
|
ys[i] = f(xs[i]);
|
||||||
|
}
|
||||||
|
// verwende polynominterpolation
|
||||||
|
return evaluate(x, xs, ys);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Auswertung eines Interpolationspolynoms einer Funktion bei äquidistanten Stützstellen
|
||||||
|
template <typename REAL>
|
||||||
|
REAL evaluateFunctionEqualDist(REAL x, REAL a, REAL b, REAL h, REAL(*f)(REAL)) {
|
||||||
|
std::vector<double> xs(std::floor((b-a)/h));
|
||||||
|
std::vector<double> ys(xs.size());
|
||||||
|
for (int i = 0; i < xs.size(); i++) {
|
||||||
|
// berechne stuetzstellen
|
||||||
|
xs[i] = a + i*h;
|
||||||
|
// und funktionswerte
|
||||||
|
ys[i] = f(xs[i]);
|
||||||
|
}
|
||||||
|
// werte polynom aus
|
||||||
|
return evaluate(x, xs, ys);
|
||||||
|
}
|
||||||
|
|
||||||
|
// beispiel funktionen
|
||||||
|
template <typename REAL>
|
||||||
|
REAL f1(REAL x) {
|
||||||
|
return 1/(1+std::pow(x,2));
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename REAL>
|
||||||
|
REAL f2(REAL x) {
|
||||||
|
return std::sqrt(std::abs(x));
|
||||||
|
}
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
// polynom grad
|
||||||
|
int n = 5;
|
||||||
|
// abstand zwischen stützstellen
|
||||||
|
double h = 2.0 / n;
|
||||||
|
|
||||||
|
// schrittweite
|
||||||
|
double dx = 2.0 / 1000;
|
||||||
|
double x = 0;
|
||||||
|
for(int i = 0; i < 1000; i++) {
|
||||||
|
x = -1.0 + i*dx;
|
||||||
|
// werte polynom mit äquidistanten stuetzstellen zwischen -1 und 1 mit abstand h bei t=x aus
|
||||||
|
std::cout << x << " " << evaluateFunctionEqualDist(x, -1.0, 1.0, h, f2) << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
#include <iostream>
|
||||||
|
#include <vector>
|
||||||
|
#include "hdnum.hh"
|
||||||
|
|
||||||
|
|
||||||
|
template<class N>
|
||||||
|
class PolynomialProblem
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// Exportiere Größentyp
|
||||||
|
typedef std::size_t size_type;
|
||||||
|
|
||||||
|
// Exportiere Zahlentyp
|
||||||
|
typedef N number_type;
|
||||||
|
|
||||||
|
// Dimension der untenstehenden Funktion
|
||||||
|
std::size_t size () const
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Funktionsauswertung
|
||||||
|
void F (const hdnum::Vector<N>& x, hdnum::Vector<N>& result) const
|
||||||
|
{
|
||||||
|
result[0] = pow(x[0], 4) - 3.0*pow(x[0], 3) + 5.0*x[0] + 3.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Jacobimatrix
|
||||||
|
void F_x (const hdnum::Vector<N>& x, hdnum::DenseMatrix<N>& result) const
|
||||||
|
{
|
||||||
|
result[0][0] = 4.0*pow(x[0], 3) - 9.0*pow(x[0], 2) + 5.0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
int main ()
|
||||||
|
{
|
||||||
|
typedef std::complex<double> Number; // Der Zahlentyp soll hier komplex sein
|
||||||
|
|
||||||
|
typedef PolynomialProblem<Number> Problem;
|
||||||
|
Problem problem;
|
||||||
|
|
||||||
|
|
||||||
|
// Wir schauen Startpunkte auf einem Raster an, das später in ein Bild umgesetzt werden soll
|
||||||
|
for (double start_value_i = -5.0; start_value_i <= 5.0; start_value_i += 1e-2) {
|
||||||
|
|
||||||
|
for (double start_value = -5.0; start_value <= 5.0; start_value += 1e-2) {
|
||||||
|
|
||||||
|
hdnum::Vector<Number> u(problem.size()); // Vektor für Startpunkt bzw Lösung
|
||||||
|
u[0] = Number(start_value, start_value_i); // Startpunkt
|
||||||
|
|
||||||
|
hdnum::Newton newton;
|
||||||
|
newton.set_maxit(20);
|
||||||
|
newton.set_verbosity(0);
|
||||||
|
newton.set_reduction(1e-10);
|
||||||
|
newton.set_abslimit(1e-20);
|
||||||
|
newton.set_linesearchsteps(3);
|
||||||
|
|
||||||
|
newton.solve(problem,u); // Lösen
|
||||||
|
|
||||||
|
double id = 0;
|
||||||
|
if(newton.has_converged()) {
|
||||||
|
|
||||||
|
// Falls unser Newton-Löser konvergiert ist, stellen wir fest welche Nullstelle
|
||||||
|
// Nullstelle wir getroffen haben und legen einen Index für jede Nullstelle fest.
|
||||||
|
|
||||||
|
if (u[0].real() < 0 && u[0].imag() < 0)
|
||||||
|
id = 1;
|
||||||
|
else if (u[0].real() < 0 && u[0].imag() > 0)
|
||||||
|
id = 2;
|
||||||
|
else if (u[0].real() > 0 && u[0].imag() < 0)
|
||||||
|
id = 3;
|
||||||
|
else if (u[0].real() > 0 && u[0].imag() > 0)
|
||||||
|
id = 4;
|
||||||
|
else
|
||||||
|
std::cout << "Unbekannte Nullstelle!" << std::endl;
|
||||||
|
|
||||||
|
// Damit auch der "Abstand" zur Nullstelle (im Sinne von benötigten Iterationen
|
||||||
|
// um sie zu erreichen) sichtbar wird, addieren wir noch die Iterationszahl
|
||||||
|
// um einen Faktor abgeschwächt
|
||||||
|
id += .1 * (double)newton.iterations();
|
||||||
|
}
|
||||||
|
|
||||||
|
std::cout << id << ",";
|
||||||
|
}
|
||||||
|
|
||||||
|
std::cout << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import numpy as np
|
||||||
|
import matplotlib.pyplot as plt
|
||||||
|
|
||||||
|
data = np.genfromtxt('out', delimiter=",")
|
||||||
|
|
||||||
|
plt.imshow(data, interpolation='nearest', cmap='viridis')
|
||||||
|
plt.savefig('out.pdf')
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
#include <iostream>
|
||||||
|
#include <vector>
|
||||||
|
#include "hdnum.hh"
|
||||||
|
|
||||||
|
|
||||||
|
template<class N>
|
||||||
|
class PolynomialProblem
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// Exportiere Größentyp
|
||||||
|
typedef std::size_t size_type;
|
||||||
|
|
||||||
|
// Exportiere Zahlentyp
|
||||||
|
typedef N number_type;
|
||||||
|
|
||||||
|
// Dimension der untenstehenden Funktion
|
||||||
|
std::size_t size () const
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Funktionsauswertung
|
||||||
|
void F (const hdnum::Vector<N>& x, hdnum::Vector<N>& result) const
|
||||||
|
{
|
||||||
|
result[0] = x[0]*x[0]*x[0] - 2.0*x[0] + 2.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Jacobimatrix
|
||||||
|
void F_x (const hdnum::Vector<N>& x, hdnum::DenseMatrix<N>& result) const
|
||||||
|
{
|
||||||
|
result[0][0] = 3.0*x[0]*x[0] - 2.0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
int main ()
|
||||||
|
{
|
||||||
|
typedef std::complex<double> Number; // Der Zahlentyp soll hier komplex sein
|
||||||
|
|
||||||
|
typedef PolynomialProblem<Number> Problem;
|
||||||
|
Problem problem;
|
||||||
|
|
||||||
|
|
||||||
|
// Wir schauen Startpunkte auf einem Raster an, das später in ein Bild umgesetzt werden soll
|
||||||
|
for (double start_value_i = -5.0; start_value_i <= 5.0; start_value_i += 1e-3) {
|
||||||
|
|
||||||
|
for (double start_value = -5.0; start_value <= 5.0; start_value += 1e-3) {
|
||||||
|
|
||||||
|
hdnum::Vector<Number> u(problem.size()); // Vektor für Startpunkt bzw Lösung
|
||||||
|
u[0] = Number(start_value, start_value_i); // Startpunkt
|
||||||
|
|
||||||
|
hdnum::Newton newton;
|
||||||
|
newton.set_maxit(20);
|
||||||
|
newton.set_verbosity(0);
|
||||||
|
newton.set_reduction(1e-10);
|
||||||
|
newton.set_abslimit(1e-20);
|
||||||
|
newton.set_linesearchsteps(3);
|
||||||
|
|
||||||
|
newton.solve(problem,u); // Lösen
|
||||||
|
|
||||||
|
double id = 0;
|
||||||
|
if(newton.has_converged()) {
|
||||||
|
|
||||||
|
// Falls unser Newton-Löser konvertiert ist, stellen wir fest welche Nullstelle
|
||||||
|
// Nullstelle wir getroffen haben und legen einen Index für jede Nullstelle fest.
|
||||||
|
|
||||||
|
if (u[0].real() < 0)
|
||||||
|
id = 1;
|
||||||
|
else if (u[0].imag() < 0)
|
||||||
|
id = 2;
|
||||||
|
else if (u[0].imag() > 0)
|
||||||
|
id = 3;
|
||||||
|
else
|
||||||
|
std::cout << "Unbekannte Nullstelle!" << std::endl;
|
||||||
|
|
||||||
|
// Damit auch der "Abstand" zur Nullstelle (im Sinne von benötigten Iterationen
|
||||||
|
// um sie zu erreichen) sichtbar wird, addieren wir noch die Iterationszahl
|
||||||
|
// um einen Faktor abgeschwächt
|
||||||
|
id += .1 * (double)newton.iterations();
|
||||||
|
}
|
||||||
|
|
||||||
|
std::cout << id << ",";
|
||||||
|
}
|
||||||
|
|
||||||
|
std::cout << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
#include <iostream>
|
||||||
|
#include <vector>
|
||||||
|
#include "hdnum.hh"
|
||||||
|
|
||||||
|
template<class N>
|
||||||
|
class EllipseProblem
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// Exportiere Größentyp
|
||||||
|
typedef std::size_t size_type;
|
||||||
|
|
||||||
|
// Exportiere Zahlentyp
|
||||||
|
typedef N number_type;
|
||||||
|
|
||||||
|
// Dimension der untenstehenden Funktion
|
||||||
|
std::size_t size () const
|
||||||
|
{
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Funktionsauswertung
|
||||||
|
void F (const hdnum::Vector<N>& x, hdnum::Vector<N>& result) const
|
||||||
|
{
|
||||||
|
result[0] = x[0] * x[1] + 2*x[0] - x[1] - 2;
|
||||||
|
result[1] = x[0] * x[1] - x[0] + x[1] -3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Jacobimatrix
|
||||||
|
void F_x (const hdnum::Vector<N>& x, hdnum::DenseMatrix<N>& result) const
|
||||||
|
{
|
||||||
|
result[0][0] = x[1] + 2;
|
||||||
|
result[0][1] = x[0] - 1;
|
||||||
|
result[1][0] = x[1] - 1;
|
||||||
|
result[1][1] = x[0] + 1;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
int main ()
|
||||||
|
{
|
||||||
|
typedef double Number; // Zahlentyp
|
||||||
|
|
||||||
|
|
||||||
|
typedef EllipseProblem<Number> Problem;
|
||||||
|
Problem problem;
|
||||||
|
|
||||||
|
|
||||||
|
hdnum::Vector<Number> u(problem.size()); // Vektor für Startpunkt bzw Lösung
|
||||||
|
hdnum::Vector<Number> result(problem.size()); // Vektor für Funktionswerte
|
||||||
|
|
||||||
|
// Newton
|
||||||
|
hdnum::Newton newton;
|
||||||
|
newton.set_maxit(20);
|
||||||
|
newton.set_verbosity(10);
|
||||||
|
newton.set_reduction(1e-10);
|
||||||
|
newton.set_abslimit(1e-20);
|
||||||
|
newton.set_linesearchsteps(2);
|
||||||
|
|
||||||
|
// 1. Quadrant
|
||||||
|
u[0] = 0.0; u[1] = 1.0;
|
||||||
|
newton.solve(problem,u);
|
||||||
|
std::cout << "Nullstelle im 1. Quadrant: " << std::setprecision(15) << u << std::endl;
|
||||||
|
problem.F(u, result);
|
||||||
|
std::cout << "Funktionswert: " << std::setprecision(15) << result << std::endl;
|
||||||
|
|
||||||
|
// 2. Quadrant
|
||||||
|
u[0] = -2.0; u[1] = 1.0;
|
||||||
|
newton.solve(problem,u);
|
||||||
|
std::cout << "Nullstelle im 2. Quadrant: " << std::setprecision(15) << u << std::endl;
|
||||||
|
problem.F(u, result);
|
||||||
|
std::cout << "Funktionswert: " << std::setprecision(15) << result << std::endl;
|
||||||
|
|
||||||
|
// 3. Quadrant
|
||||||
|
u[0] = -2.0; u[1] = -1.0;
|
||||||
|
newton.solve(problem,u);
|
||||||
|
std::cout << "Nullstelle im 3. Quadrant: " << std::setprecision(15) << u << std::endl;
|
||||||
|
problem.F(u, result);
|
||||||
|
std::cout << "Funktionswert: " << std::setprecision(15) << result << std::endl;
|
||||||
|
|
||||||
|
// 4. Quadrant
|
||||||
|
u[0] = 2.0; u[1] = -1.0;
|
||||||
|
newton.solve(problem,u);
|
||||||
|
std::cout << "Nullstelle im 4. Quadrant: " << std::setprecision(15) << u << std::endl;
|
||||||
|
problem.F(u, result);
|
||||||
|
std::cout << "Funktionswert: " << std::setprecision(15) << result << std::endl;
|
||||||
|
|
||||||
|
// Relaxation
|
||||||
|
hdnum::Banach banach;
|
||||||
|
banach.set_maxit(5000); // set parameters
|
||||||
|
banach.set_verbosity(2);
|
||||||
|
banach.set_reduction(1e-15);
|
||||||
|
banach.set_abslimit(1e-20);
|
||||||
|
banach.set_sigma(0.375);
|
||||||
|
|
||||||
|
u[0] = 2.0; u[1] = 1.0; // Startwert
|
||||||
|
banach.solve(problem,u);
|
||||||
|
|
||||||
|
std::cout << "Ergebnis: " << std::setprecision(15) << u << std::endl;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Binary file not shown.
@@ -0,0 +1,161 @@
|
|||||||
|
#include <vector>
|
||||||
|
#include "hdnum.hh" // hdnum header
|
||||||
|
|
||||||
|
template<typename REAL>
|
||||||
|
void solveTriDiag(hdnum::DenseMatrix<REAL> &A, std::vector<REAL> &x, std::vector<REAL> &b) {
|
||||||
|
int N = b.size();
|
||||||
|
x[0] = A[0][0];
|
||||||
|
// LU Zerlegung
|
||||||
|
REAL l;
|
||||||
|
for (int j=1; j<N; j++) {
|
||||||
|
// berechne l faktor
|
||||||
|
l = A[j][j-1] / x[j-1];
|
||||||
|
// modifiziere diagonalelemente und rechte seite
|
||||||
|
x[j] = A[j][j] - l * A[j-1][j];
|
||||||
|
b[j] = b[j] - l * b[j-1];
|
||||||
|
}
|
||||||
|
// Loesen durch Rueckwaertseinsetzen
|
||||||
|
x[N-1] = b[N-1] / x[N-1];
|
||||||
|
for (int j=N-2; j>=0; j--) {
|
||||||
|
x[j] = (b[j] - A[j][j+1]*x[j+1])/x[j];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename REAL>
|
||||||
|
class CubicSpline {
|
||||||
|
public:
|
||||||
|
// erstelle einen kubischen spline mit vorgegebenen stuetzstellen
|
||||||
|
// und werten
|
||||||
|
CubicSpline(std::vector<REAL> xs, std::vector<REAL> ys) {
|
||||||
|
calculateCoefficients(xs, ys);
|
||||||
|
}
|
||||||
|
|
||||||
|
// erstelle einen kubischen spline mit vorgegebenen stuetzstellen
|
||||||
|
// und einer zu interpolierenden funktion
|
||||||
|
CubicSpline(std::vector<REAL> xs, REAL(*f)(REAL)) {
|
||||||
|
int N = xs.size();
|
||||||
|
std::vector<double> ys(N);
|
||||||
|
for (int i=0; i<N; i++) {
|
||||||
|
ys[i] = f(xs[i]);
|
||||||
|
}
|
||||||
|
calculateCoefficients(xs, ys);
|
||||||
|
}
|
||||||
|
|
||||||
|
// erstelle einen kubischen spline an aequidistanten stuetzstellen
|
||||||
|
// und einer zu interpolierenden funktion
|
||||||
|
CubicSpline(REAL a, REAL b, int N, REAL(*f)(REAL)) {
|
||||||
|
std::vector<double> xs(N+1);
|
||||||
|
std::vector<double> ys(N+1);
|
||||||
|
for (int i=0; i<=N; i++) {
|
||||||
|
xs[i] = a + (1.0*i)/N*(b-a);
|
||||||
|
ys[i] = f(xs[i]);
|
||||||
|
}
|
||||||
|
calculateCoefficients(xs, ys);
|
||||||
|
}
|
||||||
|
|
||||||
|
// werte kubischen spline an vorgegebener stelle aus
|
||||||
|
REAL evaluate(REAL x) {
|
||||||
|
for (int i=1; i<x_s.size(); i++) {
|
||||||
|
if (x > x_s[i] && i < x_s.size() - 1) {
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
return a_0[i-1] + a_1[i-1] *(x - x_s[i]) + a_2[i-1]*std::pow(x - x_s[i], 2) + a_3[i-1]*std::pow(x-x_s[i], 3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// gebe alle interpolations polynome aus
|
||||||
|
void print() {
|
||||||
|
for(int i=0; i<x_s.size()-1; i++) {
|
||||||
|
printf("p_%d(x) = %4.2f + %4.2f(x - %4.2f) + %4.2f(x - %4.2f)^2 + %4.2f(x - %4.2f)^3\n",
|
||||||
|
i, a_0[i], a_1[i], x_s[i], a_2[i], x_s[i], a_3[i], x_s[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
// stuetzstellen
|
||||||
|
std::vector<REAL> x_s;
|
||||||
|
// koeffizienten
|
||||||
|
std::vector<REAL> a_0;
|
||||||
|
std::vector<REAL> a_1;
|
||||||
|
std::vector<REAL> a_2;
|
||||||
|
std::vector<REAL> a_3;
|
||||||
|
|
||||||
|
void calculateCoefficients(std::vector<REAL> xs, std::vector<REAL> ys) {
|
||||||
|
// stuetzstellen from x_0 ... to x_n
|
||||||
|
int n = xs.size()-1;
|
||||||
|
// copy stuetzstellen
|
||||||
|
x_s = std::vector<double>(n+1);
|
||||||
|
x_s = xs;
|
||||||
|
// setup (n-1)x(n-1) matrix for a_2
|
||||||
|
hdnum::DenseMatrix<REAL> A(n-1,n-1);
|
||||||
|
std::vector<REAL> b(n-1);
|
||||||
|
std::vector<REAL> x(n-1);
|
||||||
|
REAL h; // h_i
|
||||||
|
REAL h1; // h_{i+1}
|
||||||
|
// setup LGS for a_2
|
||||||
|
// A has tridiagonal structure
|
||||||
|
for (int i = 1; i<n; i++) {
|
||||||
|
h = xs[i] - xs[i-1];
|
||||||
|
h1 = xs[i+1] - xs[i];
|
||||||
|
b[i-1] = 3 * ((ys[i+1] - ys[i])/h1 - (ys[i] - ys[i-1])/h);
|
||||||
|
if (i > 1) {
|
||||||
|
A[i-1][i-2] = h;
|
||||||
|
} if (i < n-1) {
|
||||||
|
A[i-1][i] = h1;
|
||||||
|
}
|
||||||
|
A[i-1][i-1] = 2 * (h + h1);
|
||||||
|
}
|
||||||
|
// initialize vectors
|
||||||
|
a_0 = std::vector<double>(n);
|
||||||
|
a_1 = std::vector<double>(n);
|
||||||
|
a_2 = std::vector<double>(n);
|
||||||
|
a_3 = std::vector<double>(n);
|
||||||
|
solveTriDiag(A,a_2,b);
|
||||||
|
// natuerliche randbedingung
|
||||||
|
a_2[n-1] = 0;
|
||||||
|
// berechne restliche koeffizienten
|
||||||
|
for (int i = 1; i<=n; i++) {
|
||||||
|
h = xs[i] - xs[i-1]; // h_i
|
||||||
|
h1 = xs[i+1] - xs[i]; // h_{i+1}
|
||||||
|
a_0[i-1] = ys[i];
|
||||||
|
if (i == 1) { // a_2[-1] = 0
|
||||||
|
a_1[i-1] = (ys[i] - ys[i-1])/h + (h/3)*(2*a_2[i-1]);
|
||||||
|
a_3[i-1] = (a_2[i-1])/(3*h);
|
||||||
|
} else {
|
||||||
|
a_1[i-1] = (ys[i] - ys[i-1])/h + h/3*(2*a_2[i-1] + a_2[i-2]);
|
||||||
|
a_3[i-1] = (a_2[i-1] - a_2[i-2])/(3 * h);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
double f1(double x) {
|
||||||
|
return std::pow(x,3);
|
||||||
|
}
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
// std::vector<double> xs = {0, 1, 2};
|
||||||
|
// CubicSpline<double> phi(xs, f1);
|
||||||
|
// phi.print();
|
||||||
|
|
||||||
|
// saurier fundstellen
|
||||||
|
std::vector<double> xs = {3.75, 3.75, 2.25, 1.25, 0.25, 0.75, 4.00, 5.50, 6.25, 9.00, 12.5, 12.75, 12.25};
|
||||||
|
std::vector<double> ys = {0.25, 1.50, 3.25, 4.25, 4.65, 4.83, 2.50, 3.25, 3.65, 3.00, 1.25, 2.150, 3.500};
|
||||||
|
|
||||||
|
std::vector<double> ts(13);
|
||||||
|
ts[0] = 0;
|
||||||
|
for (int i = 1; i<=12; i++) {
|
||||||
|
ts[i] = ts[i-1] + std::sqrt(std::pow(xs[i] - xs[i-1], 2) + std::pow(ys[i] - ys[i-1], 2));
|
||||||
|
}
|
||||||
|
|
||||||
|
CubicSpline<double> phi(ts, xs);
|
||||||
|
CubicSpline<double> psi(ts, ys);
|
||||||
|
|
||||||
|
double xi;
|
||||||
|
for (int j = 0; j<=100; j++) {
|
||||||
|
xi = j*ts[12] / 100;
|
||||||
|
std::cout << phi.evaluate(xi) << " " << psi.evaluate(xi) << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,42 @@
|
|||||||
|
\documentclass{article}
|
||||||
|
\usepackage[ngerman]{babel}
|
||||||
|
\usepackage[top=2.5cm, bottom=2.5cm]{geometry}
|
||||||
|
\title{Abschlussbericht}
|
||||||
|
\author{Leon Burgard, Josua Kugler, Christian Merten}
|
||||||
|
\begin{document}
|
||||||
|
\maketitle
|
||||||
|
\section*{Projektbeschreibung}
|
||||||
|
Unser Projekt \glqq Plenarprotokolle \grqq stellt mittels dem Paket \verb|hateimparlament| Funktionen zur Analyse der Plenarprotokolle der 19. Wahlperiode des deutschen Bundestages zur Verfügung. Diese Funktionen können in vier Bereiche unterteilt werden:
|
||||||
|
\begin{enumerate}
|
||||||
|
\item Herunterladen der Protokolle
|
||||||
|
\item Konvertierung der XML-Dateien in Tibbles
|
||||||
|
\item Reparieren von Fehlern
|
||||||
|
\item Analyse
|
||||||
|
\end{enumerate}
|
||||||
|
Das Herunterladen der Protokolle gelingt über die Funktion
|
||||||
|
\verb|fetch_all()|, welche auf die Website des deutschen Bundestages zugreift und die XML-Dateien einzeln herunterlädt. Hierzu haben wir das Paket rvest verwendet, welches wir bereits in der Vorlesung kennengelernt haben.
|
||||||
|
Durch \verb|read_all()| werden diese heruntergeladenen XML-Dateien in eine benannte Liste mit fünf Tibbles (speaker, speeches, talks, comments und applause) geschrieben. Allerdings benötigt man diese Tibbles immer wieder und es ist ziemlich zeitaufwändig die XML-Dateien immer wieder neu in Tibbles einzulesen, deshalb haben wir zusätzlich eine Funkion \verb|write_to_csv()| geschrieben, die die fertigen Tibbles als CSV-Dateien speichert. Diese können dann sehr schnell durch \verb|read_from_csv()| eingelesen werden, wodurch viel Zeit gesparrt wird.
|
||||||
|
Da diese Protokolle kleine Fehler enthalten, müssen diese noch im nächsten Schritt bereinigt werden, was mit \verb|repair()| funktioniert. Hierbei wird das Paket tidyverse viel benutzt, welches insgesamt sehr viel in unserem Projekt beansprucht wird, da wir uns mit der Datenanalyse beschäftigen.
|
||||||
|
In \verb|analyse.R| stellen wir noch einige Hilfsfunktionen bereit, die es dem Nutzer vereinfachen die Daten auszuwerten. Beispielsweise steht schon eine Funktion zur Verfügung, die ein Balkendiagramm erstellt, bei dem jede Partei des Bundestages sperat ausgewertet wird. Hierbei wird das Paket \verb|ggplot2| verwendet.
|
||||||
|
Im letzten Schritt unseres Projekts haben wir Fragestellungen festgelegt, die wir mithilfe von unserem Paket beantworten wollten. Die Daten und unsere Ergebnisse visualisierten wir mithilfe von \verb|ggplot2| und \verb|tidyverse| in Vignetten.
|
||||||
|
\section*{Organisation des Teams}
|
||||||
|
Während der ersten Projektphase wurden hauptsächlich die Funktionen zum Herunterladen der Dateien und Konvertieren und Reparieren der Tibbles geschrieben. Dies geschah größtenteils in Einzelarbeit, wobei hierbei die gegenseitige Kontrolle und Nachfragen die Funktionen optimiert haben. Zwischendurch wurde immer mal wieder zu einer HeiConf-Konferenz einberufen, um sich selbst den Zwischenstand klar zu machen und die Herausforderungen für die nächsten Wochen zu besprechen.
|
||||||
|
In der zweiten Hälfte des Projekts kümmerten wir uns dann um die Analyse der Daten und stellten unsere Ergebnisse in Vignetten da und erzeugten Dokumentationen für alle Funktionen, die für den Nutzer wichtig sind.
|
||||||
|
\newpage
|
||||||
|
|
||||||
|
\section*{Meine Beteiligung (Christian Merten)}
|
||||||
|
|
||||||
|
Meine Aufgaben und Beteiligung war hauptsächlich auf zwei Teile konzentriert: Organisation des Teams
|
||||||
|
und Implementierung der Grundfunktionalitäten. Zur Organisation habe ich regelmäßig versucht
|
||||||
|
die noch ausstehenden Aufgaben zusammenzufassen, zu priorisieren und dem Team zu kommunizieren.
|
||||||
|
|
||||||
|
Auf Umsetzungsseite habe ich mich v.a. um die grundlegenden Aufgaben Protokolle herunterladen,
|
||||||
|
auslesen und reparieren gekümmert. Auch die grundlegenden Paketstrukturen in \verb|R| anzulegen und
|
||||||
|
die erste Vignette zum Laufen zu bringen, waren meine Aufgaben. Im späteren Verlauf habe ich noch
|
||||||
|
einige Analysehilfsfunktionen entwickelt.
|
||||||
|
|
||||||
|
Ich habe die Teamarbeit als herausfordernd empfunden, denn ich hatte zumeist hohe Ansprüche und klare
|
||||||
|
Vorstellungen. Deshalb ist es mir nicht immer leicht gefallen, Verantwortung für Projektteile
|
||||||
|
abzugeben. Insgesamt bin ich jedoch zufrieden mit der letztendlichen Teamarbeit.
|
||||||
|
|
||||||
|
\end{document}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,11 @@
|
|||||||
|
approx_p <- function(n0, a, b) {
|
||||||
|
x <- rnorm(n0)
|
||||||
|
sum(x >= a & x <= b) / n0
|
||||||
|
}
|
||||||
|
# berechne wahres p durch Integration
|
||||||
|
p <- integrate(dnorm, lower=-1, upper=3)$value
|
||||||
|
p
|
||||||
|
# berechne Differenz zwischen Näherung und wahrem Wert für verschiedene n0
|
||||||
|
abs(p - approx_p(1e1, -1, 3))
|
||||||
|
abs(p - approx_p(1e3, -1, 3))
|
||||||
|
abs(p - approx_p(1e5, -1, 3))
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# linear congruential generator (lcg)
|
||||||
|
lcg_prng <- function(n, y1, m, a, b) {
|
||||||
|
if (n == 1) return(y1)
|
||||||
|
y <- (a*y1 + b) %% m
|
||||||
|
c(y1, lcg_prng(n-1, y, m, a, b))
|
||||||
|
}
|
||||||
|
par(mfrow=c(1,2))
|
||||||
|
m <- 2^11
|
||||||
|
x <- lcg_prng(500, y1=1, m=m, a=1017, b=1)
|
||||||
|
plot(x[1:499]/m, x[2:500]/m, pch=".", cex=4, xlab="u1, ..., u499", ylab="u2, ..., u500", main="lcg_prng()")
|
||||||
|
# Vergleich mit R-Funktion sample.int(), siehe ?sample
|
||||||
|
x <- sample.int(m, 500)
|
||||||
|
plot(x[1:499]/m, x[2:500]/m, pch=".", cex=4, xlab="u1, ..., u499", ylab="u2, ..., u500", main="sample.int()")
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
w <- 256L
|
||||||
|
h <- 256L
|
||||||
|
set.seed(0)
|
||||||
|
|
||||||
|
lcg_prng <- function(n, y1, m, a, b) {
|
||||||
|
if (n == 1) return(y1)
|
||||||
|
res <- integer(n)
|
||||||
|
res[1] <- y1
|
||||||
|
for (i in 2:n) {
|
||||||
|
y1 <- (a*y1 + b) %% m
|
||||||
|
res[i] <- y1
|
||||||
|
}
|
||||||
|
res
|
||||||
|
}
|
||||||
|
|
||||||
|
m <- 2^11
|
||||||
|
z <- sample(1:m, w*h, replace=T)
|
||||||
|
img_sample <- matrix(z %% 2, nrow=w)
|
||||||
|
|
||||||
|
y <- lcg_prng(w*h, y1=1, m=m, a=1017, b=1)
|
||||||
|
img_lcg <- matrix(y %% 2, nrow=w)
|
||||||
|
|
||||||
|
par(mfrow=c(1,2), mar=c(1,1,1,1))
|
||||||
|
image(
|
||||||
|
img_sample,
|
||||||
|
col = c("black", "white"),
|
||||||
|
axes = FALSE,
|
||||||
|
useRaster = TRUE,
|
||||||
|
asp=1, # fixes aspect ratio
|
||||||
|
main="sample()")
|
||||||
|
image(
|
||||||
|
img_lcg,
|
||||||
|
col = c("black", "white"),
|
||||||
|
axes = FALSE,
|
||||||
|
useRaster = TRUE,
|
||||||
|
asp=1,
|
||||||
|
main="lcg_prng()")
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
n <- 300
|
||||||
|
u <- runif(n)
|
||||||
|
x <- qnorm(u)
|
||||||
|
y <- rnorm(n)
|
||||||
|
|
||||||
|
par(mfrow=c(1,2), mar=c(2,2,1,1))
|
||||||
|
qqplot(u, y, main="uniform vs normal")
|
||||||
|
abline(0, 1, col="gray")
|
||||||
|
qqplot(x, y, main="normal (inversion) vs normal")
|
||||||
|
abline(0, 1, col="gray")
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
# Welche der beiden Sequenzen entstammt einem fairen Münzwurf (mit unabhängigen Würfe)?
|
||||||
|
x <- c(1,1,1,0,1,0,0,1,1,1,0,1,0,0,1,1,0,1,1,1,
|
||||||
|
0,0,0,0,0,0,1,1,1,1,1,1,0,0,1,0,0,1,0,0,
|
||||||
|
1,1,1,1,1,0,1,0,1,1,1,0,1,1,1,0,1,1,0,0,
|
||||||
|
1,0,1,0,0,1,1,0,1,1,0,1,0,0,0,0,0,0,0,0,
|
||||||
|
1,0,1,0,1,0,0,0,1,0,1,0,1,1,1,1,0,0,1,1)
|
||||||
|
y <- c(1,0,1,0,1,1,0,1,0,0,1,1,0,0,0,1,0,1,1,1,
|
||||||
|
0,0,1,1,0,0,1,0,1,1,0,1,0,1,0,1,1,0,1,0,
|
||||||
|
0,1,0,1,0,0,1,0,0,1,1,1,0,1,0,1,0,1,0,1,
|
||||||
|
0,1,0,1,1,0,1,0,1,0,0,1,0,0,0,1,0,0,1,1,
|
||||||
|
0,1,0,0,0,1,1,0,0,1,0,1,0,0,1,0,1,0,1,1)
|
||||||
|
|
||||||
|
c(length(x), length(y)) # gleiche Länge
|
||||||
|
table(x) # zähle Anzahl der 1en und 0en
|
||||||
|
table(y)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
get_runs_statistic <- function(v) {
|
||||||
|
r <- rle(v)
|
||||||
|
c(number_of_runs = length(r$lengths),
|
||||||
|
longest_run = max(r$lengths),
|
||||||
|
number_of_ones = sum(v == 1))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
get_confidence_region <- function(v, alpha) {
|
||||||
|
stopifnot(length(alpha)==1)
|
||||||
|
q <- 1 - alpha
|
||||||
|
stopifnot(q > 0 && q <= 1)
|
||||||
|
i <- 0
|
||||||
|
m <- mean(v)
|
||||||
|
while(
|
||||||
|
sum(m-i <= v & v <= m+i) / length(v) < q
|
||||||
|
) i <- i+0.5
|
||||||
|
return(list(left=ceiling(m-i)-0.5, right=floor(m+i)+0.5))
|
||||||
|
}
|
||||||
|
|
||||||
|
n <- length(x)
|
||||||
|
|
||||||
|
rx <- get_runs_statistic(x)
|
||||||
|
ry <- get_runs_statistic(y)
|
||||||
|
|
||||||
|
|
||||||
|
# simulate fair coin tosses
|
||||||
|
|
||||||
|
library(tibble)
|
||||||
|
set.seed(0)
|
||||||
|
|
||||||
|
simu <- replicate(1e5, # execute following function call 1e5 times
|
||||||
|
get_runs_statistic(sample(0:1, n, replace=TRUE)))
|
||||||
|
data <- as_tibble(t(simu))
|
||||||
|
|
||||||
|
|
||||||
|
# Plot results
|
||||||
|
|
||||||
|
layout(
|
||||||
|
rbind(
|
||||||
|
c(1, 2),
|
||||||
|
c(3, 3)
|
||||||
|
),
|
||||||
|
heights=c(1, 1),
|
||||||
|
)
|
||||||
|
clrs <- list(x = "red", y = "blue", conf = "#00FF0040")
|
||||||
|
mark_lwd <- 3
|
||||||
|
invisible(lapply(names(data), function (nm) {
|
||||||
|
v <- data[[nm]]
|
||||||
|
hist(v, breaks=(min(v)-0.5):(max(v)+0.5), main=nm, xlab=NULL)
|
||||||
|
y_axis_max <- par("yaxp")[2]
|
||||||
|
segments(rx[nm], 0, y1=y_axis_max, col=clrs$x, lwd=mark_lwd)
|
||||||
|
segments(ry[nm], 0, y1=y_axis_max, col=clrs$y, lwd=mark_lwd)
|
||||||
|
conf <- get_confidence_region(v, 0.05)
|
||||||
|
rect(conf$left, 0, conf$right, y_axis_max, col=clrs$conf, border=NA)
|
||||||
|
}))
|
||||||
|
legend(
|
||||||
|
"topright",
|
||||||
|
c("x", "y", "95% confidence"),
|
||||||
|
col=c(clrs$x, clrs$y, clrs$conf),
|
||||||
|
lwd=mark_lwd)
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
library(ggplot2)
|
||||||
|
library(tibble)
|
||||||
|
|
||||||
|
x_plt <- seq(0, 1, len=7)
|
||||||
|
tb <- tibble(
|
||||||
|
x_val = rep(x_plt, times=3),
|
||||||
|
y_val = c(sin(2*pi*x_plt)/2+0.5, x_plt^2, sqrt(x_plt)),
|
||||||
|
fun = rep(c("sin", "sqr", "sqrt"), each=length(x_plt)))
|
||||||
|
tb$z_val = abs(0.5-tb$x_val)+0.1
|
||||||
|
|
||||||
|
plt <- ggplot(data = tb, mapping = aes(x = x_val, y = y_val, color=fun)) +
|
||||||
|
geom_line(mapping = aes(linetype=fun), size = 1.2) +
|
||||||
|
geom_point(color = "black", mapping = aes(size = z_val))
|
||||||
|
|
||||||
|
print(plt)
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
library(ggplot2)
|
||||||
|
library(tibble)
|
||||||
|
|
||||||
|
x_plt <- seq(0, pi/2, len=100)
|
||||||
|
tb <- tibble(
|
||||||
|
x_val = rep(x_plt, 2),
|
||||||
|
y_val = c(sin(x_plt), sin(2*x_plt)),
|
||||||
|
fun = rep(c("sin(x)", "sin(2x)"), each=length(x_plt)))
|
||||||
|
|
||||||
|
plt <- ggplot(tb, aes(x_val, y_val, color=fun)) +
|
||||||
|
xlab("x") +
|
||||||
|
ylab("y") +
|
||||||
|
labs(color = "function") +
|
||||||
|
scale_x_continuous(breaks = pi/c(Inf, 6, 4, 3, 2),
|
||||||
|
labels = c("0", "pi/6", "pi/4", "pi/3", "pi/2")) +
|
||||||
|
scale_y_continuous(breaks = sqrt(0:4/4),
|
||||||
|
labels = c("0", "1/2", "sqrt(2)/2", "sqrt(3)/2", "1")) +
|
||||||
|
geom_line()
|
||||||
|
|
||||||
|
print(plt)
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
library(ggplot2)
|
||||||
|
library(tibble)
|
||||||
|
library(gridExtra)
|
||||||
|
|
||||||
|
# Bundeswahlleiter, Wiesbaden 2017
|
||||||
|
# Endgültig gewählte Bewerberinnen und Bewerber bei der Wahl zum 19. Deutschen Bundestag (24. September 2017)
|
||||||
|
data_raw <- readr::read_delim("mdb.csv", delim=";")
|
||||||
|
mdb <- data_raw[,c("Name", "Vorname", "Geschlecht", "Geburtsjahr", "Partei_KurzBez")]
|
||||||
|
names(mdb) <- c("last_name", "first_name", "gender", "birth_year", "party")
|
||||||
|
party_colors <- c(
|
||||||
|
SPD="#DF0B25",
|
||||||
|
CSU="#87bbe6",
|
||||||
|
CDU="#000000",
|
||||||
|
AfD="#1A9FDD",
|
||||||
|
"DIE LINKE"="#BC3475",
|
||||||
|
"GRÜNE"="#4A932B",
|
||||||
|
FDP="#FEEB34"
|
||||||
|
)
|
||||||
|
|
||||||
|
plt1 <- ggplot(data = mdb, aes(x = party, fill=gender)) +
|
||||||
|
geom_bar(position = "dodge2")
|
||||||
|
|
||||||
|
plt2 <- ggplot(data = mdb, aes(x = birth_year, fill = party)) +
|
||||||
|
geom_histogram(binwidth=10, position=position_dodge2(preserve="single")) +
|
||||||
|
scale_fill_manual(values=party_colors)
|
||||||
|
|
||||||
|
grid.arrange(plt1, plt2, nrow=1)
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
NUMERIC_TYPES <- c("double", "integer")
|
||||||
|
|
||||||
|
lsq <- function(X, y) {
|
||||||
|
# TODO
|
||||||
|
stopifnot("X may not be empty" = length(X) > 0)
|
||||||
|
stopifnot("y may not be empty" = length(y) > 0)
|
||||||
|
stopifnot("X must be numeric" = typeof(X) %in% NUMERIC_TYPES)
|
||||||
|
stopifnot("y must be numeric" = typeof(y) %in% NUMERIC_TYPES)
|
||||||
|
stopifnot("X must be matrix" = is.matrix(X))
|
||||||
|
stopifnot("y must be vector or matrix with one column" = is.vector(y) || (is.matrix(y) && ncol(y) == 1))
|
||||||
|
stopifnot("dimensions of X and y do not fit" = (is.vector(y) && nrow(X) == length(y)) || (is.matrix(y) && nrow(y) == nrow(X)))
|
||||||
|
stopifnot("y may not contain NA" = all(!is.na(y)))
|
||||||
|
stopifnot("X may not contain NA" = all(!is.na(X)))
|
||||||
|
A <- t(X) %*% X
|
||||||
|
stopifnot("det(t(X) %*% X) must not be zero" = det(A) != 0)
|
||||||
|
solve(A, t(X) %*% y)
|
||||||
|
}
|
||||||
|
|
||||||
|
lsq(matrix(1:6, nrow=3), 1:3)
|
||||||
|
lsq(matrix(runif(6), nrow=3), matrix(runif(3), ncol=1))
|
||||||
|
lsq(matrix(letters[1:6] , nrow=2), 1:3)
|
||||||
|
lsq(matrix(1:6, nrow=3), list(1,2,3))
|
||||||
|
lsq(1:6, 1:3)
|
||||||
|
lsq(matrix(1:6, nrow=3), array(1:3, dim=c(1,1,3)))
|
||||||
|
lsq(matrix(1:6, nrow=3), 1:4)
|
||||||
|
lsq(matrix(1:6, nrow=3), matrix(1:3, nrow=1))
|
||||||
|
lsq(matrix(1:6, nrow=3), matrix(1:6, nrow=3))
|
||||||
|
lsq(matrix(double(0), nrow=0, ncol=0), matrix(double(0), nrow=0, ncol=0))
|
||||||
|
lsq(matrix(1:6, nrow=3), c(1,NA,3))
|
||||||
|
lsq(matrix(c(1:5, NA), nrow=3), 1:3)
|
||||||
|
lsq(matrix(c(1,1,2,1,1,2), nrow=3), 1:3)
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
my_matrix <- function(vec, nrow=NULL, ncol=NULL, colnames=NULL, rownames=NULL) {
|
||||||
|
stopifnot("at least one of nrow or ncol has to be specified" = !is.null(nrow) || !is.null(ncol))
|
||||||
|
if (is.null(nrow)) {
|
||||||
|
stopifnot("incompatible length" = length(vec) %% ncol == 0)
|
||||||
|
nrow <- length(vec) / ncol
|
||||||
|
} else if (is.null(ncol)) {
|
||||||
|
stopifnot("incompatible length" = length(vec) %% nrow == 0)
|
||||||
|
ncol <- length(vec) / nrow
|
||||||
|
} else if (length(vec) == 1) {
|
||||||
|
vec <- rep(vec, nrow * ncol)
|
||||||
|
} else stopifnot("incompatible length" = length(vec) == nrow * ncol)
|
||||||
|
|
||||||
|
dim(vec) <- c(nrow, ncol)
|
||||||
|
stopifnot("lenght of colnames must be ncol" = is.null(colnames) || length(colnames) == ncol)
|
||||||
|
stopifnot("lenght of rownames must be nrow" = is.null(rownames) || length(rownames) == nrow)
|
||||||
|
dimnames(vec) <- list(rownames, colnames)
|
||||||
|
return(vec)
|
||||||
|
}
|
||||||
|
|
||||||
|
my_matrix(1:6)
|
||||||
|
my_matrix(1:6, ncol=1)
|
||||||
|
my_matrix(1:6, ncol=2)
|
||||||
|
my_matrix(1:6, ncol=3)
|
||||||
|
my_matrix(1:6, ncol=6)
|
||||||
|
my_matrix(1:6, ncol=4)
|
||||||
|
my_matrix(1:6, nrow=2)
|
||||||
|
my_matrix(1:6, nrow=7)
|
||||||
|
my_matrix(1:6, ncol=2, nrow=2)
|
||||||
|
my_matrix(1:6, ncol=2, nrow=3)
|
||||||
|
my_matrix(1:6, ncol=2, nrow=1)
|
||||||
|
my_matrix(0, ncol=3, nrow=2)
|
||||||
|
my_matrix(1:6, ncol=3, colnames=LETTERS[1:3])
|
||||||
|
my_matrix(1:6, ncol=3, colnames=LETTERS[1:2])
|
||||||
|
my_matrix(1:6, ncol=3, rownames=letters[24 + 1:2])
|
||||||
|
my_matrix(1:6, ncol=3, colnames=LETTERS[1:3], rownames=letters[24 + 1:2])
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
my_tibble <- function(data) {
|
||||||
|
attr(data, "row.names") <- (1:lengths(data)[1])
|
||||||
|
attr(data, "class") <- c("tbl_df", "tbl", "data.frame")
|
||||||
|
return(data)
|
||||||
|
}
|
||||||
|
|
||||||
|
library(tibble)
|
||||||
|
my_tb <- my_tibble(list(x=1:3, y=letters[1:3]))
|
||||||
|
tb <- tibble(x=1:3 , y=letters[1:3])
|
||||||
|
identical(tb, my_tb)
|
||||||
|
|
||||||
|
my_factor <- function(data) {
|
||||||
|
lvls <- unique(data)
|
||||||
|
vec <- sapply(data, function(x) match(x, lvls), USE.NAMES=FALSE)
|
||||||
|
attr(vec, "levels") <- lvls
|
||||||
|
attr(vec, "class") <- "factor"
|
||||||
|
return(vec)
|
||||||
|
}
|
||||||
|
|
||||||
|
my_fac <- my_factor (c("a", "b", "a", "a", "c", "c"))
|
||||||
|
fac <- factor(c("a", "b", "a", "a", "c", "c"))
|
||||||
|
identical(fac, my_fac)
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user