🎼Fourier Series & Transforms

Any signal is a sum of sines — the tool behind waves, sound, optics and quantum momentum.

Building shapes from sines

A periodic function with period 2π2\pi can be written f(x)=a02+∑n=1∞(ancos⁡nx+bnsin⁡nx)f(x) = \frac{a_0}{2} + \sum_{n=1}^{\infty}\big(a_n\cos nx + b_n\sin nx\big) with coefficients an=1π∫−ππf(x)cos⁡nx dx,bn=1π∫−ππf(x)sin⁡nx dxa_n = \frac1\pi\int_{-\pi}^{\pi} f(x)\cos nx\,dx,\qquad b_n = \frac1\pi\int_{-\pi}^{\pi} f(x)\sin nx\,dx

Classic examples

  • Square wave: 4π(sin⁡x+13sin⁡3x+15sin⁡5x+… )\dfrac4\pi\left(\sin x + \tfrac13\sin3x + \tfrac15\sin5x + \dots\right) — odd harmonics only.
  • Sawtooth: 2(sin⁡x−12sin⁡2x+13sin⁡3x−… )2\left(\sin x - \tfrac12\sin2x + \tfrac13\sin3x - \dots\right).

Add terms in the simulation and watch the sum approach the target. Notice the ~9% overshoot near jumps that never disappears — the Gibbs phenomenon.

The Fourier transform

For non-periodic signals the sum becomes an integral: f^(k)=∫−∞∞f(x) e−ikx dx\hat f(k) = \int_{-\infty}^{\infty} f(x)\,e^{-ikx}\,dx

Where physics uses it

  • Musical timbre = harmonic content; spectrum analysers.
  • Diffraction patterns are Fourier transforms of the aperture.
  • Quantum mechanics: the momentum wavefunction is the Fourier transform of the position wavefunction. A narrow packet in xx is wide in kk — the uncertainty principle!

Key formulas

Fourier series

f(x)=a02+∑n(ancos⁡nx+bnsin⁡nx)f(x)=\tfrac{a_0}{2}+\sum_n(a_n\cos nx+b_n\sin nx)

Square wave

4π∑n oddsin⁡nxn\frac4\pi\sum_{n\,odd}\frac{\sin nx}{n}

Fourier transform

f^(k)=∫f(x)e−ikxdx\hat f(k)=\int f(x)e^{-ikx}dx

Interactive simulation

Loading simulation…
PhET Interactive Simulations, University of Colorado Boulder (CC-BY 4.0)Open

Videos

But what is the Fourier Transform? — 3Blue1Brown
Search more on YouTube

Further resources

Check your understanding

1. A square wave contains…

Score: 0 / 1

My notes