# SawtoothWave

SawtoothWave[x]

gives a sawtooth wave that varies from 0 to 1 with unit period.

SawtoothWave[{min,max},x]

gives a sawtooth wave that varies from min to max with unit period.

# Details # Examples

open allclose all

## Basic Examples(3)

Evaluate numerically:

Plot over a subset of the reals:

SawtoothWave is a piecewise function over finite domains:

## Scope(32)

### Numerical Evaluation(4)

Evaluate numerically:

Evaluate with custom heights:

Evaluate to high precision:

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

Evaluate efficiently at high precision:

SawtoothWave threads over lists in the last argument:

### Specific Values(4)

Value at zero:

Values at fixed points:

Evaluate symbolically:

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

### Visualization(4)

Plot the SawtoothWave function:

Visualize scaled SawtoothWave functions:

Visualize SawtoothWave functions with different maximum and minimum values:

Plot SawtoothWave in three dimensions:

### Function Properties(10)

Function domain of SawtoothWave:

It is restricted to real inputs:

Function range of SawtoothWave[x]:

SawtoothWave is periodic with period 1:

The area under one period is :

SawtoothWave is not an analytic function:

It has both singularities and discontinuities at the integers:

SawtoothWave[x] is neither nondecreasing nor nonincreasing:

SawtoothWave is not injective:

SawtoothWave[x] is not surjective:

SawtoothWave[x] is non-negative:

SawtoothWave is neither convex nor concave:

### Differentiation and Integration(5)

First derivative with respect to :

Derivative of the two-argument form with respect to :

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

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

Integrals over finite domains:

### Series Expansions(5)

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

The two results are equivalent:

FourierCosSeries of a scaled SawtoothWave:

Taylor series at a smooth point:

Series expansion at a singular point:

Taylor expansion at a generic point:

## Applications(2)

Fourier decomposition of sawtooth wave signal:

Sawtooth wave sound sample:

## Properties & Relations(4)

Use FunctionExpand to expand SawtoothWave in terms of elementary functions:

Use PiecewiseExpand to obtain piecewise representation on an interval:

Integration:

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

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

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

Visualize the three functions:

## Possible Issues(1)

SawtoothWave is not defined for complex arguments: