TOPICS
Search

Triangle Wave


TriangleWave

Analytic representations the symmetric triangle wave with period 2 and varying between -1 and 1 include

f(x)=2/pisin^(-1)[sin(pix)]
(1)
=1-2|1-[2(1/2x+1/4 (mod 1))]|
(2)
=1-4|1/2-frac(1/2x+1/4)|,
(3)

where frac(x) is the fractional part of x.

The triangle wave is implemented in the Wolfram Language as TriangleWave[x].

The Fourier series for the triangle wave is given by

 f(x)=8/(pi^2)sum_(n=1,3,5,...)^infty((-1)^((n-1)/2))/(n^2)sin((npix)/L),
(4)

which can be summed to yield the analytic expression

 f(x)=i/(pi^2e^(piix))[Phi(x,2,1/2)-e^(2piix)Phi(-e^(2piix),2,1/2)],
(5)

where Phi(z,s,a) is a Lerch transcendent.

TriangleWaveTrott

A form of triangle wave ranging between 0 and 1 with period 2 is given by

 f(x)=1-2|nint(1/2x)-1/2x|
(6)

(Trott 2004, p. 228), where nint(x) is the nearest integer function.


See also

Fourier Series--Triangle Wave, Sawtooth Wave, Square Wave, Staircase Function, Triangle Function

Explore with Wolfram|Alpha

References

Trott, M. The Mathematica GuideBook for Programming. New York: Springer-Verlag, 2004. http://www.mathematicaguidebooks.org/.

Referenced on Wolfram|Alpha

Triangle Wave

Cite this as:

Weisstein, Eric W. "Triangle Wave." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/TriangleWave.html

Subject classifications