Fourier Series—Sawtooth Wave

Author

Eric W. Weisstein
August 30, 2008

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Calculus/FourierSeriesSawtoothWave.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/FourierSeriesSawtoothWave.html.

©2008 Wolfram Research, Inc. except for portions noted otherwise

Integral

V6

(1/L)Integrate[(x/(2L)),{x,0,2L}]

FourierA[0,x/(2L),{x,0,2L}]

FourierA[n,x/(2L),{x,0,2L}]

FourierB[n,x/(2L),{x,0,2L}]

V7

FourierCosCoefficient[SawtoothWave[x],x,n]

Table[FourierCosCoefficient[SawtoothWave[x],x,n],{n,0,4}]

FourierSinCoefficient[SawtoothWave[x],x,n]

Table[FourierSinCoefficient[SawtoothWave[x],x,n],{n,4}]

Series

V6

f=1/2-Sum[Sin[n π x/L]/n,{n,∞}]/π

V7

f=1/2-Sum[Sin[n π x/L]/n,{n,∞}]/π

FullSimplify[%,x∈Reals&&L>0]

FullSimplify[Log[((1-(E^(-((I π x)/L))))/(1-(E^((I π x)/L))))]]

FullSimplify[(1/2)+(I/(2π))Log[-(E^(-((I π x)/L)))],x∈Reals&&L>0]

ComplexExpand[%]

Plot

With[{L=1},
Plot[{x/(2L),SawtoothWave[(x/(2L))],(1/2)+(I/(2π))Log[-(E^(-((I π x)/L)))]},{x,-4L,4L},
PlotStyle->{Blue,Green,{Red,Thickness[.015],Dashing[{.04}]}}]
]

With[{L=1},
Plot[{x/(2L),((π+I Log[1-(E^(-((I π x)/L)))]-I Log[1-(E^((I π x)/L))])/(2 π))},{x,-4L,4L},
PlotStyle->{Blue,{Red,Thickness[.015],Dashing[{.04}]}}]
]

FullSimplify[ComplexExpand[(1/2)+((I (Log[((1-(E^(-((I π x)/L))))/(1-(E^((I π x)/L))))]))/(2 π))]]

With[{L=1},
Plot[{x/(2L),((π-Arg[-(E^(-((I π x)/L)))])/(2 π))},{x,-4L,4L},
PlotStyle->{Blue,{Red,Thickness[.015],Dashing[{.04}]}}]
]

%/.Arg[-Exp[(-I)*(y_)]]:>Pi-y

Plot

RectangleFunction[{a_,b_},x_]:=UnitStep[x-a]-UnitStep[x-b]

(series=Rest[FoldList[Plus,1/2,Table[-Sin[n Pi x]/Pi/n,{n,5}]]])//ColumnForm//TraditionalForm

FourierPlot[Plus@@Table[RectangleFunction[{i,i+2},x](x-i)/2,{i,-2,2,2}],{x,0,2},5,
AxesLabel->TraditionalForm/@{x,f[x]}]