TOPICS
Search

Fourier Series--Square Wave


FourierSeriesSquareWave

Consider a square wave f(x) of length 2L. Over the range [0,2L], this can be written as

 f(x)=2[H(x/L)-H(x/L-1)]-1,
(1)

where H(x) is the Heaviside step function. Since f(x)=f(2L-x), the function is odd, so a_0=a_n=0, and

 b_n=1/Lint_0^(2L)f(x)sin((npix)/L)dx
(2)

reduces to

b_n=2/Lint_0^Lf(x)sin((npix)/L)dx
(3)
=4/(npi)sin^2(1/2npi)
(4)
=2/(npi)[1-(-1)^n]
(5)
=4/(npi){0 n even; 1 n odd.
(6)

The Fourier series is therefore

 f(x)=4/pisum_(n=1,3,5,...)^infty1/nsin((npix)/L).
(7)

See also

Fourier Series, Fourier Series--Sawtooth Wave, Fourier Series--Triangle Wave, Gibbs Phenomenon, Square Wave

Explore with Wolfram|Alpha

Cite this as:

Weisstein, Eric W. "Fourier Series--Square Wave." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/FourierSeriesSquareWave.html

Subject classifications