Fourier Series--Square Wave

DOWNLOAD Mathematica Notebook 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)

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.