How Math Works
Analysis & Calculusformulaadvanced

Fourier Series

β€œA Fourier series is the declaration that 'even the most complex wave is a sum of pure tones (sines and cosines)'.”

The formula

f(x) = aβ‚€/2 + Ξ£β‚™ (aβ‚™ cos nx + bβ‚™ sin nx)

How to read it: Any repeating waveform can be built by adding up sine and cosine pure tones of different frequencies, each with the right amount

aβ‚™, bβ‚™
β€” The amount (coefficient) of each frequency β€” 'how much of that pure tone is mixed in'
n
β€” Harmonic number β€” how many times the base frequency
aβ‚€/2
β€” The average (DC) level β€” the up-down center height of the waveform

The hook

No matter how jagged and complicated, a repeating waveform is really just several smooth sine waves stacked in the right amounts β€” that was Fourier's astonishing discovery.

In plain words

A periodic function can be written exactly as a sum of sines and cosines whose frequencies are integer multiples of a base. You only need to decide how much of each pure tone goes in (the coefficients aβ‚™, bβ‚™).

The intuition

Think of an orchestra β€” a rich chord is many instruments' pure tones overlapping. A Fourier series does the reverse: it hears a given complex waveform and decomposes it into 'how much of each pure tone is present'. Low frequencies carry the broad outline; high frequencies carry the sharp detail (the corners).

How it's built

Each term aβ‚™cos nx + bβ‚™sin nx is a pure tone of frequency n, with amplitude aβ‚™, bβ‚™. Larger n means a faster-wiggling high pitch. Adding infinitely many of them converges to the original waveform (series convergence). The aβ‚€/2 term sets the overall average height (any up-down offset).

Example

A square wave swinging between Β±1 is built from odd frequencies only: f(x) = (4/Ο€)(sin x + (1/3)sin 3x + (1/5)sin 5x + …). The first term's amplitude is 4/Ο€ β‰ˆ 1.27, the next is 1/3 of it, then 1/5… As you add terms, the smooth sines edge closer to the sharp-cornered square.

Common mistake

It is tempting to doubt 'how can smooth sines make a sharp corner?'. A finite number cannot make an exact corner (a small overshoot lingers near it β€” the Gibbs phenomenon), but the infinite sum converges arbitrarily close. A sum of smoothness produces sharpness.

Where it's used

MP3 and JPEG compression (keep only the important frequencies), audio and image processing, signal analysis in electrical circuits, solving the heat equation, wavefunctions in quantum mechanics β€” the universal tool for translating signals into the 'language of frequency'.

Where it came from

In 1807 Joseph Fourier, solving heat flow, claimed 'any function can be written as a sum of trigonometric functions'. Contemporaries (Lagrange and others) disbelieved him, but it ultimately opened an era of analysis.

Prerequisites

Quick check

A Fourier series builds a function as a sum of what?

  • polynomials
  • sines and cosinesβœ“
  • exponentials only
  • random noise

Practice

In the square-wave Fourier series (4/Ο€)(sin x + sin3x/3 + sin5x/5 + …), which frequencies (harmonics) appear?

Answer: 2

Solution:
  1. The term numbers are 1, 3, 5, … i.e. only odd ones
  2. The even harmonics (sin 2x, sin 4x…) have coefficient 0
  3. So only odd harmonics

Takeaway: By symmetry, a square wave needs only odd frequencies.

In the square-wave series (4/Ο€)(sin x + …), find the amplitude (coefficient) of the first term sin x.

Answer: 1.27

Solution:
  1. The first term's coefficient is 4/Ο€
  2. 4 Γ· 3.14159… β‰ˆ 1.273

Takeaway: The first (fundamental) frequency has the largest amplitude: 4/Ο€ β‰ˆ 1.27.

Find the average value (DC component aβ‚€/2) of a square wave swinging symmetrically between Β±1.

Answer: 0

Solution:
  1. The time at +1 and the time at βˆ’1 are exactly equal
  2. Average = (+1 + (βˆ’1))/2 = 0

Takeaway: An up-down symmetric waveform has average (aβ‚€/2) of 0 β€” expressible with sines alone.

Explain in your notebook how adding infinitely many smooth sines produces the 'sharp corner' of a square wave.

Answer: undefined

Solution:
  1. Low frequencies carry the broad outline; high frequencies carry rapid change (the corners)
  2. Adding more terms makes the edge ever steeper, approaching a step
  3. A finite sum leaves a small overshoot beside the corner (Gibbs phenomenon), but the infinite sum converges arbitrarily close

Takeaway: High-frequency terms overlap to sculpt 'rapid change = a corner' β€” the more you add, the sharper.

Keep learning in the app

Touch-and-drag widgets, self-graded practice and daily formulas β€” free on iOS and Android.