Sawtooth Wave

Author

Eric W. Weisstein
March 26, 2010

This notebook downloaded from http://mathworld.wolfram.com/notebooks/GeneralizedFunctions/SawtoothWave.nb.

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

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

Built-In

V6.0

SawtoothWave2:=Mod[FractionalPart[#],1]&

Plot[SawtoothWave2[x],{x,-2,2}]

SawtoothWave2[0]

V7

Plot[SawtoothWave[x],{x,-2,2}]

SawtoothWave[0]

Plot[{SawtoothWave[x],SawtoothWave[-x]},{x,-2,2}]

Plot[SawtoothWave[x]+SawtoothWave[-x],{x,-2,2}]

Plot

Plot[Mod[x,2],{x,-5,5},PlotStyle->Red,Ticks->None,AxesLabel->{x,f[x]},Exclusions->None]

Plot[Mod[x,2]/2,{x,-5,5},PlotStyle->Red,AxesLabel->{x,f[x]},Exclusions->None]

Identities

Function[x,SawtoothWave[x]+SawtoothWave[-x]]/@{-1,0,1/2,1}

SawtoothWave[1/2.]

SawtoothWave[1/2]//FunctionExpand

Limit

Limit[x,Direction->0]

Limit[SawtoothWave[x],Direction->0]

Limit[SawtoothWave[x],Direction->#]&/@{-1,1,0,Automatic}

Representations

Fourier Series

V6

FullSimplify[(1/2)-(1/π)Sum[(1/n)Sin[((n π x)/L)],{n,∞}],x∈Reals&&L>0]

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

V7

(1/2)-(1/π)Sum[(1/n)Sin[n π x],{n,∞}]

FullSimplify[%,x∈Reals]

Log

With[{L=1},Plot[((π+I Log[-(E^(-((I π x)/L)))])/(2 π)),{x,-5,5},PlotStyle->Red,Exclusions->None]]

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

Plot[((π+I Log[-(E^(-I π x))])/(2 π)),{x,-2,2}]

Plot[SawtoothWave[x/2],{x,-2,2}]

Mod

With[{L=1},Plot[Mod[x,2L]/(2L),{x,-5,5},PlotStyle->Red,AxesLabel->{x,f[x]},Exclusions->None]]

Floor

With[{L=1},Plot[(x/(2L))-Floor[(x/(2L))],{x,-5,5},PlotStyle->Red,Exclusions->None]]

ArcTan

With[{L=1},Plot[1/2-ArcTan[Cot[(π/2)(x/( L))]]/π,{x,-5,5},PlotStyle->Red,Exclusions->None]]

All

Table[{
(Pi+I Log[-E^(-I Pi x)])/(2 Pi),
Mod[x,2]/2,x/2-Floor[x/2],
1/2-ArcTan[Cot[Pi/2 x]]/Pi
}-SawtoothWave[x/2]/.x->RandomReal[{-10,10}],{100}]//Chop//Union