Lösungen

A.Zusammengesetzte Funktionen
B.Anwendung von eingebauten Funktionen
C.Konstruktion eines Moduls
D.Lösungen

A. Zusammengesetzte Funktionen

Remove["Global`*"]

f[t_] := 
        t  /; (-Pi/2  ≤   t  &&  
              t  ≤  Pi/2);

    f[1]

f[t_] := 
        Pi - t  /; (Pi/2  <   t  &&  
              t  ≤  3 Pi/2);

Plot[f[t], {t, -Pi/2, 3  Pi/2}];

B. Anwendung von eingebauten Funktionen

Remove["Global`*"]

?*Four*

<< Calculus`FourierTransform`;

?*Four*

Beispiel 1

f[t_] := t;

FourierTrigSeries[f[t], t, 10]

FourierSinCoefficient[f[t], t, 10]

FourierCosCoefficient[f[t], t, 10]

FourierSeries[f[t], t, 10]

Plot[
        Evaluate[FourierTrigSeries[f[t], t, 10]], {t, -1, 
          3}];

Beispiel 2

Remove["Global`*"]

<< Calculus`FourierTransform`;

f[t_] := t;

f1[u_] = 
        2  Pi FourierTrigSeries[f[t], t, 10] /. t -> u/(2  Pi) // 
          Expand;
Print[f1[u]];

f2[u_] = 
      2  Pi (FourierSeries[f[t], t, 10] /. t -> u/(2  Pi)) // 
        Expand

Plot[f1[u], {u, -0.3, 8}];

Plot[Evaluate[Re[f2[u]]], {u, -0.3, 8}];

C. Konstruktion eines Moduls

Remove["Global`*"];

Beispiel zur Handhabung einer wählbaren Funktion mit Variablen in einem Modul

ser1[f_, s_, ss_] := 
        Module[{}, 
Print[f]; 
Print[
            f /. t -> s]; 
Print[
            f /. x -> s]; 
Print[
            u[x]]; 
w[m_] := Function[f[#]][m];  
          Print["w = ",  
            w[ss]];
];
u[t_] := Sin[t];
u1[t_] := t^3; ser1[u1, j, k]

ser2[f_, s_] := 
        Module[{w, m}, 
w[m_] := Function[v[#]][m];  
          Print[w[s]];
];
v[t_] := Cos[t]; ser2[v[t], xX]

Modul (in Zusatzfenster betreiben!)

Remove["Global`*"];

\(\(four[fkt_, var_, perT_, start0Int_, n_, druck_] := 
        Module[{fktInt, tInt, nInt, znInt}, \ Print[" "]; \ 
          Print["Output:"]; \ 
          Print[" "]; 
Print["Ausgabe:  ω, fktInt[var], a[0], a[k], b[k], c[k], Fourierreihen ff[var,n], ff[var], ffExp[var], ffKomplexTrig[var,n], ffKomplexExp[var,n], ffKomplex[var], Plot"]; 
ω\  = \ 2\ Pi/perT; \ \ \ \ If[
            druck == 
              1, \ \ Print["ω = ", ω], " "]; 
fktInt[tInt_] := \(Function[fkt[#]]\)[tInt]; \ \ \ If[
            druck == 1, \ 
            Print["Funktion[", var, "]  = ", 
              fktInt[var]], " "]; 
a[0] = 
            2/T\ Integrate[
                fktInt[var], {var, start0Int, 
                  start0Int + perT}]; \ \ \ \ \ If[druck == 1, \ 
            Print["a[0] = ", a[0]], " "]; 
a[k_] := 
            2/T\ Integrate[
                Cos[k\ ω\ var]\ \ fktInt[var], {var, start0Int, 
                  start0Int + perT}]; \ \ \ \ \ If[druck == 1, \ 
            Print["a[k] = ", a[k]], " "]; 
b[k_] := 
            2/T\ Integrate[
                Sin[k\ ω\ var]\ \ fktInt[var], {var, start0Int, 
                  start0Int + perT}]; \ \ \ \ \ If[druck == 1, \ 
            Print["b[k] = ", b[k]], " "]; 
c[k_] := 
            1/T\ Integrate[
                fktInt[var]\ \ E^\((\(-I\)\ k\ ω\ var)\), {var, 
                  start0Int, start0Int + perT}]; \ \ If[druck == 1, \ 
            Print["c[k] = ", c[k]], " "]; 
ff[
              tInt_, znInt_] := 
            a[0]/2 + 
              Sum[a[nInt]\ Cos[nInt\ ω\ tInt] + 
                  b[nInt]\ Sin[nInt\ ω\ tInt], {nInt, 1, 
                  znInt}]; 
\ 
          If[druck == 1, \ 
            Print["Fourierreihe[", var, ", ", n, "]  = ", 
              ff[var, n]], " "]; 
ff[tInt_] := 
            a[0]/2 + 
              Sum[a[nInt]\ Cos[nInt\ ω\ tInt] + 
                  b[nInt]\ Sin[nInt\ ω\ tInt], {nInt, 1, 
                  Infinity}]; 
\ 
          If[druck == 1, \ 
            Print["Unendliche Fourierreihe[", var, "]  = ", 
              ff[var]], " "]; 
ffExp[tInt_] := 
            ExpToTrig[
              a[0]/2 + 
                Sum[a[nInt]\ Cos[nInt\ ω\ tInt] + 
                    b[nInt]\ Sin[nInt\ ω\ tInt], {nInt, 1, 
                    Infinity}]]; 
\ 
          If[druck == 1, \ 
            Print["Unendliche Fourierreihe komplex[", var, "]  = ", 
              ffExp[var]], " "]; 
ffKomplexTrig[tInt_, 
              znInt_] := 
            ExpToTrig[
              Sum[c[nInt]\ E^\((I\ nInt\ ω\ \ tInt)\), {nInt, \(-znInt\), znInt}]]; 
\ 
          If[druck == 1, \ 
            Print["Komplexe Fourierreihe wieder trigonometrisch[", 
              var, ", ", n, "]  = ", 
              ffKomplexTrig[var, 
                n]], " "]; 
ffKomplexExp[tInt_, 
              znInt_] := 
            TrigToExp[
              Sum[c[nInt]\ E^\((I\ nInt\ ω\ \ tInt)\), {nInt, \(-znInt\), znInt}]]; 
\ 
          If[druck == 1, \ 
            Print["Komplexe Fourierreihe[", var, ", ", 
              n, "]  = ", 
              ffKomplexExp[var, n]], " "]; 
ffKomplex[
              tInt_] := Sum[
              c[nInt]\ E^\((I\ nInt\ ω\ \ tInt)\), {nInt, \(-Infinity\), Infinity}]; 
\ 
          If[druck == 1, \ 
            Print["Komplexe Fourierreihe[", var, "]  = ", 
              ffKomplex[var]], " "]; 
If[druck == 1, \ 
            Print["Plot"]; 
Plot[
              Evaluate[{fktInt[var], ff[var, n]}], {var, start0Int, 
                start0Int + 
                  perT}];, " "]
];\)\)

f[t_] := 
        t;

    T = 2 Pi;

    t0 = -Pi;

    four[f, t, T, t0, 6, 1]

D. Lösungen

Aufgaben unter dem folgenden URL:     http://rowicus.ch/Wir/ProblemsSolutBachelor/TM2Ana_10_FS_01.pdf

1

Modul aktivieren

Remove["Global`*"];

\(\(four[fkt_, var_, perT_, start0Int_, n_, druck_] := 
        Module[{fktInt, tInt, nInt, znInt}, \ Print[" "]; \ 
          Print["Output:"]; \ 
          Print[" "]; 
Print["Ausgabe:  ω, fktInt[var], a[0], a[k], b[k], c[k], Fourierreihen ff[var,n], ff[var], ffExp[var], ffKomplexTrig[var,n], ffKomplexExp[var,n], ffKomplex[var], Plot: z.B. Plot[Evaluate[ff[t,n]],{t,perT,perT+start0Int},PlotPoints->50]"]; 
ω\  = \ 2\ Pi/perT; \ \ \ \ If[
            druck == 
              1, \ \ Print["ω = ", ω], " "]; 
fktInt[tInt_] := \(Function[fkt[#]]\)[tInt]; \ \ \ If[
            druck == 1, \ 
            Print["Funktion[", var, "]  = ", 
              fktInt[var]], " "]; 
a[0] = 
            2/T\ Integrate[
                fktInt[var], {var, start0Int, 
                  start0Int + perT}]; \ \ \ \ \ If[druck == 1, \ 
            Print["a[0] = ", a[0]], " "]; 
a[k_] := 
            2/T\ Integrate[
                Cos[k\ ω\ var]\ \ fktInt[var], {var, start0Int, 
                  start0Int + perT}]; \ \ \ \ \ If[druck == 1, \ 
            Print["a[k] = ", a[k]], " "]; 
b[k_] := 
            2/T\ Integrate[
                Sin[k\ ω\ var]\ \ fktInt[var], {var, start0Int, 
                  start0Int + perT}]; \ \ \ \ \ If[druck == 1, \ 
            Print["b[k] = ", b[k]], " "]; 
c[k_] := 
            1/T\ Integrate[
                fktInt[var]\ \ E^\((\(-I\)\ k\ ω\ var)\), {var, 
                  start0Int, start0Int + perT}]; \ \ If[druck == 1, \ 
            Print["c[k] = ", c[k]], " "]; 
ff[
              tInt_, znInt_] := 
            a[0]/2 + 
              Sum[a[nInt]\ Cos[nInt\ ω\ tInt] + 
                  b[nInt]\ Sin[nInt\ ω\ tInt], {nInt, 1, 
                  znInt}]; 
\ 
          If[druck == 1, \ 
            Print["Fourierreihe[", var, ", ", n, "]  = ", 
              ff[var, n]], " "]; 
ff[tInt_] := 
            a[0]/2 + 
              Sum[a[nInt]\ Cos[nInt\ ω\ tInt] + 
                  b[nInt]\ Sin[nInt\ ω\ tInt], {nInt, 1, 
                  Infinity}]; 
\ 
          If[druck == 1, \ 
            Print["Unendliche Fourierreihe[", var, "]  = ", 
              ff[var]], " "]; 
ffExp[tInt_] := 
            ExpToTrig[
              a[0]/2 + 
                Sum[a[nInt]\ Cos[nInt\ ω\ tInt] + 
                    b[nInt]\ Sin[nInt\ ω\ tInt], {nInt, 1, 
                    Infinity}]]; 
\ 
          If[druck == 1, \ 
            Print["Unendliche Fourierreihe komplex[", var, "]  = ", 
              ffExp[var]], " "]; 
ffKomplexTrig[tInt_, 
              znInt_] := 
            ExpToTrig[
              Sum[c[nInt]\ E^\((I\ nInt\ ω\ \ tInt)\), {nInt, \(-znInt\), znInt}]]; 
\ 
          If[druck == 1, \ 
            Print["Komplexe Fourierreihe wieder trigonometrisch[", 
              var, ", ", n, "]  = ", 
              ffKomplexTrig[var, 
                n]], " "]; 
ffKomplexExp[tInt_, 
              znInt_] := 
            TrigToExp[
              Sum[c[nInt]\ E^\((I\ nInt\ ω\ \ tInt)\), {nInt, \(-znInt\), znInt}]]; 
\ 
          If[druck == 1, \ 
            Print["Komplexe Fourierreihe[", var, ", ", 
              n, "]  = ", 
              ffKomplexExp[var, n]], " "]; 
ffKomplex[
              tInt_] := Sum[
              c[nInt]\ E^\((I\ nInt\ ω\ \ tInt)\), {nInt, \(-Infinity\), Infinity}]; 
\ 
          If[druck == 1, \ 
            Print["Komplexe Fourierreihe[", var, "]  = ", 
              ffKomplex[var]], " "]; 
If[druck == 1, \ 
            Print["Plot"]; 
Plot[
              Evaluate[{fktInt[var], ff[var, n]}], {var, start0Int, 
                start0Int + 
                  perT}];, " "]
];\)\)
four[f, t, T, t0, 6, 0]

f[t_] := -t;
T = 2 Pi;
t0 = -Pi;

      
four[f, t, T, t0, 6, 0]

a

ff[t, 6]

b

res1 = Integrate[f[t]^2, {t, t0, t0 + T}]

res1 // N

res2 = Integrate[ff[t, 6]^2, {t, t0, t0 + T}]

res2 // N

res1 - res2 // N

c

Sinusreihe

d

2 (∑_(k = 1)^∞)((((-1))^k)/k) Sin[
            k t]

e

Pi

\(f[π\/2] == \(-\(π\/2\)\)\  == \ \(-2\)\ \(∑\+\(k = 1\)\%∞ 1\/k\ Sin[
              k\ π\/2]\)\  == \ \(-2\)\ \((\(1\/1 - 1\/3 + 1\/5 - 
                1\/7 +  ... \)\(.\))\)\)
\(\(\(===\)\(\(>>\)\(\ \ \ \ \ \ \ \ \)\(-2\ \(∑\+\(k = 1\)\%∞ 1\/k\ Sin[k\ Pi/2]\) = \ π\/2\)\)\)\)

-Pi/
        2  ==  -2 (∑_(k = 1)^∞) (1/k) Sin[
              k Pi/2]

-2 (∑_(k = 1)^∞) (1/k) Sin[
            k  (π/2)]

f

Table[ff[Pi/2, n], {n, 1, 10}]

ta1 = Table[ff[Pi/2, n], {n, 1, 10}] // N

ta2 = 
        Table[{k, ta1[[k]]}, {k, 1, 
            Length[ta1]}];
ListPlot[ta2, PlotStyle -> PointSize[0.02]];

Das oszilliert!

g

Plot[Evaluate[ff[t, 6]], {t, -Pi, Pi}, 
        PlotPoints -> 50];

h

D[Evaluate[ff[t, 6]], t]

solv = Solve[D[Evaluate[ff[t, 6]], t] == 0, {t}] // N // 
        Chop

xKoord = Table[t /. solv[[k]], {k, 1, Length[solv]}]

pkt = 
      Union[Table[{xKoord[[k]], ff[xKoord[[k]], 6]}, {k, 1, 
            Length[xKoord]}]]

Plot[Evaluate[ff[t, 6]], {t, -Pi, Pi}, PlotPoints -> 50, 
        Epilog -> {PointSize[0.02], Map[Point, pkt]}];

11 Stellen mit horizontaler Tangente

i

ffKomplexExp[t, 6]

2

Remove["Global`*"];

\(\(four[fkt_, var_, perT_, start0Int_, n_, druck_] := 
        Module[{fktInt, tInt, nInt, znInt}, \ Print[" "]; \ 
          Print["Output:"]; \ 
          Print[" "]; 
Print["Ausgabe:  ω, fktInt[var], a[0], a[k], b[k], c[k], Fourierreihen ff[var,n], ff[var], ffExp[var], ffKomplexTrig[var,n], ffKomplexExp[var,n], ffKomplex[var], Plot: z.B. Plot[Evaluate[ff[t,n]],{t,perT,perT+start0Int},PlotPoints->50]"]; 
ω\  = \ 2\ Pi/perT; \ \ \ \ If[
            druck == 
              1, \ \ Print["ω = ", ω], " "]; 
fktInt[tInt_] := \(Function[fkt[#]]\)[tInt]; \ \ \ If[
            druck == 1, \ 
            Print["Funktion[", var, "]  = ", 
              fktInt[var]], " "]; 
a[0] = 
            2/T\ Integrate[
                fktInt[var], {var, start0Int, 
                  start0Int + perT}]; \ \ \ \ \ If[druck == 1, \ 
            Print["a[0] = ", a[0]], " "]; 
a[k_] := 
            2/T\ Integrate[
                Cos[k\ ω\ var]\ \ fktInt[var], {var, start0Int, 
                  start0Int + perT}]; \ \ \ \ \ If[druck == 1, \ 
            Print["a[k] = ", a[k]], " "]; 
b[k_] := 
            2/T\ Integrate[
                Sin[k\ ω\ var]\ \ fktInt[var], {var, start0Int, 
                  start0Int + perT}]; \ \ \ \ \ If[druck == 1, \ 
            Print["b[k] = ", b[k]], " "]; 
c[k_] := 
            1/T\ Integrate[
                fktInt[var]\ \ E^\((\(-I\)\ k\ ω\ var)\), {var, 
                  start0Int, start0Int + perT}]; \ \ If[druck == 1, \ 
            Print["c[k] = ", c[k]], " "]; 
ff[
              tInt_, znInt_] := 
            a[0]/2 + 
              Sum[a[nInt]\ Cos[nInt\ ω\ tInt] + 
                  b[nInt]\ Sin[nInt\ ω\ tInt], {nInt, 1, 
                  znInt}]; 
\ 
          If[druck == 1, \ 
            Print["Fourierreihe[", var, ", ", n, "]  = ", 
              ff[var, n]], " "]; 
ff[tInt_] := 
            a[0]/2 + 
              Sum[a[nInt]\ Cos[nInt\ ω\ tInt] + 
                  b[nInt]\ Sin[nInt\ ω\ tInt], {nInt, 1, 
                  Infinity}]; 
\ 
          If[druck == 1, \ 
            Print["Unendliche Fourierreihe[", var, "]  = ", 
              ff[var]], " "]; 
ffExp[tInt_] := 
            ExpToTrig[
              a[0]/2 + 
                Sum[a[nInt]\ Cos[nInt\ ω\ tInt] + 
                    b[nInt]\ Sin[nInt\ ω\ tInt], {nInt, 1, 
                    Infinity}]]; 
\ 
          If[druck == 1, \ 
            Print["Unendliche Fourierreihe komplex[", var, "]  = ", 
              ffExp[var]], " "]; 
ffKomplexTrig[tInt_, 
              znInt_] := 
            ExpToTrig[
              Sum[c[nInt]\ E^\((I\ nInt\ ω\ \ tInt)\), {nInt, \(-znInt\), znInt}]]; 
\ 
          If[druck == 1, \ 
            Print["Komplexe Fourierreihe wieder trigonometrisch[", 
              var, ", ", n, "]  = ", 
              ffKomplexTrig[var, 
                n]], " "]; 
ffKomplexExp[tInt_, 
              znInt_] := 
            TrigToExp[
              Sum[c[nInt]\ E^\((I\ nInt\ ω\ \ tInt)\), {nInt, \(-znInt\), znInt}]]; 
\ 
          If[druck == 1, \ 
            Print["Komplexe Fourierreihe[", var, ", ", 
              n, "]  = ", 
              ffKomplexExp[var, n]], " "]; 
ffKomplex[
              tInt_] := Sum[
              c[nInt]\ E^\((I\ nInt\ ω\ \ tInt)\), {nInt, \(-Infinity\), Infinity}]; 
\ 
          If[druck == 1, \ 
            Print["Komplexe Fourierreihe[", var, "]  = ", 
              ffKomplex[var]], " "]; 
If[druck == 1, \ 
            Print["Plot"]; 
Plot[
              Evaluate[{fktInt[var], ff[var, n]}], {var, start0Int, 
                start0Int + 
                  perT}];, " "]
];\)\)
four[f, t, T, t0, 6, 0]

f[t_] := -t;
T = 1;
t0 = -1/2;
  
four[f, t, T, t0, 6, 0]

a

ff[t, 6]

b

2 (∑_(k = 1)^∞)((((-1))^k)/(k π)) Sin[
            k π t]

c

f[1/4]

ff[1/4, 6]

% // N

f[1/4] - ff[1/4, 6]

% // Together

% // N

d

Plot[Evaluate[ff[t, 6]], {t, -1/2, 1/2}, 
        PlotPoints -> 50];

e

ffKomplexExp[t, 6]

3

Remove["Global`*"];

\(\(four[fkt_, var_, perT_, start0Int_, n_, druck_] := 
        Module[{fktInt, tInt, nInt, znInt}, \ Print[" "]; \ 
          Print["Output:"]; \ 
          Print[" "]; 
Print["Ausgabe:  ω, fktInt[var], a[0], a[k], b[k], c[k], Fourierreihen ff[var,n], ff[var], ffExp[var], ffKomplexTrig[var,n], ffKomplexExp[var,n], ffKomplex[var], Plot: z.B. Plot[Evaluate[ff[t,n]],{t,perT,perT+start0Int},PlotPoints->50]"]; 
ω\  = \ 2\ Pi/perT; \ \ \ \ If[
            druck == 
              1, \ \ Print["ω = ", ω], " "]; 
fktInt[tInt_] := \(Function[fkt[#]]\)[tInt]; \ \ \ If[
            druck == 1, \ 
            Print["Funktion[", var, "]  = ", 
              fktInt[var]], " "]; 
a[0] = 
            2/T\ Integrate[
                fktInt[var], {var, start0Int, 
                  start0Int + perT}]; \ \ \ \ \ If[druck == 1, \ 
            Print["a[0] = ", a[0]], " "]; 
a[k_] := 
            2/T\ Integrate[
                Cos[k\ ω\ var]\ \ fktInt[var], {var, start0Int, 
                  start0Int + perT}]; \ \ \ \ \ If[druck == 1, \ 
            Print["a[k] = ", a[k]], " "]; 
b[k_] := 
            2/T\ Integrate[
                Sin[k\ ω\ var]\ \ fktInt[var], {var, start0Int, 
                  start0Int + perT}]; \ \ \ \ \ If[druck == 1, \ 
            Print["b[k] = ", b[k]], " "]; 
c[k_] := 
            1/T\ Integrate[
                fktInt[var]\ \ E^\((\(-I\)\ k\ ω\ var)\), {var, 
                  start0Int, start0Int + perT}]; \ \ If[druck == 1, \ 
            Print["c[k] = ", c[k]], " "]; 
ff[
              tInt_, znInt_] := 
            a[0]/2 + 
              Sum[a[nInt]\ Cos[nInt\ ω\ tInt] + 
                  b[nInt]\ Sin[nInt\ ω\ tInt], {nInt, 1, 
                  znInt}]; 
\ 
          If[druck == 1, \ 
            Print["Fourierreihe[", var, ", ", n, "]  = ", 
              ff[var, n]], " "]; 
ff[tInt_] := 
            a[0]/2 + 
              Sum[a[nInt]\ Cos[nInt\ ω\ tInt] + 
                  b[nInt]\ Sin[nInt\ ω\ tInt], {nInt, 1, 
                  Infinity}]; 
\ 
          If[druck == 1, \ 
            Print["Unendliche Fourierreihe[", var, "]  = ", 
              ff[var]], " "]; 
ffExp[tInt_] := 
            ExpToTrig[
              a[0]/2 + 
                Sum[a[nInt]\ Cos[nInt\ ω\ tInt] + 
                    b[nInt]\ Sin[nInt\ ω\ tInt], {nInt, 1, 
                    Infinity}]]; 
\ 
          If[druck == 1, \ 
            Print["Unendliche Fourierreihe komplex[", var, "]  = ", 
              ffExp[var]], " "]; 
ffKomplexTrig[tInt_, 
              znInt_] := 
            ExpToTrig[
              Sum[c[nInt]\ E^\((I\ nInt\ ω\ \ tInt)\), {nInt, \(-znInt\), znInt}]]; 
\ 
          If[druck == 1, \ 
            Print["Komplexe Fourierreihe wieder trigonometrisch[", 
              var, ", ", n, "]  = ", 
              ffKomplexTrig[var, 
                n]], " "]; 
ffKomplexExp[tInt_, 
              znInt_] := 
            TrigToExp[
              Sum[c[nInt]\ E^\((I\ nInt\ ω\ \ tInt)\), {nInt, \(-znInt\), znInt}]]; 
\ 
          If[druck == 1, \ 
            Print["Komplexe Fourierreihe[", var, ", ", 
              n, "]  = ", 
              ffKomplexExp[var, n]], " "]; 
ffKomplex[
              tInt_] := Sum[
              c[nInt]\ E^\((I\ nInt\ ω\ \ tInt)\), {nInt, \(-Infinity\), Infinity}]; 
\ 
          If[druck == 1, \ 
            Print["Komplexe Fourierreihe[", var, "]  = ", 
              ffKomplex[var]], " "]; 
If[druck == 1, \ 
            Print["Plot"]; 
Plot[
              Evaluate[{fktInt[var], ff[var, n]}], {var, start0Int, 
                start0Int + 
                  perT}];, " "]
];\)\)
four[f, t, T, t0, 6, 0]

f[t_] := Abs[-t + Pi] + Cos[t/2];
T = 2  Pi;
t0 = -Pi;
  
four[f, t, T, t0, 6, 0]

Plot[f[t], {t, -Pi, Pi}];

a

ff[t, 4]

N[%]

b

Plot[Evaluate[ff[t, 4]], {t, -Pi, Pi}, 
        PlotPoints -> 50];

4

Remove["Global`*"];

\(\(four[fkt_, var_, perT_, start0Int_, n_, druck_] := 
        Module[{fktInt, tInt, nInt, znInt}, \ Print[" "]; \ 
          Print["Output:"]; \ 
          Print[" "]; 
Print["Ausgabe:  ω, fktInt[var], a[0], a[k], b[k], c[k], Fourierreihen ff[var,n], ff[var], ffExp[var], ffKomplexTrig[var,n], ffKomplexExp[var,n], ffKomplex[var], Plot: z.B. Plot[Evaluate[ff[t,n]],{t,perT,perT+start0Int},PlotPoints->50]"]; 
ω\  = \ 2\ Pi/perT; \ \ \ \ If[
            druck == 
              1, \ \ Print["ω = ", ω], " "]; 
fktInt[tInt_] := \(Function[fkt[#]]\)[tInt]; \ \ \ If[
            druck == 1, \ 
            Print["Funktion[", var, "]  = ", 
              fktInt[var]], " "]; 
a[0] = 
            2/T\ Integrate[
                fktInt[var], {var, start0Int, 
                  start0Int + perT}]; \ \ \ \ \ If[druck == 1, \ 
            Print["a[0] = ", a[0]], " "]; 
a[k_] := 
            2/T\ Integrate[
                Cos[k\ ω\ var]\ \ fktInt[var], {var, start0Int, 
                  start0Int + perT}]; \ \ \ \ \ If[druck == 1, \ 
            Print["a[k] = ", a[k]], " "]; 
b[k_] := 
            2/T\ Integrate[
                Sin[k\ ω\ var]\ \ fktInt[var], {var, start0Int, 
                  start0Int + perT}]; \ \ \ \ \ If[druck == 1, \ 
            Print["b[k] = ", b[k]], " "]; 
c[k_] := 
            1/T\ Integrate[
                fktInt[var]\ \ E^\((\(-I\)\ k\ ω\ var)\), {var, 
                  start0Int, start0Int + perT}]; \ \ If[druck == 1, \ 
            Print["c[k] = ", c[k]], " "]; 
ff[
              tInt_, znInt_] := 
            a[0]/2 + 
              Sum[a[nInt]\ Cos[nInt\ ω\ tInt] + 
                  b[nInt]\ Sin[nInt\ ω\ tInt], {nInt, 1, 
                  znInt}]; 
\ 
          If[druck == 1, \ 
            Print["Fourierreihe[", var, ", ", n, "]  = ", 
              ff[var, n]], " "]; 
ff[tInt_] := 
            a[0]/2 + 
              Sum[a[nInt]\ Cos[nInt\ ω\ tInt] + 
                  b[nInt]\ Sin[nInt\ ω\ tInt], {nInt, 1, 
                  Infinity}]; 
\ 
          If[druck == 1, \ 
            Print["Unendliche Fourierreihe[", var, "]  = ", 
              ff[var]], " "]; 
ffExp[tInt_] := 
            ExpToTrig[
              a[0]/2 + 
                Sum[a[nInt]\ Cos[nInt\ ω\ tInt] + 
                    b[nInt]\ Sin[nInt\ ω\ tInt], {nInt, 1, 
                    Infinity}]]; 
\ 
          If[druck == 1, \ 
            Print["Unendliche Fourierreihe komplex[", var, "]  = ", 
              ffExp[var]], " "]; 
ffKomplexTrig[tInt_, 
              znInt_] := 
            ExpToTrig[
              Sum[c[nInt]\ E^\((I\ nInt\ ω\ \ tInt)\), {nInt, \(-znInt\), znInt}]]; 
\ 
          If[druck == 1, \ 
            Print["Komplexe Fourierreihe wieder trigonometrisch[", 
              var, ", ", n, "]  = ", 
              ffKomplexTrig[var, 
                n]], " "]; 
ffKomplexExp[tInt_, 
              znInt_] := 
            TrigToExp[
              Sum[c[nInt]\ E^\((I\ nInt\ ω\ \ tInt)\), {nInt, \(-znInt\), znInt}]]; 
\ 
          If[druck == 1, \ 
            Print["Komplexe Fourierreihe[", var, ", ", 
              n, "]  = ", 
              ffKomplexExp[var, n]], " "]; 
ffKomplex[
              tInt_] := Sum[
              c[nInt]\ E^\((I\ nInt\ ω\ \ tInt)\), {nInt, \(-Infinity\), Infinity}]; 
\ 
          If[druck == 1, \ 
            Print["Komplexe Fourierreihe[", var, "]  = ", 
              ffKomplex[var]], " "]; 
If[druck == 1, \ 
            Print["Plot"]; 
Plot[
              Evaluate[{fktInt[var], ff[var, n]}], {var, start0Int, 
                start0Int + 
                  perT}];, " "]
];\)\)
four[f, t, T, t0, 6, 0]

Funktion

f[t_] := 
        1  /; (0  ≤   t  &&  
              t  ≤  Pi);
f[t_] := 
        0  /; (Pi  <   t  &&  
              t  ≤  2 Pi);
Plot[f[t], {t, 0, 2  Pi}];

Remove[f];
f[t_] := 
        1/2 ((-1)^Floor[t/(Pi)] + 
              1);
Plot[f[t], {t, 0, 8  Pi}];

T = 2  Pi;
t0 = 0;
  
four[f, t, T, t0, 6, 0]

a

ff[t, 6]

ff[t, 10]

\(1\/2 + \ 
      2\ \(∑\+\(k = 1\)\%∞\ \(\(\ \)\(Sin[\((2  k - 1)\)\ t]\)\)\/\(\((2  k - 1)\)\ π\)\)\)

b

Die Spannung ist eine unendliche Ueberlagerung (Superposition) von harmonischen Schwingungen

c

Plot[Evaluate[ff[t, 4]], {t, 0, 2  Pi}, 
        PlotPoints -> 50];

Plot[Evaluate[ff[t, 60]], {t, 0, 2  Pi}, 
        PlotPoints -> 50];

Gibbs kommt zur Wirkung.

d

g[t_, n_] := 
      (1/2) +  2 (∑_(k = 1)^n) (( Sin[(2  k - 1) t])/((2  k - 1) π))

Plot[Evaluate[{ff[t, 4], g[t, 2]}], {t, 0, 2  Pi}, 
        PlotPoints -> 50];

Plot[Evaluate[D[g[t, 10], t]], {t, 0, 2  Pi}];

Plot[Evaluate[D[g[t, 40], t]], {t, 0, 2  Pi}];

Ausser an den Sprungstellen sollte das Resultat der Ableitung 0 sein. Das ist keineswegs der Fall.

e

Remove[g];
Solve[(c x  ==  t /. {t -> 2 Pi,  
            x -> 2}), {c}]

g[x_] := f[Pi x];
Plot[g[x], {x, 0, 6}];

f

Remove["Global`*"];

\(\(four[fkt_, var_, perT_, start0Int_, n_, druck_] := 
        Module[{fktInt, tInt, nInt, znInt}, \ Print[" "]; \ 
          Print["Output:"]; \ 
          Print[" "]; 
Print["Ausgabe:  ω, fktInt[var], a[0], a[k], b[k], c[k], Fourierreihen ff[var,n], ff[var], ffExp[var], ffKomplexTrig[var,n], ffKomplexExp[var,n], ffKomplex[var], Plot: z.B. Plot[Evaluate[ff[t,n]],{t,perT,perT+start0Int},PlotPoints->50]"]; 
ω\  = \ 2\ Pi/perT; \ \ \ \ If[
            druck == 
              1, \ \ Print["ω = ", ω], " "]; 
fktInt[tInt_] := \(Function[fkt[#]]\)[tInt]; \ \ \ If[
            druck == 1, \ 
            Print["Funktion[", var, "]  = ", 
              fktInt[var]], " "]; 
a[0] = 
            2/T\ Integrate[
                fktInt[var], {var, start0Int, 
                  start0Int + perT}]; \ \ \ \ \ If[druck == 1, \ 
            Print["a[0] = ", a[0]], " "]; 
a[k_] := 
            2/T\ Integrate[
                Cos[k\ ω\ var]\ \ fktInt[var], {var, start0Int, 
                  start0Int + perT}]; \ \ \ \ \ If[druck == 1, \ 
            Print["a[k] = ", a[k]], " "]; 
b[k_] := 
            2/T\ Integrate[
                Sin[k\ ω\ var]\ \ fktInt[var], {var, start0Int, 
                  start0Int + perT}]; \ \ \ \ \ If[druck == 1, \ 
            Print["b[k] = ", b[k]], " "]; 
c[k_] := 
            1/T\ Integrate[
                fktInt[var]\ \ E^\((\(-I\)\ k\ ω\ var)\), {var, 
                  start0Int, start0Int + perT}]; \ \ If[druck == 1, \ 
            Print["c[k] = ", c[k]], " "]; 
ff[
              tInt_, znInt_] := 
            a[0]/2 + 
              Sum[a[nInt]\ Cos[nInt\ ω\ tInt] + 
                  b[nInt]\ Sin[nInt\ ω\ tInt], {nInt, 1, 
                  znInt}]; 
\ 
          If[druck == 1, \ 
            Print["Fourierreihe[", var, ", ", n, "]  = ", 
              ff[var, n]], " "]; 
ff[tInt_] := 
            a[0]/2 + 
              Sum[a[nInt]\ Cos[nInt\ ω\ tInt] + 
                  b[nInt]\ Sin[nInt\ ω\ tInt], {nInt, 1, 
                  Infinity}]; 
\ 
          If[druck == 1, \ 
            Print["Unendliche Fourierreihe[", var, "]  = ", 
              ff[var]], " "]; 
ffExp[tInt_] := 
            ExpToTrig[
              a[0]/2 + 
                Sum[a[nInt]\ Cos[nInt\ ω\ tInt] + 
                    b[nInt]\ Sin[nInt\ ω\ tInt], {nInt, 1, 
                    Infinity}]]; 
\ 
          If[druck == 1, \ 
            Print["Unendliche Fourierreihe komplex[", var, "]  = ", 
              ffExp[var]], " "]; 
ffKomplexTrig[tInt_, 
              znInt_] := 
            ExpToTrig[
              Sum[c[nInt]\ E^\((I\ nInt\ ω\ \ tInt)\), {nInt, \(-znInt\), znInt}]]; 
\ 
          If[druck == 1, \ 
            Print["Komplexe Fourierreihe wieder trigonometrisch[", 
              var, ", ", n, "]  = ", 
              ffKomplexTrig[var, 
                n]], " "]; 
ffKomplexExp[tInt_, 
              znInt_] := 
            TrigToExp[
              Sum[c[nInt]\ E^\((I\ nInt\ ω\ \ tInt)\), {nInt, \(-znInt\), znInt}]]; 
\ 
          If[druck == 1, \ 
            Print["Komplexe Fourierreihe[", var, ", ", 
              n, "]  = ", 
              ffKomplexExp[var, n]], " "]; 
ffKomplex[
              tInt_] := Sum[
              c[nInt]\ E^\((I\ nInt\ ω\ \ tInt)\), {nInt, \(-Infinity\), Infinity}]; 
\ 
          If[druck == 1, \ 
            Print["Komplexe Fourierreihe[", var, "]  = ", 
              ffKomplex[var]], " "]; 
If[druck == 1, \ 
            Print["Plot"]; 
Plot[
              Evaluate[{fktInt[var], ff[var, n]}], {var, start0Int, 
                start0Int + 
                  perT}];, " "]
];\)\)
four[h, t, T, t0, 6, 0]

f[t_] := 1/2 ((-1)^Floor[t/(Pi)] + 1);
h[t_] := f[t] Sin[t];
Plot[h[t], {t, 0, 8  Pi}];
T = 2  Pi;
t0 = 0;
  
four[h, t, T, t0, 6, 0]

ff[t, 16]

N[%]

\(1\/π + \ 
      Sin[t]\/2\  - \ \ 2\ \(∑\+\(k = 1\)\%∞\ \(\(\ \)\(Cos[2\ k\ t]\)\)\/\(\((2  k - 1)\) \((2  k + 1)\)\ π\)\)\)

Plot[Evaluate[{ff[t, 10]}], {t, 0, 2  Pi}, 
        PlotRange -> {-0.1, 1.1}];

Plot[Evaluate[{ff[t, 10], h[t]}], {t, 0, 2  Pi}];

5

Uebliche Normierung

yVec = {0, 1, 3};
r = E^(-I 2 Pi/3);
W = {{r^0, r^0, r^0}, {r^0, r^1, r^2}, {r^0, r^2, r^4}};  
    W // MatrixForm

Inverse[W] // Simplify

% // N // MatrixForm

1/3  Conjugate[W]

% // N // MatrixForm

cVec = Inverse[W] . yVec // Simplify

% // N

cVec = 1/3  Conjugate[W] . yVec // Simplify

% // N

Andere Normierung

cVec = Sqrt[3] Inverse[W] . yVec // Simplify

% // N

cVec = 1/Sqrt[3] Conjugate[W] . yVec // Simplify

% // N

6

Remove["Global`*"];

a

f1[x_] := E^(-x^2);
fTransf1[Ω_] := 
        1/(2 Pi) Integrate[
            f1[λ] E^(-I λ Ω), {λ, -Infinity, Infinity}];
fTransf1[Ω]

f2[x_] := f1[x]/Sqrt[2  Pi];
fTransf2[Ω_] := 
        1/Sqrt[2 Pi] Integrate[
            f2[λ] E^(-I λ Ω), {λ, -Infinity, Infinity}];
fTransf2[Ω]

1/Sqrt[2 Pi] Integrate[
        Evaluate[
          fTransf2[Ω] E^(I Ω x)], {Ω, -Infinity, Infinity}]

1/Sqrt[2 Pi] Integrate[
          Evaluate[
            fTransf2[Ω] E^(I Ω x)], {Ω, -Infinity, Infinity}] == f2[x]

?FourierTransform

FourierTransform[f1[t], t, Ω]

FourierTransform[f2[t], t, Ω]

b

Plot[
        Evaluate[fTransf1[Ω]], {Ω, -6, 
          6}];

Plot[
        Evaluate[fTransf2[Ω]], {Ω, -6, 
          6}];

c

Plot[Evaluate[{f1[x], fTransf1[x]}], {x, -6, 6}];

Plot[
        Evaluate[{f1[x], f2[x], fTransf1[x], fTransf2[x]}], {x, -6, 6}, 
        PlotRange -> {0, 1}];

{f1[x], f2[x], fTransf1[x] , fTransf2[x]}

fTransf1[x]  == fTransf2[x]

Bemerkenswert: Alles Gauss-Glocken

7

Eine brauchbare Funktion

?UnitStep

u[a_, b_, x_] = 
        b UnitStep[(x - a)];
Plot[u[1, 2, x], {x, -3, 6}, 
        PlotRange -> {0, 3}];

u[a_, b_, c_, x_] = 
        c UnitStep[-(x - a) (x - 
                  b)];
Plot[u[-1, 2, 2, x], {x, -3, 6}, 
        PlotRange -> {0, 3}];

u[a_, b_, c_, d_, x_] = 
        d UnitStep[(x - a) (x - b) (x - 
                  c)];
Plot[u[1, 2, 3, 2,  x], {x, -4, 6}, 
        PlotRange -> {0, 3}];

a

fTransf1[Ω_] := 
        1/(2 Pi) Integrate[
            u[1, 2, 3, λ] E^(-I λ Ω), {λ, -Infinity, 
              Infinity}];
fTransf1[Ω]

fTransf1[Ω] // Expand

fTransf2[Ω_] := 
        1/(2 Pi) Integrate[
            u[4, 5, 6, λ] E^(-I λ Ω), {λ, -Infinity, 
              Infinity}];
fTransf2[Ω]

fTransf2[Ω] // Expand

a1

FourierTransform[u[1, 2, 3, t], t, Ω]

b

fTransf3[Ω_] := 
        1/(2 Pi) Integrate[(u[1, 2, 3, λ] + 
                  u[4, 5, 
                    6, λ] ) E^(-I λ Ω), {λ, -Infinity, 
              Infinity}];
fTransf3[Ω]

fTransf1[Ω] + fTransf2[Ω] // 
      Simplify

Expand[fTransf3[Ω]]

Expand[fTransf3[Ω]] == 
      Expand[fTransf1[Ω] + 
          fTransf2[Ω]]

work

<< Calculus`FourierTransform`

f[t_] := -t

FourierTrigSeries[f[t], t, 10]

f1[u_] = 
        2  Pi FourierTrigSeries[f[t], t, 10] /. t -> u/(2  Pi) // 
          Expand;
Print[f1[u]];

Plot[
        Evaluate[FourierTrigSeries[f[t], t, 10]], {t, -1, 
          3}];

Plot[f1[u], {u, -0.3, 8}];

Plot[
        Evaluate[
          2  Pi FourierTrigSeries[f[t], t, 10] /. 
            t -> u/(2  Pi)], {u, 0, 8}];

FourierSinCoefficient[f[t], t, 10]

FourierSinCoefficient[f[t], t, 10] // TeXForm

FourierCosCoefficient[f[t], t, 10]

FourierSeries[f[t], t, 4]

FourierSeries[f[t], t, 10]

Plot[
        Evaluate[Re[FourierSeries[f[t], t, 10]] /. t -> u], {u, -0, 
          2}, PlotPoints -> 100];

FourierTrigSeries[f[t], t, 6]

(FourierTrigSeries[f[t], t, 6] /. t -> 1/4) - 1/4  // 
      N

Plot[
        Evaluate[FourierTrigSeries[f[t], t, 10] /. t -> u], {u, -0, 
          2}, PlotPoints -> 100];

2  Pi (FourierSeries[f[t], t, 10] /. t -> u/(2  Pi)) // 
      Expand

Re[FourierSeries[f[t], t, 10]]