aboutsummaryrefslogtreecommitdiffstats
path: root/buch/chapters/060-integral
diff options
context:
space:
mode:
Diffstat (limited to 'buch/chapters/060-integral')
-rw-r--r--buch/chapters/060-integral/images/legendre.m64
-rw-r--r--buch/chapters/060-integral/images/legendre.pdfbin0 -> 47113 bytes
-rw-r--r--buch/chapters/060-integral/images/legendre.tex99
-rw-r--r--buch/chapters/060-integral/images/orthogonal.pdfbin0 -> 25003 bytes
-rw-r--r--buch/chapters/060-integral/images/orthogonal.tex79
5 files changed, 242 insertions, 0 deletions
diff --git a/buch/chapters/060-integral/images/legendre.m b/buch/chapters/060-integral/images/legendre.m
new file mode 100644
index 0000000..8e8317d
--- /dev/null
+++ b/buch/chapters/060-integral/images/legendre.m
@@ -0,0 +1,64 @@
+#
+# legendre.m
+#
+# (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
+#
+pkg load miscellaneous
+global N;
+N = 30;
+
+function retval = legendrepath(fn, n, name)
+ global N;
+ m = n * N;
+ c = legendrepoly(n)
+ x = (-m:m)/m;
+ v = polyval(c, x);
+ fprintf(fn, "\\def\\legendre%s{\n", name)
+ fprintf(fn, "\t ({%.5f*\\dx},{%.5f*\\dy})", x(1), v(1));
+ for i = (2:length(v))
+ fprintf(fn, "\n\t-- ({%.5f*\\dx},{%.5f*\\dy})", x(i), v(i));
+
+ endfor
+ fprintf(fn, "\n}\n");
+ ci = polyint(conv(c, c))
+polyval(ci, 1)
+ normalization = sqrt(polyval(ci, 1) - polyval(ci, -1))
+ fprintf(fn, "\\def\\normalization%s{%.5f}\n", name, normalization);
+endfunction
+
+function retval = legendreprodukt(fn, a, b, name)
+ global N;
+ n = max(a, b);
+ m = n * N;
+ pa = legendrepoly(a);
+ pb = legendrepoly(b);
+ p = conv(pa, pb);
+ x = (-m:m)/m;
+ v = polyval(p, x);
+ fprintf(fn, "\\def\\produkt%s{\n", name)
+ fprintf(fn, "\t ({%.5f*\\dx},{%.5f*\\dy})", x(1), v(1));
+ for i = (2:length(v))
+ fprintf(fn, "\n\t-- ({%.5f*\\dx},{%.5f*\\dy})", x(i), v(i));
+ endfor
+ fprintf(fn, "\n}\n");
+endfunction
+
+fn = fopen("legendrepaths.tex", "w");
+legendrepath(fn, 1, "one");
+legendrepath(fn, 2, "two");
+legendrepath(fn, 3, "three");
+legendrepath(fn, 4, "four");
+legendrepath(fn, 5, "five");
+legendrepath(fn, 6, "six");
+legendrepath(fn, 7, "seven");
+legendrepath(fn, 8, "eight");
+legendrepath(fn, 9, "nine");
+legendrepath(fn, 10, "ten");
+
+legendreprodukt(fn, 4, 7, "ortho");
+legendreprodukt(fn, 4, 4, "vier");
+legendreprodukt(fn, 7, 7, "sieben");
+
+fclose(fn);
+
+
diff --git a/buch/chapters/060-integral/images/legendre.pdf b/buch/chapters/060-integral/images/legendre.pdf
new file mode 100644
index 0000000..554dc35
--- /dev/null
+++ b/buch/chapters/060-integral/images/legendre.pdf
Binary files differ
diff --git a/buch/chapters/060-integral/images/legendre.tex b/buch/chapters/060-integral/images/legendre.tex
new file mode 100644
index 0000000..8409da0
--- /dev/null
+++ b/buch/chapters/060-integral/images/legendre.tex
@@ -0,0 +1,99 @@
+%
+% legendre.tex -- plots of legendre polynomials
+%
+% (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
+%
+\documentclass[tikz]{standalone}
+\usepackage{amsmath}
+\usepackage{times}
+\usepackage{txfonts}
+\usepackage{pgfplots}
+\usepackage{csvsimple}
+\usetikzlibrary{arrows,intersections,math}
+\begin{document}
+\def\skala{6.5}
+\input{legendrepaths.tex}
+\begin{tikzpicture}[>=latex,thick,scale=\skala]
+
+\definecolor{fone}{rgb}{1,0,0}
+\definecolor{ftwo}{rgb}{1.0,0,0.8}
+\definecolor{fthree}{rgb}{0.8,0,1}
+\definecolor{ffour}{rgb}{0,0,1}
+\definecolor{ffive}{rgb}{0,0.8,1}
+\definecolor{fsix}{rgb}{0,1,1}
+\definecolor{fseven}{rgb}{0,0.6,0}
+\definecolor{feight}{rgb}{0.2,1,0.6}
+\definecolor{fnine}{rgb}{0.6,0.8,0.2}
+\definecolor{ften}{rgb}{1,0.4,0}
+
+\def\dx{1}
+\def\dy{0.25}
+
+\def\achsen{
+ \draw[->] ({-1-(0.1/\skala)},0) -- ({1+(0.3/\skala)},0)
+ coordinate[label={$x$}];
+ \draw[->] (0,{-(\dy)-(0.1/\skala)}) -- (0,{(\dy)+(0.3/\skala)})
+ coordinate[label={right:$y$}];
+ \foreach \x in {-1,-0.9,...,1.001}{
+ \draw ({\dx*\x},{-0.05/\skala}) -- ({\dx*\x},{0.05/\skala});
+ }
+ \foreach \x in {-1,-0.5,0.5,1}{
+ \draw ({-0.05/\skala},{\dy*\x}) -- ({0.05/\skala},{\dy*\x});
+ \node at ({\dx*\x},{-0.05/\skala}) [below] {$\mathstrut\x$};
+ \node at ({-0.05/\skala},{\dy*\x}) [left] {$\mathstrut\x$};
+ }
+}
+
+\begin{scope}[yshift=0cm]
+ \node[color=fone] at (-0.70,{-0.9*\dy}) [right] {$n=1\mathstrut$};
+ \node[color=ftwo] at (-0.90,{0.9*\dy}) [right] {$n=2\mathstrut$};
+ \draw[line width=1.4pt,color=fone] \legendreone;
+ \draw[line width=1.4pt,color=ftwo] \legendretwo;
+ \achsen
+\end{scope}
+
+\begin{scope}[yshift=-0.6cm]
+ \node[color=fthree] at (-0.96,{-0.9*\dy}) [right] {$n=3\mathstrut$};
+ \node[color=ffour] at (-0.96,{0.9*\dy}) [right] {$n=4\mathstrut$};
+ \draw[line width=1.4pt,color=fthree] \legendrethree;
+ \draw[line width=1.4pt,color=ffour] \legendrefour;
+ \achsen
+\end{scope}
+
+\begin{scope}[yshift=-1.2cm]
+ \node[color=ffive] at (-0.96,{-0.9*\dy}) [right] {$n=5\mathstrut$};
+ \node[color=fsix] at (-0.96,{0.9*\dy}) [right] {$n=6\mathstrut$};
+ \draw[line width=1.4pt,color=ffive] \legendrefive;
+ \draw[line width=1.4pt,color=fsix] \legendresix;
+ \achsen
+\end{scope}
+
+\begin{scope}[yshift=-1.8cm]
+ \node[color=fseven] at (-0.96,{-0.9*\dy}) [right] {$n=7\mathstrut$};
+ \node[color=feight] at (-0.96,{0.9*\dy}) [right] {$n=8\mathstrut$};
+ \draw[line width=1.4pt,color=fseven] \legendreseven;
+ \draw[line width=1.4pt,color=feight] \legendreeight;
+ \achsen
+\end{scope}
+
+\begin{scope}[yshift=-2.4cm]
+ \node[color=fnine] at (-0.96,{-0.9*\dy}) [right] {$n=9\mathstrut$};
+ \node[color=ften] at (-0.96,{0.9*\dy}) [right] {$n=10\mathstrut$};
+ \draw[line width=1.4pt,color=fnine] \legendrenine;
+ \draw[line width=1.4pt,color=ften] \legendreten;
+ \achsen
+\end{scope}
+
+%\draw[line width=1.4pt,color=ftwo] \legendretwo;
+%\draw[line width=1.4pt,color=fthree] \legendrethree;
+%\draw[line width=1.4pt,color=ffour] \legendrefour;
+%\draw[line width=1.4pt,color=ffive] \legendrefive;
+%\draw[line width=1.4pt,color=fsix] \legendresix;
+%\draw[line width=1.4pt,color=fseven] \legendreseven;
+%\draw[line width=1.4pt,color=feight] \legendreeight;
+%\draw[line width=1.4pt,color=fnine] \legendrenine;
+%\draw[line width=1.4pt,color=ften] \legendreten;
+
+\end{tikzpicture}
+\end{document}
+
diff --git a/buch/chapters/060-integral/images/orthogonal.pdf b/buch/chapters/060-integral/images/orthogonal.pdf
new file mode 100644
index 0000000..f7abb5e
--- /dev/null
+++ b/buch/chapters/060-integral/images/orthogonal.pdf
Binary files differ
diff --git a/buch/chapters/060-integral/images/orthogonal.tex b/buch/chapters/060-integral/images/orthogonal.tex
new file mode 100644
index 0000000..8600281
--- /dev/null
+++ b/buch/chapters/060-integral/images/orthogonal.tex
@@ -0,0 +1,79 @@
+%
+% orthogonal.tex -- plots of legendre polynomials
+%
+% (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
+%
+\documentclass[tikz]{standalone}
+\usepackage{amsmath}
+\usepackage{times}
+\usepackage{txfonts}
+\usepackage{pgfplots}
+\usepackage{csvsimple}
+\usetikzlibrary{arrows,intersections,math}
+\begin{document}
+\def\skala{6}
+\input{legendrepaths.tex}
+\begin{tikzpicture}[>=latex,thick,scale=\skala]
+
+\definecolor{fone}{rgb}{1,0,0}
+\definecolor{ftwo}{rgb}{1.0,0,0.8}
+\definecolor{fthree}{rgb}{0.8,0,1}
+\definecolor{ffour}{rgb}{0,0,1}
+\definecolor{ffive}{rgb}{0,0.8,1}
+\definecolor{fsix}{rgb}{0,1,1}
+\definecolor{fseven}{rgb}{0,0.6,0}
+\definecolor{feight}{rgb}{0.2,1,0.6}
+\definecolor{fnine}{rgb}{0.6,0.8,0.2}
+\definecolor{ften}{rgb}{1,0.4,0}
+
+\def\dx{1}
+\def\Dy{3}
+\def\dy{3}
+
+\begin{scope}
+\clip (-1,-0.6) rectangle (1,1);
+
+%\pgfmathparse{\Dy/(\normalizationfour*\normalizationfour)}
+%\xdef\dy{\pgfmathresult}
+\fill[color=ffour!70,opacity=0.5] (-1,0) -- \produktvier -- (1,0) -- cycle;
+
+%\pgfmathparse{\Dy/(\normalizationeight*\normalizationeight)}
+%\xdef\dy{\pgfmathresult}
+\fill[color=fseven!70,opacity=0.5] (-1,0) -- \produktsieben -- (1,0) -- cycle;
+
+%\pgfmathparse{\Dy/(\normalizationfour*\normalizationeight)}
+%\xdef\dy{\pgfmathresult}
+\fill[color=red!50,opacity=0.5] (-1,0) -- \produktortho -- (1,0) -- cycle;
+
+%\pgfmathparse{\Dy/\normalizationfour}
+%\xdef\dy{\pgfmathresult}
+%\draw[line width=1.4pt,color=ffour] \legendrefour;
+%
+%\pgfmathparse{\Dy/\normalizationeight}
+%\xdef\dy{\pgfmathresult}
+%\draw[line width=1.4pt,color=feight] \legendreeight;
+
+%\pgfmathparse{\Dy/(\normalizationfour*\normalizationeight)}
+%\xdef\dy{\pgfmathresult}
+\draw[line width=1.4pt,color=red] \produktortho;
+
+\end{scope}
+
+\draw[->] ({-1-(0.1/\skala)},0) -- ({1+(0.3/\skala)},0)
+ coordinate[label={$x$}];
+\draw[->] (0,{-{0.2*\Dy}-(0.1/\skala)}) -- (0,{1+(0.3/\skala)})
+ coordinate[label={right:$y$}];
+\foreach \x in {-1,-0.9,...,1.001}{
+ \draw ({\dx*\x},{-0.1/\skala}) -- ({\dx*\x},{0.1/\skala});
+}
+\foreach \y in {-0.2,-0.1,0.1,0.2,0.3}{
+ \draw ({-0.1/\skala},{\Dy*\y}) -- ({0.1/\skala},{\Dy*\y});
+ \node at ({-0.1/\skala},{\Dy*\y}) [left] {$\mathstrut\y$};
+}
+\foreach \x in {-1,-0.5,0.5,1}{
+ \node at ({\dx*\x},{-0.1/\skala}) [below] {$\mathstrut\x$};
+}
+
+\end{tikzpicture}
+\end{document}
+