<?xml version="1.0" encoding="UTF-8"?>
<Worksheet><Version major="6" minor="1"/><View-Properties><Zoom percentage="100"/></View-Properties><Styles><Layout alignment="left" bullet="dot" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" name="Bullet Item" rightmargin="0.0" spaceabove="3.0" spacebelow="3.0"/><Layout alignment="left" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" name="_pstyle8" rightmargin="0.0" spaceabove="0.0" spacebelow="0.0"/><Layout alignment="left" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" name="_pstyle7" rightmargin="0.0" spaceabove="8.0" spacebelow="4.0"/><Layout alignment="left" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" name="_pstyle6" rightmargin="0.0" spaceabove="0.0" spacebelow="0.0"/><Layout alignment="centred" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" name="_pstyle5" rightmargin="0.0" spaceabove="0.0" spacebelow="0.0"/><Layout alignment="centred" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" name="_pstyle4" rightmargin="0.0" spaceabove="0.0" spacebelow="0.0"/><Layout alignment="centred" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" name="_pstyle1" rightmargin="0.0" spaceabove="12.0" spacebelow="12.0"/><Layout alignment="left" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" name="Heading 1" rightmargin="0.0" spaceabove="8.0" spacebelow="4.0"/><Layout alignment="left" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" name="Normal" rightmargin="0.0" spaceabove="0.0" spacebelow="0.0"/><Layout alignment="left" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" name="_pstyle14" rightmargin="0.0" spaceabove="0.0" spacebelow="0.0"/><Font background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="_pstyle14" readonly="false" size="12" underline="false"/><Font background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="Heading 1" readonly="false" size="18" underline="false"/><Font background="[0,0,0]" bold="true" executable="true" family="Monospaced" foreground="[255,0,0]" name="Maple Input" readonly="false"/><Font background="[0,0,0]" family="Times New Roman" name="Page Number" underline="false"/><Font background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="Normal" readonly="false" size="12" underline="false"/><Font background="[0,0,0]" italic="true" name="_cstyle270"/><Font background="[0,0,0]" executable="false" family="Times New Roman" name="2D Math" readonly="false" underline="false"/><Font background="[0,0,0]" executable="false" foreground="[0,128,128]" italic="false" name="Hyperlink" readonly="false" underline="true"/><Font background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="ParagraphStyle1" readonly="false" size="12" underline="false"/><Font background="[0,0,0]" italic="true" name="_cstyle269"/><Font background="[0,0,0]" italic="true" name="_cstyle268"/><Font background="[0,0,0]" italic="true" name="_cstyle267"/><Font background="[0,0,0]" italic="true" name="_cstyle266"/><Font background="[0,0,0]" italic="true" name="_cstyle265"/><Font background="[0,0,0]" italic="true" name="_cstyle264"/><Font background="[0,0,0]" italic="true" name="_cstyle263"/><Font background="[0,0,0]" italic="true" name="_cstyle262"/><Font background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="_cstyle261" readonly="false" size="12" underline="false"/><Font background="[0,0,0]" bold="true" name="_cstyle260"/><Font background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="_pstyle8" readonly="false" size="12" underline="false"/><Font background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="_pstyle6" readonly="false" size="12" underline="false"/><Font background="[0,0,0]" executable="false" family="Times New Roman" name="_cstyle10" readonly="false" underline="false"/><Font background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="Bullet Item" readonly="false" size="12" underline="false"/><Font background="[0,0,0]" bold="true" name="_cstyle259"/><Font background="[0,0,0]" bold="true" name="_cstyle258"/><Font background="[0,0,0]" bold="true" executable="false" family="Times New Roman" name="_cstyle257" readonly="false" underline="false"/><Font background="[0,0,0]" bold="true" executable="false" family="Times New Roman" name="_cstyle256" readonly="false" underline="false"/><Font background="[0,0,0]" executable="false" family="Times New Roman" name="2D Comment" readonly="false" underline="false"/><Font background="[0,0,0]" bold="true" executable="true" family="Monospaced" foreground="[255,0,0]" name="_cstyle8" readonly="false"/><Font background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="_cstyle7" readonly="false" size="12" underline="false"/><Font background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="_cstyle6" readonly="false" size="18" underline="false"/><Font background="[0,0,0]" executable="false" family="Times New Roman" name="_cstyle5" readonly="false"/><Font background="[0,0,0]" executable="false" family="Times New Roman" name="_cstyle4" readonly="false"/><Font background="[0,0,0]" bold="true" executable="false" family="Times New Roman" name="_cstyle1" readonly="false" size="18" underline="true"/></Styles><Page-Numbers enabled="false" first-number="1" first-numbered-page="1" horizontal-location="right" style="Page Number" vertical-location="bottom"/><Group><Input><Text-field layout="_pstyle1" style="_cstyle1"><Font foreground="[0,0,0]" italic="false">Fourier Series</Font></Text-field><Text-field layout="_pstyle4" style="Hyperlink"><Hyperlink bold="false" family="Times New Roman" hyperlink="true" linktarget="http://www.math.lsa.umich.edu/~adzham/" size="12" style="Hyperlink">Anton Dzhamay</Hyperlink></Text-field><Text-field layout="_pstyle5" style="Hyperlink"><Hyperlink bold="false" family="Times New Roman" hyperlink="true" linktarget="http://www.math.lsa.umich.edu/" size="12" style="Hyperlink">Department of Mathematics</Hyperlink></Text-field><Text-field layout="_pstyle5" style="Hyperlink"><Hyperlink bold="false" family="Times New Roman" hyperlink="true" linktarget="http://www.umich.edu/" size="12" style="Hyperlink">The University of Michigan</Hyperlink></Text-field><Text-field layout="_pstyle5" style="_cstyle4"><Font bold="false" foreground="[0,0,0]" italic="false" size="12" underline="false">Ann Arbor, MI 48109</Font></Text-field><Text-field layout="_pstyle6" style="_pstyle6"/><Text-field layout="_pstyle5" style="ParagraphStyle1"><Font bold="false" foreground="[0,0,0]" italic="false" size="12" style="_cstyle4" underline="false">wPage: </Font><Hyperlink bold="false" family="Times New Roman" hyperlink="true" linktarget="http://www.math.lsa.umich.edu/~adzham/" size="12" style="Hyperlink">http://www.math.lsa.umich.edu/~adzham</Hyperlink></Text-field><Text-field layout="_pstyle4" style="ParagraphStyle1"><Font bold="false" foreground="[0,0,0]" italic="false" size="12" style="_cstyle5" underline="false">email: </Font><Hyperlink bold="false" family="Times New Roman" hyperlink="true" linktarget="mailto:adzham@umich.edu" size="12" style="Hyperlink">adzham@umich.edu</Hyperlink></Text-field><Text-field layout="_pstyle6" style="_pstyle6"/><Text-field layout="_pstyle4" style="_cstyle5"><Font bold="false" encoding="ISO8859-1" foreground="[0,0,0]" italic="false" size="12" underline="false">Copyright \251  2004  by Anton Dzhamay</Font></Text-field><Text-field layout="_pstyle4" style="_cstyle5"><Font bold="false" foreground="[0,0,0]" italic="false" size="12" underline="false">All rights reserved</Font></Text-field><Text-field layout="_pstyle6" style="_pstyle6"/></Input></Group><Section collapsed="true"><Title><Text-field layout="_pstyle7" style="_cstyle6">Packages</Text-field></Title><Group><Input><Text-field layout="_pstyle8" style="_cstyle7">Some packages that we use in this worksheet:</Text-field><Text-field layout="_pstyle8" prompt="&gt; " style="_cstyle8"><Font italic="false" size="12" underline="false">restart: with(plots):</Font></Text-field></Input></Group><Group><Input><Text-field layout="_pstyle8" style="_pstyle8"/></Input></Group></Section><Section collapsed="true"><Title><Text-field layout="_pstyle7" style="_cstyle6">Introduction</Text-field></Title><Text-field layout="_pstyle8" style="ParagraphStyle1"><Font style="_cstyle7">In this worksheet we define a number of </Font><Font style="_cstyle261">Maple</Font><Font style="_cstyle7"> commands that make it easier to compute the Fourier coefficients and Fourier series for a given function and plot different Fourier polynomials (i.e., finite approximations to Fourier Series). We illustrate how to use these commands (and also the Fourier series themselves) by a number of examples.   </Font></Text-field></Section><Section collapsed="true"><Title><Text-field layout="_pstyle7" style="_cstyle6">Definitions</Text-field></Title><Text-field layout="_pstyle8" style="_pstyle8"/><Group><Input><Text-field layout="_pstyle8" prompt="&gt; " style="_cstyle8"><Font italic="false" size="12" underline="false">assume(n,integer);
assume(m,integer);</Font></Text-field></Input></Group><Group><Input><Text-field layout="_pstyle8" style="_cstyle7">Shorthand notation for basic functions</Text-field><Text-field layout="_pstyle8" prompt="&gt; " style="_cstyle8"><Font italic="false" size="12" underline="false">s:=(x,n)-&gt;sin(n*Pi*x/L):s(x,n);
c:=(x,n)-&gt;cos(n*Pi*x/L):c(x,n);</Font></Text-field></Input></Group><Group><Input><Text-field layout="_pstyle8" style="ParagraphStyle1"><Font style="_cstyle7">Fourier sine coefficients for </Font><Equation input-equation="f(x)" style="2D Math">NiMtJSJmRzYjJSJ4Rw==</Equation><Font bold="false" foreground="[0,0,0]" italic="false" size="12" style="_cstyle10"> </Font><Font style="_cstyle7"> on the interval </Font><Equation input-equation="[0,L]" style="2D Math">NiM3JCIiISUiTEc=</Equation><Font bold="false" foreground="[0,0,0]" italic="false" size="12" style="_cstyle10"> </Font></Text-field><Text-field layout="_pstyle8" prompt="&gt; " style="_cstyle8"><Font italic="false" size="12" underline="false">B:=proc(expr,var,n)
        simplify(int(expr*s(var,n),var=0..L)/int(s(var,n)*s(var,n),var=0..L));
end proc:B(f(x),x,n);</Font></Text-field></Input></Group><Group><Input><Text-field layout="_pstyle8" style="ParagraphStyle1"><Font style="_cstyle7">Fourier cosine coefficients for </Font><Equation input-equation="f(x)" style="2D Math">NiMtJSJmRzYjJSJ4Rw==</Equation><Font bold="false" foreground="[0,0,0]" italic="false" size="12" style="_cstyle10"> </Font><Font style="_cstyle7"> on the interval </Font><Equation input-equation="[0,L]" style="2D Math">NiM3JCIiISUiTEc=</Equation><Font bold="false" foreground="[0,0,0]" italic="false" size="12" style="_cstyle10"> </Font><Font style="_cstyle7"> (note that the formulas are different for </Font><Equation input-equation="n=0" style="2D Math">NiMvJSJuRyIiIQ==</Equation><Font bold="false" foreground="[0,0,0]" italic="false" size="12" style="_cstyle10"> </Font><Font style="_cstyle7"> and </Font><Equation input-equation="n&gt;0" style="2D Math">NiMyIiIhJSJuRw==</Equation><Font bold="false" foreground="[0,0,0]" italic="false" size="12" style="_cstyle10"> </Font><Font style="_cstyle7">)</Font></Text-field><Text-field layout="_pstyle8" prompt="&gt; " style="_cstyle8"><Font italic="false" size="12" underline="false">A:=proc(expr,var,n)
        simplify(int(expr*c(var,n),var=0..L)/int(c(var,n)*c(var,n),var=0..L));
end proc:A(f(x),x,0);A(f(x),x,n);</Font></Text-field></Input></Group><Group><Input><Text-field layout="_pstyle8" style="ParagraphStyle1"><Font style="_cstyle7">Full Fourier coefficients for </Font><Equation input-equation="f(x)" style="2D Math">NiMtJSJmRzYjJSJ4Rw==</Equation><Font bold="false" foreground="[0,0,0]" italic="false" size="12" style="_cstyle10"> </Font><Font style="_cstyle7"> on the interval </Font><Equation input-equation="[-L, L];" style="2D Math">NiM3JCwkJSJMRyEiIkYl</Equation><Font bold="false" foreground="[0,0,0]" italic="false" size="12" style="_cstyle10"> </Font></Text-field><Text-field layout="_pstyle8" prompt="&gt; " style="_cstyle8"><Font italic="false" size="12" underline="false">Bf:=proc(expr,var,n)
        simplify(int(expr*s(var,n),var=-L..L)/int(s(var,n)*s(var,n),var=-L..L));
end proc:Bf(f(x),x,n);
Af:=proc(expr,var,n)
        simplify(int(expr*c(var,n),var=-L..L)/int(c(var,n)*c(var,n),var=-L..L));
end proc:Af(f(x),x,0);Af(f(x),x,n);</Font></Text-field></Input></Group><Group><Input><Text-field layout="_pstyle8" style="_pstyle8"><Font style="_cstyle7">Fourier sine series and Fourier sine polynomial  for </Font><Equation input-equation="f(x)" style="2D Math">NiMtJSJmRzYjJSJ4Rw==</Equation><Font bold="false" foreground="[0,0,0]" italic="false" size="12" style="_cstyle10"> on the interval </Font><Equation input-equation="[0, L];" style="2D Comment">NiM3JCIiISUiTEc=</Equation> <Font bold="false" foreground="[0,0,0]" italic="false" size="12" style="_cstyle10">(The subtle difference here is that sometimes series (that uses </Font><Font foreground="[0,0,0]" italic="false" size="12" style="_cstyle256">sum</Font><Font bold="false" foreground="[0,0,0]" italic="false" size="12" style="_cstyle10">) has troubles with division by zero. The polynomial (that uses </Font><Font foreground="[0,0,0]" italic="false" size="12" style="_cstyle257">add</Font><Font bold="false" foreground="[0,0,0]" italic="false" size="12" style="_cstyle10">) does not have this problem, but on the other hand can not evaluate symbolic sums).</Font></Text-field><Text-field layout="_pstyle8" prompt="&gt; " style="_cstyle8"><Font italic="false" size="12" underline="false">FPs:=proc(expr,var,n)
        add(B(expr,var,m)*s(var,m),m=1..n);
end proc:
FSs:=proc(expr,var,n)
        sum(B(expr,var,m)*s(var,m),m=1..n);
end proc:FSs(f(x),x,infinity);</Font></Text-field></Input></Group><Group><Input><Text-field layout="_pstyle8" style="ParagraphStyle1"><Font style="_cstyle7">Fourier cosine series and Fourier cosine polynomial for </Font><Equation input-equation="f(x)" style="2D Math">NiMtJSJmRzYjJSJ4Rw==</Equation><Font bold="false" foreground="[0,0,0]" italic="false" size="12" style="_cstyle10"> on the interval </Font><Equation input-equation="[0, L];" style="2D Comment">NiM3JCIiISUiTEc=</Equation></Text-field><Text-field layout="_pstyle8" prompt="&gt; " style="_cstyle8"><Font italic="false" size="12" underline="false">FPc:=proc(expr,var,n)
        A(expr,var,0)+add(A(expr,var,m)*c(var,m),m=1..n);
end proc:
FSc:=proc(expr,var,n)
        A(expr,var,0)+sum(A(expr,var,m)*c(var,m),m=1..n);
end proc:FSc(f(x),x,infinity);</Font></Text-field></Input></Group><Group><Input><Text-field layout="_pstyle8" style="ParagraphStyle1"><Font style="_cstyle7">Full Fourier series and full Fourier polynomial for </Font><Equation input-equation="f(x)" style="2D Math">NiMtJSJmRzYjJSJ4Rw==</Equation><Font bold="false" foreground="[0,0,0]" italic="false" size="12" style="_cstyle10"> on the interval </Font><Equation input-equation="[-L, L];" style="2D Comment">NiM3JCwkJSJMRyEiIkYl</Equation></Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">FP:=proc(expr,var,n)
        Af(expr,var,0)+add(Af(expr,var,m)*c(var,m)+Bf(expr,var,m)*s(var,m),m=1..n);
end proc:
FS:=proc(expr,var,n)
        Af(expr,var,0)+sum(Af(expr,var,m)*c(var,m)+Bf(expr,var,m)*s(var,m),m=1..n);
end proc:FS(f(x),x,infinity);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">Odd extension of <Font family="Times New Roman" foreground="[0,0,0]" italic="false" size="12" style="_cstyle258" underline="false">expr</Font> from the interval <Equation input-equation="[0,L] " style="2D Comment">NiM3JCIiISUiTEc=</Equation> to the whole real line</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">oddext:=proc(expr,var,L)
   local x;
   x:=var - floor((var+L)/(2*L))*2*L;
   unapply(signum(x)*unapply(expr,var)(abs(x)),var)
end proc:
</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">Even extension of <Font family="Times New Roman" foreground="[0,0,0]" italic="false" size="12" style="_cstyle259" underline="false">expr</Font> from the interval <Equation input-equation="[0,L] " style="2D Comment">NiM3JCIiISUiTEc=</Equation> to the whole real line</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">evenext:=proc(expr,var,L)
   local x;
   x:=var - floor((var+L)/(2*L))*2*L;
   unapply(unapply(expr,var)(abs(x)),var)
end proc:
</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">Periodic extension of <Font family="Times New Roman" foreground="[0,0,0]" italic="false" size="12" style="_cstyle260" underline="false">expr</Font> from the interval <Equation input-equation="[-L, L];" style="2D Comment">NiM3JCwkJSJMRyEiIkYl</Equation> to the whole real line</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">pext:=proc(expr,var,L)
   unapply(unapply(expr,var)(var - floor((var+L)/(2*L))*2*L),var)
end proc:</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group></Section><Section collapsed="true"><Title><Text-field layout="Heading 1" style="Heading 1">Example 1: <Equation input-equation="f(x) = 1;" style="2D Comment">NiMvLSUiZkc2IyUieEciIiI=</Equation></Text-field></Title><Group><Input><Text-field layout="Normal" style="Normal">A constant function:</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">f:=x-&gt;1: f(x);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">B[n]=B(f(x),x,n);
seq(B[n]=B(f(x),x,n),n=1..10);
FSs(f(x),x,infinity);FPs(f(x),x,10);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">A[n]=A(f(x),x,n);
seq(A[n]=A(f(x),x,n),n=0..10);
FSc(f(x),x,infinity);FPc(f(x),x,10);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">A[n]=Af(f(x),x,n);B[n]=Bf(f(x),x,n);
seq(A[n]=Af(f(x),x,n),n=0..10);
seq(B[n]=Bf(f(x),x,n),n=1..10);
FS(f(x),x,infinity);FP(f(x),x,10);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">L:=1;</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">Fourier sine series differs from the function <Equation input-equation="f(x);" style="2D Comment">NiMtJSJmRzYjJSJ4Rw==</Equation>.</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">display(
[plot(f(x),x=-3*L..3*L,color=red,thickness=2,title=sprintf("Function f(x)=%a and ...",f(x))),
seq(plot([f(x),FPs(f(x),x,5*i+1)],x=-3*L..3*L,color=[red,blue],thickness=2,numpoints=1000,
title=sprintf("... and its Fourier sine series with %d terms and ...",5*i+1)),i=0..3)
]
,scaling=constrained,view=[-3*L..3*L,-3*L..3*L],insequence=true);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">Since <Equation input-equation="1;" style="2D Comment">NiMiIiI=</Equation> belongs to the basis of the cosine Fourier family and the full Fourier family, its series are given by just the first term, and so the approximation is exact:</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">display(
[plot(f(x),x=-3*L..3*L,color=red,thickness=2,title=sprintf("Function f(x)=%a and ...",f(x))),
seq(plot([f(x),FPc(f(x),x,5*i+1)],x=-3*L..3*L,color=[red,blue],thickness=2,numpoints=1000,
title=sprintf("... and its Fourier cosine series with %d terms and ...",5*i+1)),i=0..3)
]
,scaling=constrained,view=[-3*L..3*L,-3*L..3*L],insequence=true);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">display(
[plot(f(x),x=-3*L..3*L,color=red,thickness=2,title=sprintf("Function f(x)=%a and ...",f(x))),
seq(plot([f(x),FP(f(x),x,5*i+1)],x=-3*L..3*L,color=[red,blue],thickness=2,numpoints=1000,
title=sprintf("... and its Fourier series with %d terms and ...",5*i+1)),i=0..3)
]
,scaling=constrained,view=[-3*L..3*L,-3*L..3*L],insequence=true);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">Fourier sine series converges to an <Font bold="false" family="Times New Roman" foreground="[0,0,0]" size="12" style="_cstyle262" underline="false">odd periodic extension </Font>of <Equation input-equation="f(x);" style="2D Comment">NiMtJSJmRzYjJSJ4Rw==</Equation>. </Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">plot([f(x),FPs(f(x),x,7),oddext(f(x),x,L)(x)],x=-3*L..3*L,color=[red,blue,violet],thickness=2,numpoints=1000,
title=sprintf("%a, its Fourier sine series with %d terms and its odd periodic extension",f(x),7),scaling=constrained,view=[-3*L..3*L,-3*L..3*L]);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">Fourier cosine series converges to an even periodic extension of <Equation input-equation="f(x);" style="2D Comment">NiMtJSJmRzYjJSJ4Rw==</Equation>.</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">plot([f(x),FPc(f(x),x,7),evenext(f(x),x,L)(x)],x=-3*L..3*L,color=[red,blue,violet],thickness=2,numpoints=1000,
title=sprintf("%a, its Fourier cosine series with %d terms and its even periodic extension",f(x),7),scaling=constrained,view=[-3*L..3*L,-3*L..3*L]);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">Full Fourier series converges to a <Font bold="false" family="Times New Roman" foreground="[0,0,0]" size="12" style="_cstyle263" underline="false">periodic extension</Font> of <Equation input-equation="f(x);" style="2D Comment">NiMtJSJmRzYjJSJ4Rw==</Equation>.</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">plot([f(x),FP(f(x),x,7),pext(f(x),x,L)(x)],x=-3*L..3*L,color=[red,blue,violet],thickness=2,numpoints=1000,
title=sprintf("%a, its Fourier series with %d terms and its periodic extension",f(x),7),scaling=constrained,view=[-3*L..3*L,-3*L..3*L]);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">Clean-up:</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">f:='f':L:='L':</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Text-field layout="Normal" style="Normal"/></Section><Section collapsed="true"><Title><Text-field layout="Heading 1" style="Heading 1">Example 2: <Equation input-equation="f(x) = x;" style="2D Comment">NiMvLSUiZkc2IyUieEdGJw==</Equation></Text-field></Title><Group><Input><Text-field layout="Normal" style="Normal">An odd function:</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">f:=x-&gt;x: f(x);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">B[n]=B(f(x),x,n);
seq(B[n]=B(f(x),x,n),n=1..10);
FSs(f(x),x,infinity);FPs(f(x),x,10);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">A[n]=A(f(x),x,n);
seq(A[n]=A(f(x),x,n),n=0..10);
FSc(f(x),x,infinity);FPc(f(x),x,10);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">Since <Equation input-equation="f(x);" style="2D Comment">NiMtJSJmRzYjJSJ4Rw==</Equation> is <Font bold="false" family="Times New Roman" foreground="[0,0,0]" size="12" style="_cstyle264" underline="false">odd</Font>, its <Font bold="false" family="Times New Roman" foreground="[0,0,0]" size="12" style="_cstyle265" underline="false">even </Font>Fourier coefficients (i.e., <Equation input-equation="A[n];" style="2D Comment">NiMmJSJBRzYjJSJuRw==</Equation>) are zero.</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">A[n]=Af(f(x),x,n);B[n]=Bf(f(x),x,n);
seq(A[n]=Af(f(x),x,n),n=0..10);
seq(B[n]=Bf(f(x),x,n),n=1..10);
FS(f(x),x,infinity);FP(f(x),x,10);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">L:=1;</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">display(
[plot(f(x),x=-3*L..3*L,color=red,thickness=2,title=sprintf("Function f(x)=%a and ...",f(x))),
seq(plot([f(x),FPs(f(x),x,5*i+1)],x=-3*L..3*L,color=[red,blue],thickness=2,numpoints=1000,
title=sprintf("... and its Fourier sine series with %d terms and ...",5*i+1)),i=0..3)
]
,scaling=constrained,view=[-3*L..3*L,-3*L..3*L],insequence=true);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">display(
[plot(f(x),x=-3*L..3*L,color=red,thickness=2,title=sprintf("Function f(x)=%a and ...",f(x))),
seq(plot([f(x),FPc(f(x),x,5*i+1)],x=-3*L..3*L,color=[red,blue],thickness=2,numpoints=1000,
title=sprintf("... and its Fourier cosine series with %d terms and ...",5*i+1)),i=0..3)
]
,scaling=constrained,view=[-3*L..3*L,-3*L..3*L],insequence=true);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">display(
[plot(f(x),x=-3*L..3*L,color=red,thickness=2,title=sprintf("Function f(x)=%a and ...",f(x))),
seq(plot([f(x),FP(f(x),x,5*i+1)],x=-3*L..3*L,color=[red,blue],thickness=2,numpoints=1000,
title=sprintf("... and its Fourier series with %d terms and ...",5*i+1)),i=0..3)
]
,scaling=constrained,view=[-3*L..3*L,-3*L..3*L],insequence=true);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">plot([f(x),FPs(f(x),x,7),oddext(f(x),x,L)(x)],x=-3*L..3*L,color=[red,blue,violet],thickness=2,numpoints=1000,
title=sprintf("%a, its Fourier sine series with %d terms and its odd periodic extension",f(x),7),scaling=constrained,view=[-3*L..3*L,-3*L..3*L]);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">plot([f(x),FPc(f(x),x,7),evenext(f(x),x,L)(x)],x=-3*L..3*L,color=[red,blue,violet],thickness=2,numpoints=1000,
title=sprintf("%a, its Fourier cosine series with %d terms and its even periodic extension",f(x),7),scaling=constrained,view=[-3*L..3*L,-3*L..3*L]);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">plot([f(x),FP(f(x),x,7),pext(f(x),x,L)(x)],x=-3*L..3*L,color=[red,blue,violet],thickness=2,numpoints=1000,
title=sprintf("%a, its Fourier series with %d terms and its periodic extension",f(x),7),scaling=constrained,view=[-3*L..3*L,-3*L..3*L]);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">Clean-up:</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">f:='f':L:='L':</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Text-field layout="Normal" style="Normal"/></Section><Section collapsed="true"><Title><Text-field layout="Heading 1" style="Heading 1">Example 3: <Equation input-equation="f(x) = x^2;" style="2D Comment">NiMvLSUiZkc2IyUieEcqJEYnIiIj</Equation></Text-field></Title><Group><Input><Text-field layout="Normal" style="Normal">An even function:</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">f:=x-&gt;x^2: f(x);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">B[n]=B(f(x),x,n);
seq(B[n]=B(f(x),x,n),n=1..10);
FSs(f(x),x,infinity);FPs(f(x),x,10);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">A[n]=A(f(x),x,n);
seq(A[n]=A(f(x),x,n),n=0..10);
FSc(f(x),x,infinity);FPc(f(x),x,10);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">Since the function is <Font bold="false" family="Times New Roman" foreground="[0,0,0]" size="12" style="_cstyle267" underline="false">even</Font>, its <Font bold="false" family="Times New Roman" foreground="[0,0,0]" size="12" style="_cstyle266" underline="false">odd</Font> coefficients are zero.</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">A[n]=Af(f(x),x,n);B[n]=Bf(f(x),x,n);
seq(A[n]=Af(f(x),x,n),n=0..10);
seq(B[n]=Bf(f(x),x,n),n=1..10);
FS(f(x),x,infinity);FP(f(x),x,10);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">L:=1;</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">display(
[plot(f(x),x=-3*L..3*L,color=red,thickness=2,title=sprintf("Function f(x)=%a and ...",f(x))),
seq(plot([f(x),FPs(f(x),x,5*i+1)],x=-3*L..3*L,color=[red,blue],thickness=2,numpoints=1000,
title=sprintf("... and its Fourier sine series with %d terms and ...",5*i+1)),i=0..3)
]
,scaling=constrained,view=[-3*L..3*L,-3*L..3*L],insequence=true);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">display(
[plot(f(x),x=-3*L..3*L,color=red,thickness=2,title=sprintf("Function f(x)=%a and ...",f(x))),
seq(plot([f(x),FPc(f(x),x,5*i+1)],x=-3*L..3*L,color=[red,blue],thickness=2,numpoints=1000,
title=sprintf("... and its Fourier cosine series with %d terms and ...",5*i+1)),i=0..3)
]
,scaling=constrained,view=[-3*L..3*L,-3*L..3*L],insequence=true);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">display(
[plot(f(x),x=-3*L..3*L,color=red,thickness=2,title=sprintf("Function f(x)=%a and ...",f(x))),
seq(plot([f(x),FP(f(x),x,5*i+1)],x=-3*L..3*L,color=[red,blue],thickness=2,numpoints=1000,
title=sprintf("... and its Fourier series with %d terms and ...",5*i+1)),i=0..3)
]
,scaling=constrained,view=[-3*L..3*L,-3*L..3*L],insequence=true);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">plot([f(x),FPs(f(x),x,7),oddext(f(x),x,L)(x)],x=-3*L..3*L,color=[red,blue,violet],thickness=2,numpoints=1000,
title=sprintf("%a, its Fourier sine series with %d terms and its odd periodic extension",f(x),7),scaling=constrained,view=[-3*L..3*L,-3*L..3*L]);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">plot([f(x),FPc(f(x),x,7),evenext(f(x),x,L)(x)],x=-3*L..3*L,color=[red,blue,violet],thickness=2,numpoints=1000,
title=sprintf("%a, its Fourier cosine series with %d terms and its even periodic extension",f(x),7),scaling=constrained,view=[-3*L..3*L,-3*L..3*L]);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">plot([f(x),FP(f(x),x,7),pext(f(x),x,L)(x)],x=-3*L..3*L,color=[red,blue,violet],thickness=2,numpoints=1000,
title=sprintf("%a, its Fourier series with %d terms and its periodic extension",f(x),7),scaling=constrained,view=[-3*L..3*L,-3*L..3*L]);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">Clean-up:</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">f:='f':L:='L':</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Text-field layout="Normal" style="Normal"/></Section><Section collapsed="true"><Title><Text-field layout="Heading 1" style="Heading 1">Example 4: <Equation input-equation="f(x) = x^2-x;" style="2D Comment">NiMvLSUiZkc2IyUieEcsJiokRiciIiMiIiJGJyEiIg==</Equation></Text-field></Title><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">f:=x-&gt;x^2-x: f(x);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">B[n]=B(f(x),x,n);
seq(B[n]=B(f(x),x,n),n=1..10);
FSs(f(x),x,infinity);FPs(f(x),x,10);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">A[n]=A(f(x),x,n);
seq(A[n]=A(f(x),x,n),n=0..10);
FSc(f(x),x,infinity);FPc(f(x),x,10);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">This function is neither even nor odd, and so all of its Fourier coefficients are non-zero:</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">A[n]=Af(f(x),x,n);B[n]=Bf(f(x),x,n);
seq(A[n]=Af(f(x),x,n),n=0..10);
seq(B[n]=Bf(f(x),x,n),n=1..10);
FS(f(x),x,infinity);FP(f(x),x,10);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">L:=1;</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">display(
[plot(f(x),x=-3*L..3*L,color=red,thickness=2,title=sprintf("Function f(x)=%a and ...",f(x))),
seq(plot([f(x),FPs(f(x),x,5*i+1)],x=-3*L..3*L,color=[red,blue],thickness=2,numpoints=1000,
title=sprintf("... and its Fourier sine series with %d terms and ...",5*i+1)),i=0..3)
]
,scaling=constrained,view=[-3*L..3*L,-3*L..3*L],insequence=true);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">display(
[plot(f(x),x=-3*L..3*L,color=red,thickness=2,title=sprintf("Function f(x)=%a and ...",f(x))),
seq(plot([f(x),FPc(f(x),x,5*i+1)],x=-3*L..3*L,color=[red,blue],thickness=2,numpoints=1000,
title=sprintf("... and its Fourier cosine series with %d terms and ...",5*i+1)),i=0..3)
]
,scaling=constrained,view=[-3*L..3*L,-3*L..3*L],insequence=true);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">display(
[plot(f(x),x=-3*L..3*L,color=red,thickness=2,title=sprintf("Function f(x)=%a and ...",f(x))),
seq(plot([f(x),FP(f(x),x,5*i+1)],x=-3*L..3*L,color=[red,blue],thickness=2,numpoints=1000,
title=sprintf("... and its Fourier series with %d terms and ...",5*i+1)),i=0..3)
]
,scaling=constrained,view=[-3*L..3*L,-3*L..3*L],insequence=true);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">plot([f(x),FPs(f(x),x,7),oddext(f(x),x,L)(x)],x=-3*L..3*L,color=[red,blue,violet],thickness=2,numpoints=1000,
title=sprintf("%a, its Fourier sine series with %d terms and its odd periodic extension",f(x),7),scaling=constrained,view=[-3*L..3*L,-3*L..3*L]);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">plot([f(x),FPc(f(x),x,7),evenext(f(x),x,L)(x)],x=-3*L..3*L,color=[red,blue,violet],thickness=2,numpoints=1000,
title=sprintf("%a, its Fourier cosine series with %d terms and its even periodic extension",f(x),7),scaling=constrained,view=[-3*L..3*L,-3*L..3*L]);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">plot([f(x),FP(f(x),x,7),pext(f(x),x,L)(x)],x=-3*L..3*L,color=[red,blue,violet],thickness=2,numpoints=1000,
title=sprintf("%a, its Fourier series with %d terms and its periodic extension",f(x),7),scaling=constrained,view=[-3*L..3*L,-3*L..3*L]);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">Clean-up:</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">f:='f':L:='L':</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Text-field layout="Normal" style="Normal"/></Section><Section collapsed="true"><Title><Text-field layout="Heading 1" style="Heading 1">Example 5: <Equation input-equation="f(x) = cos(Pi*x/L);" style="2D Comment">NiMvLSUiZkc2IyUieEctJSRjb3NHNiMqKCUjUGlHIiIiRidGLSUiTEchIiI=</Equation></Text-field></Title><Group><Input><Text-field layout="Normal" style="Normal">In this example <Equation input-equation="f(x);" style="2D Comment">NiMtJSJmRzYjJSJ4Rw==</Equation>is a basic function of the <Font bold="false" family="Times New Roman" foreground="[0,0,0]" size="12" style="_cstyle268" underline="false">cosine</Font> <Font bold="false" family="Times New Roman" foreground="[0,0,0]" size="12" style="_cstyle269" underline="false">Fourier</Font> family and the <Font bold="false" family="Times New Roman" foreground="[0,0,0]" size="12" style="_cstyle270" underline="false">full Fourier</Font> family</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">f:=x-&gt;cos(Pi*x/L): f(x);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">B[n]=B(f(x),x,n);
seq(B[n]=B(f(x),x,n),n=1..10);
FSs(f(x),x,infinity);FPs(f(x),x,10);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">A[n]=A(f(x),x,n);
seq(A[n]=A(f(x),x,n),n=0..10);
FSc(f(x),x,infinity);FPc(f(x),x,10);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">A[n]=Af(f(x),x,n);B[n]=Bf(f(x),x,n);
seq(A[n]=Af(f(x),x,n),n=0..10);
seq(B[n]=Bf(f(x),x,n),n=1..10);
FS(f(x),x,infinity);FP(f(x),x,10);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">L:=1;</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">display(
[plot(f(x),x=-3*L..3*L,color=red,thickness=2,title=sprintf("Function f(x)=%a and ...",f(x))),
seq(plot([f(x),FPs(f(x),x,5*i+1)],x=-3*L..3*L,color=[red,blue],thickness=2,numpoints=1000,
title=sprintf("... and its Fourier sine series with %d terms and ...",5*i+1)),i=0..3)
]
,scaling=constrained,view=[-3*L..3*L,-3*L..3*L],insequence=true);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">display(
[plot(f(x),x=-3*L..3*L,color=red,thickness=2,title=sprintf("Function f(x)=%a and ...",f(x))),
seq(plot([f(x),FPc(f(x),x,5*i+1)],x=-3*L..3*L,color=[red,blue],thickness=2,numpoints=1000,
title=sprintf("... and its Fourier cosine series with %d terms and ...",5*i+1)),i=0..3)
]
,scaling=constrained,view=[-3*L..3*L,-3*L..3*L],insequence=true);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">display(
[plot(f(x),x=-3*L..3*L,color=red,thickness=2,title=sprintf("Function f(x)=%a and ...",f(x))),
seq(plot([f(x),FP(f(x),x,5*i+1)],x=-3*L..3*L,color=[red,blue],thickness=2,numpoints=1000,
title=sprintf("... and its Fourier series with %d terms and ...",5*i+1)),i=0..3)
]
,scaling=constrained,view=[-3*L..3*L,-3*L..3*L],insequence=true);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">plot([f(x),FPs(f(x),x,7),oddext(f(x),x,L)(x)],x=-3*L..3*L,color=[red,blue,violet],thickness=2,numpoints=1000,
title=sprintf("%a, its Fourier sine series with %d terms and its odd periodic extension",f(x),7),scaling=constrained,view=[-3*L..3*L,-3*L..3*L]);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">plot([f(x),FPc(f(x),x,7),evenext(f(x),x,L)(x)],x=-3*L..3*L,color=[red,blue,violet],thickness=2,numpoints=1000,
title=sprintf("%a, its Fourier cosine series with %d terms and its even periodic extension",f(x),7),scaling=constrained,view=[-3*L..3*L,-3*L..3*L]);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">plot([f(x),FP(f(x),x,7),pext(f(x),x,L)(x)],x=-3*L..3*L,color=[red,blue,violet],thickness=2,numpoints=1000,
title=sprintf("%a, its Fourier series with %d terms and its periodic extension",f(x),7),scaling=constrained,view=[-3*L..3*L,-3*L..3*L]);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">Clean-up:</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">f:='f':L:='L':</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Text-field layout="Normal" style="Normal"/></Section><Section collapsed="true"><Title><Text-field layout="Heading 1" style="Heading 1">Example 6: <Equation input-equation="f(x) = piecewise(x &lt; 0,0,x &lt; L/2,x,x &lt; L,1,0);" style="2D Comment">NiMvLSUiZkc2IyUieEctJSpwaWVjZXdpc2VHNikyRiciIiFGLDJGJyomJSJMRyIiIiIiIyEiIkYnMkYnRi9GMEYs</Equation></Text-field></Title><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">assume(L&gt;0);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">f:=x-&gt;piecewise(x&lt;0,0,x&lt;L/2,x,x&lt;L,1,0):f(x);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">Since in this case it is hard to obtain general formulas, we'll take <Equation input-equation="L = 1;" style="2D Comment">NiMvJSJMRyIiIg==</Equation> from the very beginning:</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">L:=1;</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">plot(f(x),x=0..L,color=red,thickness=2,scaling=constrained);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">B[n]=B(f(x),x,n);
seq(B[n]=B(f(x),x,n),n=1..10);
FSs(f(x),x,infinity);FPs(f(x),x,10);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">A[n]=A(f(x),x,n);
seq(A[n]=A(f(x),x,n),n=0..10);
FSc(f(x),x,infinity);FPc(f(x),x,10);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">A[n]=Af(f(x),x,n);B[n]=Bf(f(x),x,n);
seq(A[n]=Af(f(x),x,n),n=0..10);
seq(B[n]=Bf(f(x),x,n),n=1..10);
FS(f(x),x,infinity);FP(f(x),x,10);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">display(
[plot(f(x),x=-3*L..3*L,color=red,thickness=2,title=sprintf("Function f(x)=%a and ...",f(x))),
seq(plot([f(x),FPs(f(x),x,5*i+1)],x=-3*L..3*L,color=[red,blue],thickness=2,numpoints=1000,
title=sprintf("... and its Fourier sine series with %d terms and ...",5*i+1)),i=0..3)
]
,scaling=constrained,view=[-3*L..3*L,-3*L..3*L],insequence=true);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">display(
[plot(f(x),x=-3*L..3*L,color=red,thickness=2,title=sprintf("Function f(x)=%a and ...",f(x))),
seq(plot([f(x),FPc(f(x),x,5*i+1)],x=-3*L..3*L,color=[red,blue],thickness=2,numpoints=1000,
title=sprintf("... and its Fourier cosine series with %d terms and ...",5*i+1)),i=0..3)
]
,scaling=constrained,view=[-3*L..3*L,-3*L..3*L],insequence=true);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">display(
[plot(f(x),x=-3*L..3*L,color=red,thickness=2,title=sprintf("Function f(x)=%a and ...",f(x))),
seq(plot([f(x),FP(f(x),x,5*i+1)],x=-3*L..3*L,color=[red,blue],thickness=2,numpoints=1000,
title=sprintf("... and its Fourier series with %d terms and ...",5*i+1)),i=0..3)
]
,scaling=constrained,view=[-3*L..3*L,-3*L..3*L],insequence=true);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">plot([f(x),FPs(f(x),x,7),oddext(f(x),x,L)(x)],x=-3*L..3*L,color=[red,blue,violet],thickness=2,numpoints=1000,
title=sprintf("%a, its Fourier sine series with %d terms\n and its odd periodic extension",f(x),7),scaling=constrained,view=[-3*L..3*L,-3*L..3*L]);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">plot([f(x),FPc(f(x),x,7),evenext(f(x),x,L)(x)],x=-3*L..3*L,color=[red,blue,violet],thickness=2,numpoints=1000,
title=sprintf("%a, its Fourier cosine series with %d terms\n and its even periodic extension",f(x),7),scaling=constrained,view=[-3*L..3*L,-3*L..3*L]);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">plot([f(x),FP(f(x),x,7),pext(f(x),x,L)(x)],x=-3*L..3*L,color=[red,blue,violet],thickness=2,numpoints=1000,
title=sprintf("%a, its Fourier series with %d terms\n and its periodic extension",f(x),7),scaling=constrained,view=[-3*L..3*L,-3*L..3*L]);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">Clean-up:</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">f:='f':L:='L':</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Text-field layout="Normal" style="Normal"/></Section><Section collapsed="true"><Title><Text-field layout="Heading 1" style="Heading 1">References</Text-field></Title><Group><Input><Text-field layout="Bullet Item" style="Bullet Item">Richard Haberman, Elementary Applied Partial Differential Equations, 3rd edition, Prentice Hall</Text-field></Input></Group><Text-field layout="Normal" style="Normal"/></Section><Section collapsed="true"><Title><Text-field layout="Heading 1" style="Heading 1">Disclaimer</Text-field></Title><Text-field layout="Normal" style="Normal">"While every effort has been made to validate the solutions in this worksheet, Waterloo Maple Inc. and the contributors are not responsible for any errors contained and are not liable for any damages resulting from the use of this material." </Text-field></Section><Text-field layout="_pstyle14" style="_pstyle14"/><Text-field/></Worksheet>