SawtoothWave
✖
SawtoothWave
Examples
open allclose allBasic Examples (3)Summary of the most common use cases

https://wolfram.com/xid/0hyqcbknw4shfc2g-ddxvps

Plot over a subset of the reals:

https://wolfram.com/xid/0hyqcbknw4shfc2g-bzvq54

SawtoothWave is a piecewise function over finite domains:

https://wolfram.com/xid/0hyqcbknw4shfc2g-cjvukb

Scope (34)Survey of the scope of standard use cases
Numerical Evaluation (6)

https://wolfram.com/xid/0hyqcbknw4shfc2g-l274ju


https://wolfram.com/xid/0hyqcbknw4shfc2g-yl31dz

Numerically evaluate a sawtooth with specified range:

https://wolfram.com/xid/0hyqcbknw4shfc2g-cksbl4


https://wolfram.com/xid/0hyqcbknw4shfc2g-b0wt9

The precision of the output tracks the precision of the input:

https://wolfram.com/xid/0hyqcbknw4shfc2g-y7k4a

Evaluate efficiently at high precision:

https://wolfram.com/xid/0hyqcbknw4shfc2g-di5gcr


https://wolfram.com/xid/0hyqcbknw4shfc2g-bq2c6r

SawtoothWave threads over lists in the last argument:

https://wolfram.com/xid/0hyqcbknw4shfc2g-iub7vd


https://wolfram.com/xid/0hyqcbknw4shfc2g-39a8qd

Compute the elementwise values of an array using automatic threading:

https://wolfram.com/xid/0hyqcbknw4shfc2g-thgd2

Or compute the matrix SawtoothWave function using MatrixFunction:

https://wolfram.com/xid/0hyqcbknw4shfc2g-o5jpo

Specific Values (4)

https://wolfram.com/xid/0hyqcbknw4shfc2g-bmqd0y


https://wolfram.com/xid/0hyqcbknw4shfc2g-bitm3h


https://wolfram.com/xid/0hyqcbknw4shfc2g-d5sj8


https://wolfram.com/xid/0hyqcbknw4shfc2g-ia2x93

Find a value of x for which SawtoothWave[{2,-3},x]=1 :

https://wolfram.com/xid/0hyqcbknw4shfc2g-f2hrld


https://wolfram.com/xid/0hyqcbknw4shfc2g-bl261v

Visualization (4)
Plot the SawtoothWave function:

https://wolfram.com/xid/0hyqcbknw4shfc2g-ecj8m7

Visualize scaled SawtoothWave functions:

https://wolfram.com/xid/0hyqcbknw4shfc2g-i5ad25

Visualize SawtoothWave functions with different maximum and minimum values:

https://wolfram.com/xid/0hyqcbknw4shfc2g-lnz3yw

Plot SawtoothWave in three dimensions:

https://wolfram.com/xid/0hyqcbknw4shfc2g-puuxvg

Function Properties (10)
Function domain of SawtoothWave:

https://wolfram.com/xid/0hyqcbknw4shfc2g-cl7ele

It is restricted to real inputs:

https://wolfram.com/xid/0hyqcbknw4shfc2g-t4yc63

Function range of SawtoothWave[x]:

https://wolfram.com/xid/0hyqcbknw4shfc2g-evf2yr

SawtoothWave is periodic with period 1:

https://wolfram.com/xid/0hyqcbknw4shfc2g-cphxd6

The area under one period is :

https://wolfram.com/xid/0hyqcbknw4shfc2g-c1w6z8

SawtoothWave is not an analytic function:

https://wolfram.com/xid/0hyqcbknw4shfc2g-h5x4l2

It has both singularities and discontinuities at the integers:

https://wolfram.com/xid/0hyqcbknw4shfc2g-mdtl3h


https://wolfram.com/xid/0hyqcbknw4shfc2g-mn5jws

SawtoothWave[x] is neither nondecreasing nor nonincreasing:

https://wolfram.com/xid/0hyqcbknw4shfc2g-nlz7s

SawtoothWave is not injective:

https://wolfram.com/xid/0hyqcbknw4shfc2g-poz8g


https://wolfram.com/xid/0hyqcbknw4shfc2g-ctca0g

SawtoothWave[x] is not surjective:

https://wolfram.com/xid/0hyqcbknw4shfc2g-cxk3a6


https://wolfram.com/xid/0hyqcbknw4shfc2g-frlnsr

SawtoothWave[x] is non-negative:

https://wolfram.com/xid/0hyqcbknw4shfc2g-84dui

SawtoothWave is neither convex nor concave:

https://wolfram.com/xid/0hyqcbknw4shfc2g-hu52gx

Differentiation and Integration (5)
First derivative with respect to :

https://wolfram.com/xid/0hyqcbknw4shfc2g-krpoah

Derivative of the two-argument form with respect to :

https://wolfram.com/xid/0hyqcbknw4shfc2g-vciwf0

The second (and higher) derivatives are zero except at points where the derivative does not exist:

https://wolfram.com/xid/0hyqcbknw4shfc2g-5oiekv

If a==b, SawtoothWave[{a,b},x] is constant and its derivatives are zero everywhere:

https://wolfram.com/xid/0hyqcbknw4shfc2g-lv8nxx

Integrals over finite domains:

https://wolfram.com/xid/0hyqcbknw4shfc2g-bponid


https://wolfram.com/xid/0hyqcbknw4shfc2g-9cphx0

Series Expansions (5)

https://wolfram.com/xid/0hyqcbknw4shfc2g-f64drv

Since SawtoothWave is odd except for a constant, FourierTrigSeries gives a simpler result:

https://wolfram.com/xid/0hyqcbknw4shfc2g-i639or

The two results are equivalent:

https://wolfram.com/xid/0hyqcbknw4shfc2g-4nbxjs

FourierCosSeries of a scaled SawtoothWave:

https://wolfram.com/xid/0hyqcbknw4shfc2g-de3exk

Taylor series at a smooth point:

https://wolfram.com/xid/0hyqcbknw4shfc2g-ewr1h8

Series expansion at a singular point:

https://wolfram.com/xid/0hyqcbknw4shfc2g-20imb

Taylor expansion at a generic point:

https://wolfram.com/xid/0hyqcbknw4shfc2g-jwxla7

Applications (2)Sample problems that can be solved with this function
Fourier decomposition of sawtooth wave signal:

https://wolfram.com/xid/0hyqcbknw4shfc2g-j88yh4


https://wolfram.com/xid/0hyqcbknw4shfc2g-gslqev


https://wolfram.com/xid/0hyqcbknw4shfc2g-krndvi


https://wolfram.com/xid/0hyqcbknw4shfc2g-hqm3f3

Properties & Relations (4)Properties of the function, and connections to other functions
Use FunctionExpand to expand SawtoothWave in terms of elementary functions:

https://wolfram.com/xid/0hyqcbknw4shfc2g-ta46q

Use PiecewiseExpand to obtain a piecewise representation over an interval:

https://wolfram.com/xid/0hyqcbknw4shfc2g-gv2kma


https://wolfram.com/xid/0hyqcbknw4shfc2g-evz0f4


https://wolfram.com/xid/0hyqcbknw4shfc2g-e9nbs3


https://wolfram.com/xid/0hyqcbknw4shfc2g-ebsjj8

SawtoothWave[x] is lower semicontinuous but not upper semicontinuous at the origin:

https://wolfram.com/xid/0hyqcbknw4shfc2g-i60lj7

This differs from TriangleWave[x], which is both upper and lower semicontinuous, and thus continuous:

https://wolfram.com/xid/0hyqcbknw4shfc2g-hk2c86

As well as SquareWave[x], which is only upper semicontinuous:

https://wolfram.com/xid/0hyqcbknw4shfc2g-rqqn38

Visualize the three functions:

https://wolfram.com/xid/0hyqcbknw4shfc2g-4iy7iv

Possible Issues (1)Common pitfalls and unexpected behavior
SawtoothWave is not defined for complex arguments:

https://wolfram.com/xid/0hyqcbknw4shfc2g-1820s

Wolfram Research (2008), SawtoothWave, Wolfram Language function, https://reference.wolfram.com/language/ref/SawtoothWave.html.
Text
Wolfram Research (2008), SawtoothWave, Wolfram Language function, https://reference.wolfram.com/language/ref/SawtoothWave.html.
Wolfram Research (2008), SawtoothWave, Wolfram Language function, https://reference.wolfram.com/language/ref/SawtoothWave.html.
CMS
Wolfram Language. 2008. "SawtoothWave." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SawtoothWave.html.
Wolfram Language. 2008. "SawtoothWave." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SawtoothWave.html.
APA
Wolfram Language. (2008). SawtoothWave. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SawtoothWave.html
Wolfram Language. (2008). SawtoothWave. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SawtoothWave.html
BibTeX
@misc{reference.wolfram_2025_sawtoothwave, author="Wolfram Research", title="{SawtoothWave}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/SawtoothWave.html}", note=[Accessed: 26-April-2025
]}
BibLaTeX
@online{reference.wolfram_2025_sawtoothwave, organization={Wolfram Research}, title={SawtoothWave}, year={2008}, url={https://reference.wolfram.com/language/ref/SawtoothWave.html}, note=[Accessed: 26-April-2025
]}