LightMySky
En anglais

Fourier Series

Any reasonable periodic function is a sum of sines and cosines. The coefficients are recovered by integrating against each one, which is what lets a system driven by a complicated periodic input be solved one frequency at a time.

No account needed. Progress saves in this browser.

What a learner can do afterwards

  • Compute the first Fourier coefficients of a square or sawtooth wave
  • Explain how orthogonality of the sines and cosines isolates each coefficient
  • Say what the partial sums do near a jump discontinuity

1 · Read

Any reasonable periodic function is a sum of sines and cosines. You stack them up: a0 over 2 plus a1 cosine x plus b1 sine x plus a2 cosine 2 x plus b2 sine 2 x, on and on. The constant term a0 over 2 is the average of the function over one full period, so a0 is twice that average. To get each an, multiply by cosine n x and integrate over a period, then double and divide by the period length. Do the same trick with sine n x for each bn.

Try it together

Take the square wave that is -1 on (-pi, 0) and +1 on (0, pi), repeating every 2 pi. It is odd, so every an is 0 and only sine terms survive. For b1, multiply by sine x and integrate: b1 = (1 over pi) times the integral from -pi to pi of f(x) sin x dx, which is (2 over pi) times the integral from 0 to pi of sin x dx = (2 over pi) times 2 = 4 over pi. The same steps give bn = 4 over (n pi) for odd n and 0 for even n. A few terms already look like the wave, except near the jumps.

odd wave: every an = 0b1 = (2/pi) × ∫ sin x∫ sin x, 0 to pi, is 2b1 = 4/pi

This works because sines and cosines of different frequencies are orthogonal: multiply two different ones and integrate over a full period, and you get zero. That is what isolates one coefficient at a time instead of solving for all of them together. Symmetry reads off whole families for free: odd functions keep sines only, and even functions keep cosines only.

Expect trouble at jump discontinuities. Near a jump the partial sums overshoot and undershoot by about 9 percent of the jump size, however many terms you keep; more terms only squeeze the wiggle closer to the jump. This is the Gibbs phenomenon. At the jump itself the series converges to the midpoint of the two sides: a wave that jumps from 1 to 3 gives 2 there. The split is still useful to engineers, because a system driven by a messy periodic input can be solved one frequency at a time and the answers added.

Multiply by each tone, integrate over a period, and stack the surviving sines and cosines.

Readings 'A recipe for Fourier coefficients' and 'Solving one frequency at a time' are original to this dataset. All 9 extra questions are original to this dataset.

2 · Watch

En anglais

Take it off screen

Print a worksheetA4 with an answer key page for grown-ups. No screen, no internet.

Where it sits

Then practise

17 questions wait behind this lesson, each with its answer explained. Every answer feeds the sky: stars light as they are learned, and dim when it is time to come back.

Spotted a problem on this page? Tell us
Fourier Series · Mathematics, ages 20 to 21 · LightMySky