Skip to content
Part IA Michaelmas, Lent, Easter Term

Fourier Series Definition

Periodic Functions

A function f(x)f(x) is periodic with period 2L2L if:

f(x+2L)=f(x)f(x + 2L) = f(x)

for all xx.


Example: Temperature Variation

Consider a function defined on Lx<L-L \leq x < L and extended periodically. Fourier series represent such functions as sums of sines and cosines.


The Fourier Series

If f(x)f(x) is periodic with period 2L2L and is “sufficiently nice” (piecewise continuous with finite discontinuities), then:

f(x)=a02+n=1[ancos(nπxL)+bnsin(nπxL)]f(x) = \frac{a_0}{2} + \sum_{n=1}^{\infty} \left[ a_n \cos\left(\frac{n\pi x}{L}\right) + b_n \sin\left(\frac{n\pi x}{L}\right) \right]


Fourier Coefficients

The coefficients are found by integration:

an=1LLLf(x)cos(nπxL)dxa_n = \frac{1}{L} \int_{-L}^{L} f(x) \cos\left(\frac{n\pi x}{L}\right) dx

bn=1LLLf(x)sin(nπxL)dxb_n = \frac{1}{L} \int_{-L}^{L} f(x) \sin\left(\frac{n\pi x}{L}\right) dx

For n=0n = 0:

a0=1LLLf(x)dxa_0 = \frac{1}{L} \int_{-L}^{L} f(x)\,dx

Interpretation: a0/2a_0/2 is the average value of ff over one period.


Orthogonality of Trig Functions

The Fourier coefficient formulas come from orthogonality:

LLcos(mπxL)cos(nπxL)dx={0mnLm=n\int_{-L}^{L} \cos\left(\frac{m\pi x}{L}\right) \cos\left(\frac{n\pi x}{L}\right) dx = \begin{cases} 0 & m \neq n \\ L & m = n \end{cases}

LLsin(mπxL)sin(nπxL)dx={0mnLm=n\int_{-L}^{L} \sin\left(\frac{m\pi x}{L}\right) \sin\left(\frac{n\pi x}{L}\right) dx = \begin{cases} 0 & m \neq n \\ L & m = n \end{cases}

LLcos(mπxL)sin(nπxL)dx=0\int_{-L}^{L} \cos\left(\frac{m\pi x}{L}\right) \sin\left(\frac{n\pi x}{L}\right) dx = 0

This is analogous to orthogonal vectors — the sines and cosines form an orthogonal “basis”.


Even and Odd Functions

Even Function: f(x)=f(x)f(-x) = f(x)

  • bn=0b_n = 0 for all nn (no sine terms)
  • f(x)=a02+ancos(nπxL)f(x) = \frac{a_0}{2} + \sum a_n \cos\left(\frac{n\pi x}{L}\right)

Odd Function: f(x)=f(x)f(-x) = -f(x)

  • an=0a_n = 0 for all nn (no cosine terms)
  • f(x)=bnsin(nπxL)f(x) = \sum b_n \sin\left(\frac{n\pi x}{L}\right)

Example: Triangle Wave

Find Fourier series for f(x)=xf(x) = |x| on 1x1-1 \leq x \leq 1, period 2.

Triangle wave over two periods, showing the periodic extension of |x|

Since ff is even: bn=0b_n = 0.

a0=11xdx=201xdx=1a_0 = \int_{-1}^{1} |x|\,dx = 2\int_0^1 x\,dx = 1

an=11xcos(nπx)dx=201xcos(nπx)dxa_n = \int_{-1}^{1} |x|\cos(n\pi x)\,dx = 2\int_0^1 x\cos(n\pi x)\,dx

Integration by parts: an=2n2π2[(1)n1]a_n = \frac{2}{n^2\pi^2}[(-1)^n - 1]

For nn even: an=0a_n = 0. For n=2k+1n = 2k+1 odd: an=4n2π2a_n = -\frac{4}{n^2\pi^2}.

Result:

x=124π2k=0cos((2k+1)πx)(2k+1)2|x| = \frac{1}{2} - \frac{4}{\pi^2}\sum_{k=0}^{\infty} \frac{\cos((2k+1)\pi x)}{(2k+1)^2}


Example: Sawtooth Wave

Find Fourier series for f(x)=xf(x) = x on 1<x<1-1 < x < 1, period 2.

Sawtooth wave over two periods, showing the periodic extension of y = x

Since ff is odd: an=0a_n = 0.

bn=11xsin(nπx)dxb_n = \int_{-1}^{1} x\sin(n\pi x)\,dx

Integration by parts: bn=2(1)n+1nπb_n = \frac{2(-1)^{n+1}}{n\pi}

Result:

x=2πn=1(1)n+1nsin(nπx)x = \frac{2}{\pi}\sum_{n=1}^{\infty} \frac{(-1)^{n+1}}{n}\sin(n\pi x)

=2π(sin(πx)12sin(2πx)+13sin(3πx))= \frac{2}{\pi}\left(\sin(\pi x) - \frac{1}{2}\sin(2\pi x) + \frac{1}{3}\sin(3\pi x) - \cdots\right)


Complex Form

Using Euler’s formula, Fourier series can be written:

f(x)=n=cneinπx/Lf(x) = \sum_{n=-\infty}^{\infty} c_n e^{in\pi x/L}

where:

cn=12LLLf(x)einπx/Ldxc_n = \frac{1}{2L}\int_{-L}^{L} f(x)e^{-in\pi x/L}\,dx

Relations: c0=a0/2c_0 = a_0/2, cn=(anibn)/2c_n = (a_n - ib_n)/2 for n>0n > 0.