This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

TriangleWave

TriangleWave[x]
gives a triangle wave that varies between and with the unit period.
TriangleWave
gives a triangle wave that varies between min and max with the unit period.
Generate a triangular wave:
TriangleWave is periodic with period 1:
Generate a triangular wave:
In[1]:=
Click for copyable input
Out[1]=
 
TriangleWave is periodic with period 1:
In[1]:=
Click for copyable input
Out[1]=
Evaluate numerically:
Evaluate exactly:
Evaluate to arbitrary precision:
The precision of the output tracks the precision of the input:
TriangleWave threads element-wise over lists:
Generate a shifted triangular wave:
Coefficients of Fourier series:
Explicit Fourier series approximant:
Plot the residue term:
Triangle wave sound sample:
Use FunctionExpand to expand TriangleWave in terms of elementary functions:
Use PiecewiseExpand to obtain piecewise representation on an interval:
TriangleWave is undefined for complex numbers:
New in 7