(* Beispiel Script p.260 *)

lim=5;
cosReihe[x_]=Pi/4+Sum[-2/(k^2 Pi) Cos[k x],{k,1,lim,2}];
Plot[{cosReihe[x]},{x,-5Pi,3Pi},AspectRatio->Automatic];

sinReihe[x_]=Sum[-(-1)^k/k Sin[k x],{k,1,lim}];
Plot[{sinReihe[x]},{x,-5Pi,3Pi},AspectRatio->Automatic];

Plot[cosReihe[x]+sinReihe[x],{x,-5Pi,3Pi},AspectRatio->Automatic];

(* 2π-periodisches Bildchen mit 4 Funktionen *)

lim=3;m[x_]=-1+Sum[2/Pi NIntegrate[{-Sqrt[4-y^2] Cos[k y]},{y,0,2}] Cos[k x],{k,1,lim}];
Plot[{m[x]},{x,-5Pi,3Pi},AspectRatio->Automatic];

lim=3;
g3[x_]=.9+Sum[2/Pi (NIntegrate[{Sqrt[2-y^2] Cos[k y]},{y,0,1}]+
 NIntegrate[{y Cos[k y]},{y,1,2}])Cos[k x],{k,1,lim}];
Plot[{1.1 g3[x]},{x,-5Pi,3Pi},AspectRatio->Automatic];

lim=3;
augen[x_]=.128+Sum[2/Pi NIntegrate[{Sqrt[1/4-(y-.9)^2] Cos[k y]},{y,4/10,14/10}] Cos[k x],{k,1,lim}];
Plot[{augen[x]},{x,-5Pi,3Pi},AspectRatio->Automatic];

lim=3;
s[x_]=-.7+Sum[2/Pi (NIntegrate[{y Cos[k y]},{y,0,1/2}] +
NIntegrate[{1/2 Cos[k y]},{y,1/2,Pi}])Cos[k x],{k,1,lim}];
Plot[{s[x]},{x,-5Pi,3Pi},AspectRatio->Automatic,PlotRange->Full];

Plot[{1.1 g3[x],m[x],augen[x],s[x]},{x,-5Pi,3Pi},AspectRatio->Automatic];

lim=1;
m[x_]=-1+Sum[2/Pi NIntegrate[{-Sqrt[4-y^2] Cos[k y]},{y,0,2}] Cos[k x],{k,1,lim}];
g3[x_]=.9+Sum[2/Pi (NIntegrate[{Sqrt[2-y^2] Cos[k y]},{y,0,1}]+
 NIntegrate[{y Cos[k y]},{y,1,2}])Cos[k x],{k,1,lim}];
augen[x_]=.128+Sum[2/Pi NIntegrate[{Sqrt[1/4-(y-.9)^2] Cos[k y]},{y,4/10,14/10}] Cos[k x],{k,1,lim}];
s[x_]=-.7+Sum[2/Pi (NIntegrate[{y Cos[k y]},{y,0,1/2}] +
NIntegrate[{1/2 Cos[k y]},{y,1/2,Pi}])Cos[k x],{k,1,lim}];
Plot[{1.1 g3[x],m[x],augen[x],s[x]},{x,-5Pi,3Pi},AspectRatio->Automatic]

lim=70;
m[x_]=-1+Sum[2/Pi NIntegrate[{-Sqrt[4-y^2] Cos[k y]},{y,0,2}] Cos[k x],{k,1,lim}];
g3[x_]=.9+Sum[2/Pi (NIntegrate[{Sqrt[2-y^2] Cos[k y]},{y,0,1}]+
 NIntegrate[{y Cos[k y]},{y,1,2}])Cos[k x],{k,1,lim}];
augen[x_]=.128+Sum[2/Pi NIntegrate[{Sqrt[1/4-(y-.9)^2] Cos[k y]},{y,4/10,14/10}] Cos[k x],{k,1,lim}];
s[x_]=-.7+Sum[2/Pi (NIntegrate[{y Cos[k y]},{y,0,1/2}] +
NIntegrate[{1/2 Cos[k y]},{y,1/2,Pi}])Cos[k x],{k,1,lim}];
Plot[{1.1 g3[x],m[x],augen[x],s[x]},{x,-5Pi,3Pi},AspectRatio->Automatic]