Triangle Wave

Author

Eric W. Weisstein
March 26, 2010

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

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

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

Identities

TriangleWave[x]==TriangleWave[-x]

FullSimplify[TriangleWave[x]+TriangleWave[-x]]

TriangleWave[-x]//FunctionExpand

Table[TriangleWave[x]+TriangleWave[-x]/.x->RandomReal[{-10,10}],{100}]//Chop//Union

Sum

(∑_(n=1,3,…)^∞)((8(((-1))^((n-1)/2))sin(πnx))/((π^2)(n^2)))==-(1/(π^2))4i(e^(-iπx))(-HypergeometricPFQ[{(1/2),(1/2),1},{(3/2),(3/2)},-(e^(-2iπx))]+(e^(2iπx))HypergeometricPFQ[{(1/2),(1/2),1},{(3/2),(3/2)},-(e^(2iπx))])

v4.2

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

v5.0

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

v5.1

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

FullSimplify[%,x∈Reals]

V7

expr=Sum[8(-1)^((n-1)/2)/(Pi^2 n^2) Sin[n Pi x],{n,1,∞,2}]

FullSimplify[expr,x∈Reals]

FunctionExpand[expr,x∈Reals]

FullSimplify[%56,x<0]

FullSimplify[%56,x>0]

FullSimplify[Refine[%56,x>0],x>0]

(∑_(n=0)^∞)((8 (((-1))^n) sin(π (2 n+1) x))/((π^2) (((2 n+1))^2)))==-((i (e^(-i π x)) ((e^(2 i π x)) (LerchPhi[-(e^(2 i π x)), 2, (1/2)])-(LerchPhi[-(e^(-2 i π x)), 2, (1/2)])))/(π^2))

V7

Sum[8(-1)^n/(Pi^2 (2n+1)^2) Sin[(2n+1) Pi x],{n,0,∞}]

FullSimplify[%]

(∑_(n=1,3,…)^∞)(2i(πn+(((-1))^n)(πn+4i))sin(((πn)/2)))((sin(πnx))/((π^2)(n^2)))==-((i(e^(-iπx))(-LerchPhi[-(e^(-2iπx)),2,(1/2)]+(e^(2iπx))LerchPhi[-(e^(2iπx)),2,(1/2)]))/(π^2))

V7

Sum[(2 I (n Pi+(-1)^n (4 I+n Pi)) Sin[(n Pi)/2])/(n^2 Pi^2) Sin[n Pi x],{n,1,Infinity,2}]

(∑_n^∞)-((8 (((-1))^n) sin(π n x))/((π^2) (n^2)))==((i (e^(-i π x)) ((e^(2 i π x)) (LerchPhi[-(e^(2 i π x)), 2, (1/2)])-(LerchPhi[-(e^(-2 i π x)), 2, (1/2)])))/(π^2))

V7

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

Plots

TriangleWave[x]

Plot[TriangleWave[x],{x,0,5},PlotStyle->Red,AspectRatio->Automatic]

((4 i (e^(-i π x)) ((Subscript[, 3])(Subscript[F, 2])((1/2),(1/2),1;(3/2),(3/2);-(e^(-2 i π x)))-(e^(2 i π x)) (Subscript[, 3])(Subscript[F, 2])((1/2),(1/2),1;(3/2),(3/2);-(e^(2 i π x)))))/(π^2))

Plot[(1/(π^2))4 I (E^(-I π x)) (HypergeometricPFQ[{(1/2),(1/2),1},{(3/2),(3/2)},-(E^(-2 I π x))]-(E^(2 I π x)) HypergeometricPFQ[{(1/2),(1/2),1},{(3/2),(3/2)},-(E^(2 I π x))]),{x,0,5},PlotStyle->Red]

((2 (sin^(-1))(sin(π x)))/π)

Plot[2/Pi ArcSin[Sin[x Pi]],{x,0,5},PlotStyle->Red]

((i (e^(-i π x)))/(π^2)) ((LerchPhi[-(e^(-2 i π x)), 2, (1/2)])-(e^(2 i π x)) (LerchPhi[-(e^(2 i π x)), 2, (1/2)]))

Plot[(1/(π^2))(I (E^(-I π x)) (LerchPhi[-(E^(-2 I π x)),2,(1/2)]-(E^(2 I π x)) LerchPhi[-(E^(2 I π x)),2,(1/2)])),{x,0,5},PlotStyle->Red]

1-2 (Abs[1-2 (Mod[((x/2)+(1/4)), 1])])

Plot[1-2 Abs[1-2 Mod[(1/4)+(x/2),1]],{x,0,5},PlotStyle->Red]

1-4 (Abs[(1/2)-frac((x/2)+(1/4))])

Plot[1-4Abs[1/2-FractionalPart[x/2+1/4]],{x,0,5},PlotStyle->Red]

Trott Form

Plot[1-2Abs[Round[x/2]-x/2],{x,-5,5},PlotStyle->Red]