Fourier Series

Decomposition of periodic functions into harmonic frequency components via Fourier series expansions.

What it is

A Fourier series is the expansion of a periodic function f(t)f(t) of fundamental period TT into an infinite linear combination of mutually orthogonal sinusoidal basis functions: f(t)=a02+∑n=1∞[ancos⁡(nω0t)+bnsin⁡(nω0t)]f(t) = \frac{a_0}{2} + \sum_{n=1}^\infty \left[ a_n \cos(n \omega_0 t) + b_n \sin(n \omega_0 t) \right] where ω0=2π/T\omega_0 = 2\pi/T represents the fundamental angular frequency.

In complex exponential notation, it takes the equivalent and algebraically concise form: f(t)=∑n=−∞∞cneinω0tf(t) = \sum_{n=-\infty}^\infty c_n e^{i n \omega_0 t} where complex Fourier coefficients cnc_n are obtained by integral projection onto the orthogonal basis: cn=1T∫−T/2T/2f(t)e−inω0tdtc_n = \frac{1}{T} \int_{-T/2}^{T/2} f(t) e^{-i n \omega_0 t} dt Fourier series establish that any piecewise smooth periodic signal satisfying Dirichlet conditions can be decomposed uniquely into a discrete spectrum of harmonic frequencies that are integer multiples of ω0\omega_0.

Why it appears in physics

It appears in physics because the vast majority of periodic driving forces encountered in mechanics, thermal systems, and electronics (alternator magnetic fields, periodic engine piston thrust, rectified electrical waveforms, plucked harp strings) are nonsinusoidal profiles such as square waves, sawtooth ramps, or pulse trains.

Because linear physical systems are readily solved for pure harmonic inputs eiωte^{i\omega t}, decomposing an arbitrary periodic input f(t)f(t) into its Fourier series enables one to compute system responses for each harmonic nω0n\omega_0 independently and reassemble the net output via linear superposition. Furthermore, Parseval's theorem guarantees energy conservation: the total average power of the periodic waveform equals the sum of powers distributed across its individual harmonics.

Visual or geometric idea

Envision the space of periodic functions as an infinite-dimensional Hilbert vector space. Within this functional space, the set of functions cos⁡(nω0t)\cos(n\omega_0 t) and sin⁡(nω0t)\sin(n\omega_0 t) form a mutually orthogonal coordinate frame, precisely analogous to unit vectors i^,j^,k^\hat{i}, \hat{j}, \hat{k} in three-dimensional Euclidean geometry.

Computing a Fourier coefficient corresponds to projecting the state vector f(t)f(t) onto one of these harmonic axes using the functional inner product ⟨f,g⟩=∫f(t)g(t)dt\langle f, g \rangle = \int f(t) g(t) dt. The series reconstructs the original profile by summing vector components along every frequency direction. When approximating discontinuous signals (such as square waves) with truncated series, persistent ripples emerge near jump edges that refuse to vanish, overshooting by approximately 99%: this is the celebrated Gibbs phenomenon.

Minimal symbolic language

  • Trigonometric expansion: f(t)=a02+∑n=1∞[ancos⁡(nω0t)+bnsin⁡(nω0t)]f(t) = \frac{a_0}{2} + \sum_{n=1}^\infty [a_n \cos(n\omega_0 t) + b_n \sin(n\omega_0 t)].
  • Average (DC offset) component: a0=2T∫−T/2T/2f(t)dt=2c0a_0 = \frac{2}{T} \int_{-T/2}^{T/2} f(t) dt = 2 c_0.
  • Cosine Fourier coefficients: an=2T∫−T/2T/2f(t)cos⁡(nω0t)dta_n = \frac{2}{T} \int_{-T/2}^{T/2} f(t) \cos(n\omega_0 t) dt.
  • Sine Fourier coefficients: bn=2T∫−T/2T/2f(t)sin⁡(nω0t)dtb_n = \frac{2}{T} \int_{-T/2}^{T/2} f(t) \sin(n\omega_0 t) dt.
  • Complex exponential representation: f(t)=∑n=−∞∞cneinω0tf(t) = \sum_{n=-\infty}^\infty c_n e^{i n \omega_0 t}, with cn=1T∫−T/2T/2f(t)e−inω0tdtc_n = \frac{1}{T} \int_{-T/2}^{T/2} f(t) e^{-i n \omega_0 t} dt.
  • Coefficient conversions: cn=an−ibn2c_n = \frac{a_n - i b_n}{2}, c−n=cn∗=an+ibn2c_{-n} = c_n^* = \frac{a_n + i b_n}{2} (for real f(t)f(t)).
  • Parseval's identity (power conservation): 1T∫−T/2T/2∣f(t)∣2dt=∑n=−∞∞∣cn∣2=a024+12∑n=1∞(an2+bn2)\frac{1}{T} \int_{-T/2}^{T/2} |f(t)|^2 dt = \sum_{n=-\infty}^\infty |c_n|^2 = \frac{a_0^2}{4} + \frac{1}{2} \sum_{n=1}^\infty (a_n^2 + b_n^2).

What the result means

Each coefficient pair (an,bn)(a_n, b_n) or complex magnitude-phase pair cn=∣cn∣eiϕnc_n = |c_n| e^{i\phi_n} specifies the amplitude and phase of the nn-th harmonic frequency component. The sequence ∣cn∣|c_n| defines the discrete amplitude spectrum (quantifying the energetic weight of nω0n\omega_0), while ϕn\phi_n tracks the phase spectrum.

If a signal exhibits even parity (f(−t)=f(t)f(-t) = f(t)), all bnb_n vanish identically (pure cosine series). If it possesses odd parity (f(−t)=−f(t)f(-t) = -f(t)), all ana_n vanish (pure sine series). Moreover, the spectral decay rate as n→∞n \to \infty reflects signal smoothness: discontinuous jump profiles decay as O(1/n)O(1/n), piecewise continuous profiles with sharp corners decay as O(1/n2)O(1/n^2), and infinitely differentiable profiles decay exponentially.

When not to use it

Do not employ discrete Fourier series for non-periodic, isolated transients or single wave packets: Fourier series mathematically enforce infinite periodic replication across the entire real timeline. For non-repeating signals, one must transition to the continuous Fourier transform.

Additionally, beware of point evaluation at jump discontinuities: at a step discontinuity, the Fourier series converges to the midpoint average f(t+)+f(t−)2\frac{f(t^+) + f(t^-)}{2} and displays Gibbs ringing overshoots in the vicinity of the edge.

Operational summary

Determine the fundamental period TT and angular frequency ω0=2π/T\omega_0 = 2\pi/T. Exploit parity and symmetry properties (even   ⟹  bn=0\implies b_n = 0; odd   ⟹  an=0\implies a_n = 0; half-wave symmetry   ⟹  \implies only odd harmonics). Evaluate the DC average a0a_0 across one period. Integrate to compute ana_n and bnb_n (or cnc_n) using integration by parts. Write down the series expansion and apply Parseval's theorem to quantify total harmonic power retention.

Procedure

Before calculating

Verify that the signal is periodic, determine its fundamental period TT, and compute the base angular frequency ω0=2πT\omega_0 = \frac{2\pi}{T}.

Select the most advantageous integration domain: [0,T][0, T] or [−T/2,T/2][-T/2, T/2], exploiting symmetry around t=0t=0.

Step 1: identify the mathematical object

Inspect the function for parity and waveform symmetries:

  • If f(−t)=f(t)f(-t) = f(t) (even function), all bn=0b_n = 0; evaluate only a0a_0 and ana_n.
  • If f(−t)=−f(t)f(-t) = -f(t) (odd function), a0=0a_0 = 0 and all an=0a_n = 0; evaluate only bnb_n.
  • If f(t+T/2)=−f(t)f(t + T/2) = -f(t) (half-wave symmetry), all even harmonic orders vanish (a2k=b2k=0a_{2k} = b_{2k} = 0).

Step 2: choose the operation

Compute the DC baseline offset: a0=2T∫−T/2T/2f(t)dta_0 = \frac{2}{T} \int_{-T/2}^{T/2} f(t) dt.

Set up the general harmonic coefficient integrals: an=2T∫−T/2T/2f(t)cos⁡(nω0t)dta_n = \frac{2}{T} \int_{-T/2}^{T/2} f(t) \cos(n \omega_0 t) dt, bn=2T∫−T/2T/2f(t)sin⁡(nω0t)dtb_n = \frac{2}{T} \int_{-T/2}^{T/2} f(t) \sin(n \omega_0 t) dt.

Step 3: preserve units and signs

Take care when substituting boundary evaluation identities: cos⁡(nπ)=(−1)n\cos(n\pi) = (-1)^n and sin⁡(nπ)=0\sin(n\pi) = 0 for integer nn.

Never divide by nn before ensuring n≥1n \ge 1; always treat a0a_0 (n=0n=0) as a distinct integral.

Step 4: calculate

Perform integration by parts: ∫udv=uv−∫vdu\int u dv = u v - \int v du.

Factorize terms involving (−1)n(-1)^n, partitioning indices where appropriate into even (n=2kn = 2k) and odd (n=2k+1n = 2k + 1) cases.

Step 5: interpret the result

Write out the initial non-zero terms of the series expansion: f(t)≈a02+a1cos⁡(ω0t)+b1sin⁡(ω0t)+…f(t) \approx \frac{a_0}{2} + a_1 \cos(\omega_0 t) + b_1 \sin(\omega_0 t) + \dots

Apply Parseval's theorem to quantify the fraction of total signal energy contained within the first few dominant harmonics.

Self-check checklist

  • Did you exploit parity to eliminate half of the required integrations?
  • Did you evaluate a0a_0 independently to prevent divide-by-zero errors at n=0n=0?
  • Did you correctly use cos⁡(nπ)=(−1)n\cos(n\pi) = (-1)^n?
  • Does the series converge to the midpoint average at jump discontinuities?

Guided example

Physical situation

A periodic electronic waveform consists of a symmetric square wave of period T=2πT = 2\pi (so ω0=1 rad/s\omega_0 = 1\text{ rad/s}) and peak amplitude V0=1 VV_0 = 1\text{ V}, defined over [−π,π][-\pi, \pi] by: f(t)=−1 Vf(t) = -1\text{ V} for −π<t<0-\pi < t < 0, and f(t)=+1 Vf(t) = +1\text{ V} for 0<t<π0 < t < \pi. We want to derive its Fourier series expansion.

Mathematical translation

We note that f(−t)=−f(t)f(-t) = -f(t), so the waveform exhibits strict odd symmetry. Consequently, the DC baseline vanishes (a0=0a_0 = 0) and all cosine coefficients are identically zero (an=0a_n = 0 for all nn). We only need to calculate the sine coefficients bnb_n.

Step-by-step calculation

  1. Set up bnb_n for an odd function with period T=2πT = 2\pi: bn=2π∫0π(1)sin⁡(nt)dtb_n = \frac{2}{\pi} \int_0^\pi (1) \sin(n t) dt.
  2. Integrate the sine term: ∫0πsin⁡(nt)dt=[−cos⁡(nt)n]0π=−cos⁡(nπ)−1n=1−(−1)nn\int_0^\pi \sin(n t) dt = \left[ -\frac{\cos(n t)}{n} \right]_0^\pi = -\frac{\cos(n\pi) - 1}{n} = \frac{1 - (-1)^n}{n}.
  3. Substitute back into bnb_n: bn=2π1−(−1)nnb_n = \frac{2}{\pi} \frac{1 - (-1)^n}{n}.
  4. Analyze parity of harmonic index nn:
  • If nn is even (n=2,4,6,…n = 2, 4, 6, \dots): (−1)n=1  ⟹  1−1=0  ⟹  bn=0(-1)^n = 1 \implies 1 - 1 = 0 \implies b_n = 0.
  • If nn is odd (n=1,3,5,…n = 1, 3, 5, \dots): (−1)n=−1  ⟹  1−(−1)=2  ⟹  bn=4nπ(-1)^n = -1 \implies 1 - (-1) = 2 \implies b_n = \frac{4}{n\pi}.
  1. Reconstruct the Fourier series: f(t)=4π(sin⁡(t)+sin⁡(3t)3+sin⁡(5t)5+sin⁡(7t)7+… )f(t) = \frac{4}{\pi} \left( \sin(t) + \frac{\sin(3t)}{3} + \frac{\sin(5t)}{5} + \frac{\sin(7t)}{7} + \dots \right).

Reading the result

The square wave decomposes exclusively into odd harmonics whose amplitudes diminish as 1/n1/n. The fundamental harmonic (n=1n=1) possesses a peak amplitude of 4π≈1.273 V\frac{4}{\pi} \approx 1.273\text{ V}, which exceeds the 1 V1\text{ V} plateau; subsequent odd harmonics cancel out the crests to form flat square tops.

Common error avoided

We avoided performing tedious integrations for ana_n, leveraging odd parity to eliminate all cosine terms before computing.

Inverse example

Given result

The Fourier spectrum of a full-wave rectified AC power signal is given by: v(t)=2V0π−4V0π∑k=1∞cos⁡(2kω0t)4k2−1v(t) = \frac{2 V_0}{\pi} - \frac{4 V_0}{\pi} \sum_{k=1}^\infty \frac{\cos(2k \omega_0 t)}{4k^2 - 1}.

What physical question it can answer

It provides the design specifications for power supply smoothing filters: the desired DC voltage output is 2V0π\frac{2 V_0}{\pi}, while the primary unwanted ripple frequency occurs at twice the grid frequency (2ω0=100 Hz2\omega_0 = 100\text{ Hz} or 120 Hz120\text{ Hz}) with peak ripple amplitude 4V03π\frac{4 V_0}{3\pi}, dictating the required filter capacitor size to suppress residual AC hum.

Common errors

Error 1: omitting the 1/2 factor on the DC baseline term a0

It seems reasonable to write the trigonometric series as a0+∑(ancos⁡+bnsin⁡)a_0 + \sum (a_n \cos + b_n \sin). It fails because defining ana_n at n=0n=0 yields a0=2T∫f(t)dta_0 = \frac{2}{T} \int f(t) dt, which is precisely double the true mathematical average fˉ=1T∫f(t)dt\bar{f} = \frac{1}{T} \int f(t) dt. It is detected when the reconstructed signal exhibits a vertical DC offset twice as large as the original function. It is corrected by writing a02\frac{a_0}{2} explicitly in the series expansion or defining a0=1T∫f(t)dta_0 = \frac{1}{T} \int f(t) dt from the outset. Mini-example: for f(t)=5f(t) = 5, a0=10a_0 = 10, so the expansion must supply a02=5\frac{a_0}{2} = 5, not 1010.

Error 2: mishandling (-1)^n parity alternation in definite integration limits

It seems reasonable to assume (−1)n(-1)^n can be treated as a negative scalar constant across all terms. It fails because (−1)n=+1(-1)^n = +1 for even nn (2,4,62, 4, 6) and (−1)n=−1(-1)^n = -1 for odd nn (1,3,51, 3, 5), which alternately eliminates or doubles coefficient values. It is detected when series expansions retain even harmonics that should have canceled due to half-wave symmetry. It is corrected by explicitly evaluating n=2kn = 2k and n=2k+1n = 2k + 1 index branches. Mini-example: the factor 1−(−1)n1 - (-1)^n evaluates to 00 for even nn and 22 for odd nn; treating it as uniform produces spurious frequency components.

Error 3: assuming the fundamental angular frequency is always 1 rad/s

It seems reasonable to plug in cos⁡(nt)\cos(n t) and sin⁡(nt)\sin(n t) without rescaling time whenever the period T≠2πT \neq 2\pi. It fails because the orthogonal basis requires cos⁡(nω0t)=cos⁡(n2πTt)\cos(n \omega_0 t) = \cos(n \frac{2\pi}{T} t); omitting ω0\omega_0 distorts the spectral scale across all harmonics. It is detected by verifying whether the harmonic trigonometric argument period matches the actual system period TT. It is corrected by calculating ω0=2π/T\omega_0 = 2\pi/T before setting up integrals. Mini-example: for a 50 Hz50\text{ Hz} signal (T=0.02 sT = 0.02\text{ s}), the correct argument is n(100π)tn(100\pi)t, never ntnt.

Error 4: expecting the Gibbs phenomenon overshoot to disappear with high harmonic counts

It seems reasonable to assume that increasing series truncation from 10 to 1000 harmonics will flatten ringing spikes at jump edges down to zero. It fails because Dirichlet's theorem guarantees pointwise convergence, not uniform convergence across jump discontinuities: the spatial width of the overshoot narrows toward zero, but its peak amplitude remains stubbornly fixed at approximately 8.95%8.95\% of the jump height. It is detected by plotting high-order approximations and observing persistent edge spikes. It is corrected by recognizing this as an intrinsic mathematical property of Fourier bases, or applying Lanczos σ\sigma-factor smoothing windows. Mini-example: a square wave of height 1 will always display peak reconstruction ripples reaching 1.09 immediately preceding the step.

Error 5: omitting the 1/2 factor in Parseval's average power theorem

It seems reasonable to compute total average power by summing squared coefficients without scaling: P=a02+∑(an2+bn2)P = a_0^2 + \sum (a_n^2 + b_n^2). It fails because the cycle-averaged value of cos⁡2(nω0t)\cos^2(n\omega_0 t) and sin⁡2(nω0t)\sin^2(n\omega_0 t) over a full period is 1/21/2, not 1. It is detected when frequency-domain power doubles time-domain integration of ∣f(t)∣2|f(t)|^2. It is corrected by applying the exact Parseval relation: P=a024+12∑n=1∞(an2+bn2)P = \frac{a_0^2}{4} + \frac{1}{2} \sum_{n=1}^\infty (a_n^2 + b_n^2). Mini-example: for f(t)=cos⁡(t)f(t) = \cos(t), a1=1a_1 = 1, and average power is 12(1)2=0.5 W\frac{1}{2}(1)^2 = 0.5\text{ W}, not 1 W1\text{ W}.

Quick detection rule

If your DC term doubles the visual average of the signal waveform, if you omit the 1/21/2 factor when computing Parseval power, or if you omit ω0=2π/T\omega_0 = 2\pi/T in the trigonometric arguments, your Fourier series normalization contains errors.

Physical applications

1. Harmonic filtering in AC/DC power converters and power electronics

It appears when converting alternating current into direct current via diode bridge rectifiers. It is calculated by expanding the rectified periodic waveform into its Fourier series to isolate the desired DC voltage from unwanted AC ripple harmonics (2ω0,4ω0,…2\omega_0, 4\omega_0, \dots). The result establishes the required inductance and capacitance values in LC low-pass filters to suppress ripple voltages below regulatory noise thresholds. The dangerous error is designing the filter based purely on peak-to-peak time domain metrics without verifying which harmonic carries dominant spectral power. As a final check, the student must confirm that a second-order LC filter attenuates the dominant ripple harmonic as 1/ω21/\omega^2.

2. Musical acoustics and instrument timbre perception

It appears when investigating why an oboe, a clarinet, and a cello sound distinctly different while sounding the exact same musical note (identical fundamental frequency f0f_0). It is calculated by extracting the Fourier coefficient spectrum ∣cn∣|c_n| of each instrument's acoustic pressure waveform. The result demonstrates that timbre is governed by the relative power distribution among higher harmonics: flutes are dominated by the fundamental (n=1n=1), clarinets emphasize odd harmonics, and violins produce a rich, slowly decaying harmonic comb. The dangerous error is confusing pitch (determined by f0f_0) with timbre (dictated by the spectral weights ∣cn∣|c_n|). As a final check, the student must explain how additive audio synthesis reconstructs arbitrary instrumental sounds by superposing Fourier harmonics.

3. Periodic thermal diffusion and subsurface ground temperature cycles

It appears in geophysics and building thermodynamics when analyzing how day/night and seasonal annual temperature swings diffuse into the Earth's crust. It is calculated by expressing surface ambient temperature as a temporal Fourier series and solving the thermal diffusion equation ∂T∂t=α∂2T∂z2\frac{\partial T}{\partial t} = \alpha \frac{\partial^2 T}{\partial z^2} for each harmonic frequency. The result proves that each harmonic nω0n\omega_0 decays exponentially with depth according to its own penetration skin depth δn=2α/(nω0)\delta_n = \sqrt{2\alpha/(n\omega_0)}, accompanied by a depth-dependent phase lag. The dangerous error is applying a single penetration depth, ignoring that annual cycles penetrate much deeper than daily cycles. As a final check, the student must compute the depth at which seasonal temperature fluctuations arrive in exact phase opposition (summer heat arriving in subterranean winter).

4. Forced mechanical vibrations under nonsinusoidal periodic loads

It appears in mechanical engineering when assessing stress cycles in engine crankshafts, aircraft wings, and vehicle chassis subjected to cyclic non-sinusoidal impacts. It is calculated by decomposing the external periodic driving force into a Fourier series F(t)=∑Fneinω0tF(t) = \sum F_n e^{i n \omega_0 t} and solving for displacement as a superposition of harmonic responses x(t)=∑x~neinω0tx(t) = \sum \tilde{x}_n e^{i n \omega_0 t}. The result reveals that catastrophic resonance occurs not only when the fundamental frequency matches a structural natural frequency (ω0≈ωn\omega_0 \approx \omega_n), but whenever any higher Fourier harmonic aligns with a structural pole (nω0≈ωnn\omega_0 \approx \omega_n). The dangerous error is inspecting structural safety exclusively at the fundamental frequency while overlooking harmonic resonances. As a final check, the student must determine which harmonic index triggers structural excitation.

5. Nuclear Magnetic Resonance (NMR) and MRI medical imaging

It appears in magnetic resonance imaging (MRI) and chemical spectroscopy when perturbing atomic nuclei with periodic radiofrequency pulse sequences. It is calculated by recording the free induction decay (FID) signal and decomposing the nuclear precession response into its harmonic spectral components. The result yields a discrete frequency spectrum that reveals the chemical shift and local magnetic environment of hydrogen nuclei in organic molecules or human tissues. The dangerous error is confusing spectral line broadening caused by static magnetic field inhomogeneities with true chemical shifts. As a final check, the student must relate frequency peak separations in the Fourier spectrum to chemical shift values expressed in parts per million (ppm).

Practice

Level 1: recognition

Inspect the following periodic signals and state, without evaluating any integrals, which Fourier coefficients (a0,an,bna_0, a_n, b_n) vanish identically based purely on waveform symmetry: a) An even triangular wave f(t)=∣t∣f(t) = |t| for t∈[−π,π]t \in [-\pi, \pi]. b) An odd sawtooth wave f(t)=tf(t) = t for t∈[−π,π]t \in [-\pi, \pi]. c) A half-wave rectified sine wave (retaining only positive lobes).

Exercise: For the triangular wave, prove why all sine terms bnb_n must be zero.

Level 2: direct application

Find the Fourier series of the periodic sawtooth waveform f(t)=tf(t) = t defined over −π<t<π-\pi < t < \pi with period T=2πT = 2\pi.

Exercise: Evaluate the bnb_n coefficients using integration by parts and write down the first four non-zero terms of the series.

Level 3: choosing the tool

Compare the harmonic convergence of a continuous wave with sharp slope corners (triangular wave) against a wave with step jump discontinuities (square wave).

Exercise: Using the asymptotic decay rate of Fourier coefficients, explain why the triangular series converges as O(1/n2)O(1/n^2) far faster than the square wave (O(1/n)O(1/n)), and determine approximately how many harmonics each requires to encompass 95%95\% of total signal power.

Level 4: physical interpretation

Apply Parseval's theorem to the Fourier series of the square wave f(t)=4π∑k=0∞sin⁡((2k+1)t)2k+1f(t) = \frac{4}{\pi} \sum_{k=0}^\infty \frac{\sin((2k+1)t)}{2k+1}.

Exercise: Given that the average signal power is 12π∫−ππ(±1)2dt=1\frac{1}{2\pi} \int_{-\pi}^\pi (\pm 1)^2 dt = 1, equate this to the Parseval sum 12∑bn2\frac{1}{2} \sum b_n^2 and prove Euler's famous Basel-type series identity: ∑k=0∞1(2k+1)2=1+19+125+⋯=π28\sum_{k=0}^\infty \frac{1}{(2k+1)^2} = 1 + \frac{1}{9} + \frac{1}{25} + \dots = \frac{\pi^2}{8}.

Level 5: intentional error

A student computes the Fourier expansion of a discontinuous step signal and claims that truncating the series at 100 harmonics eliminates overshoot ringing near the jump edge.

Exercise: Explain why this assertion contradicts the Gibbs phenomenon, state the exact value to which the infinite series converges at the discontinuity point, and explain why the 9%9\% peak overshoot persists no matter how many harmonics are added.