Skip to content

Fourier Series

7.1 Definition

A Fourier series of a 2π2\pi-periodic function ff is

f(x)a02+n=1(ancos(nx)+bnsin(nx))f(x) \sim \frac{a_0}{2} + \sum_{n=1}^{\infty} \left(a_n \cos(nx) + b_n \sin(nx)\right)

Where

an=1πππf(x)cos(nx)dx,bn=1πππf(x)sin(nx)dxa_n = \frac{1}{\pi}\int_{-\pi}^{\pi} f(x)\cos(nx)\, dx, \quad b_n = \frac{1}{\pi}\int_{-\pi}^{\pi} f(x)\sin(nx)\, dx

7.2 Derivation of Fourier Coefficients

The Fourier coefficients are derived using the orthogonality relations on [π,π][-\pi, \pi]:

ππcos(mx)cos(nx)dx={πm=n02πm=n=00mn\int_{-\pi}^{\pi} \cos(mx)\cos(nx)\, dx = \begin{cases} \pi & m = n \neq 0 \\ 2\pi & m = n = 0 \\ 0 & m \neq n \end{cases}

ππsin(mx)sin(nx)dx={πm=n00mn\int_{-\pi}^{\pi} \sin(mx)\sin(nx)\, dx = \begin{cases} \pi & m = n \neq 0 \\ 0 & m \neq n \end{cases}

ππcos(mx)sin(nx)dx=0for  all  m,n\int_{-\pi}^{\pi} \cos(mx)\sin(nx)\, dx = 0 \quad \mathrm{for}\; all\; m, n

To find ana_nMultiply both sides of the Fourier expansion by cos(nx)\cos(nx) and integrate over [π,π][-\pi, \pi]. By orthogonality, all terms vanish except the cos(nx)\cos(nx) term, yielding anπ=ππf(x)cos(nx)dxa_n \pi = \int_{-\pi}^{\pi} f(x)\cos(nx)\, dx. Similarly for bnb_n.

7.3 Convergence

Theorem 7.1 (Dirichlet”s Theorem). If ff is 2π2\pi-periodic and piecewise smooth, its Fourier Series converges to:

  • f(x)f(x) at points where ff is continuous.
  • f(x+)+f(x)2\frac{f(x^+) + f(x^-)}{2} at jump discontinuities.

7.4 Parseval’s Identity

1πππf(x)2dx=a022+n=1(an2+bn2)\frac{1}{\pi}\int_{-\pi}^{\pi} |f(x)|^2\, dx = \frac{a_0^2}{2} + \sum_{n=1}^{\infty}(a_n^2 + b_n^2)

Intuition. Parseval’s identity is the infinite-dimensional analogue of the Pythagorean theorem: The “energy” of ff (its L2L^2 norm squared) equals the sum of the energies of its Fourier Components.

7.5 Sine and Cosine Series

For functions defined on [0,L][0, L]:

  • Cosine series (even extension): an=2L0Lf(x)cosnπxLdxa_n = \frac{2}{L}\int_0^L f(x)\cos\frac{n\pi x}{L}\, dx bn=0b_n = 0.
  • Sine series (odd extension): an=0a_n = 0 bn=2L0Lf(x)sinnπxLdxb_n = \frac{2}{L}\int_0^L f(x)\sin\frac{n\pi x}{L}\, dx.

7.6 Worked Example: Fourier Sine Series

Problem. Find the Fourier series of f(x)=xf(x) = x on (π,π)(-\pi, \pi)Extended 2π2\pi-periodically.

Solution. ff is odd, so an=0a_n = 0 for all nn.

bn=1πππxsin(nx)dx=2π0πxsin(nx)dxb_n = \frac{1}{\pi}\int_{-\pi}^{\pi} x\sin(nx)\, dx = \frac{2}{\pi}\int_0^{\pi} x\sin(nx)\, dx.

Integration by parts: u=xu = x, dv=sin(nx)dxdv = \sin(nx)\, dx:

bn=2π[xcos(nx)n0π+0πcos(nx)ndx]=2π[πcos(nπ)n+0]=2cos(nπ)n=2(1)n+1nb_n = \frac{2}{\pi}\left[-\frac{x\cos(nx)}{n}\Big|_0^{\pi} + \int_0^{\pi} \frac{\cos(nx)}{n}\, dx\right] = \frac{2}{\pi}\left[-\frac{\pi\cos(n\pi)}{n} + 0\right] = \frac{-2\cos(n\pi)}{n} = \frac{2(-1)^{n+1}}{n}.

x2n=1(1)n+1nsin(nx)x \sim 2\sum_{n=1}^{\infty} \frac{(-1)^{n+1}}{n}\sin(nx). \blacksquare

7.7 Worked Example: Fourier Cosine Series

Problem. Find the Fourier cosine series of f(x)=x2f(x) = x^2 on [0,π][0, \pi].

Solution

Solution. Extend ff as an even function on [π,π][-\pi, \pi]. Then bn=0b_n = 0 for all nn.

a0=2π0πx2dx=2ππ33=2π23a_0 = \frac{2}{\pi}\int_0^{\pi} x^2\, dx = \frac{2}{\pi} \cdot \frac{\pi^3}{3} = \frac{2\pi^2}{3}.

For n1n \geq 1: an=2π0πx2cos(nx)dxa_n = \frac{2}{\pi}\int_0^{\pi} x^2\cos(nx)\, dx.

Integrating by parts twice:

u=x2u = x^2, dv=cos(nx)dxdv = \cos(nx)\, dx: du=2xdxdu = 2x\, dx, v=sin(nx)/nv = \sin(nx)/n.

an=2π[x2sin(nx)n0π0π2xsin(nx)ndx]=4nπ0πxsin(nx)dxa_n = \frac{2}{\pi}\left[\frac{x^2\sin(nx)}{n}\Big|_0^{\pi} - \int_0^{\pi} \frac{2x\sin(nx)}{n}\, dx\right] = -\frac{4}{n\pi}\int_0^{\pi} x\sin(nx)\, dx

=4nπ[xcos(nx)n0π+0πcos(nx)ndx]= -\frac{4}{n\pi}\left[-\frac{x\cos(nx)}{n}\Big|_0^{\pi} + \int_0^{\pi} \frac{\cos(nx)}{n}\, dx\right]

=4nπ[πcos(nπ)n+0]=4cos(nπ)n2=4(1)nn2= -\frac{4}{n\pi}\left[-\frac{\pi\cos(n\pi)}{n} + 0\right] = \frac{4\cos(n\pi)}{n^2} = \frac{4(-1)^n}{n^2}.

x2π23+4n=1(1)nn2cos(nx)x^2 \sim \frac{\pi^2}{3} + 4\sum_{n=1}^{\infty} \frac{(-1)^n}{n^2}\cos(nx).

Setting x=0x = 0: 0=π23+4n=1(1)nn20 = \frac{\pi^2}{3} + 4\sum_{n=1}^{\infty} \frac{(-1)^n}{n^2}Giving the famous identity n=1(1)n+1n2=π212\sum_{n=1}^{\infty} \frac{(-1)^{n+1}}{n^2} = \frac{\pi^2}{12}. \blacksquare

7.8 Complex Fourier Series

Using Euler’s formula, the Fourier series can be written in complex form:

f(x)n=cneinxf(x) \sim \sum_{n=-\infty}^{\infty} c_n e^{inx}

Where cn=12πππf(x)einxdxc_n = \frac{1}{2\pi}\int_{-\pi}^{\pi} f(x)e^{-inx}\, dx.

The relationship with the real coefficients is c0=a0/2c_0 = a_0/2, cn=(anibn)/2c_n = (a_n - ib_n)/2 for n>0n > 0 And cn=cnc_{-n} = \overline{c_n} when ff is real-valued.

7.9 Worked Example: Parseval’s Identity

Problem. Using the Fourier series of f(x)=xf(x) = x on (π,π)(-\pi, \pi)Verify Parseval’s identity And deduce n=11n2=π26\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}.

Solution

Solution. From Section 7.6: a0=0a_0 = 0, an=0a_n = 0, bn=2(1)n+1nb_n = \frac{2(-1)^{n+1}}{n}.

Parseval: 1πππx2dx=n=1bn2=n=14n2\frac{1}{\pi}\int_{-\pi}^{\pi} x^2\, dx = \sum_{n=1}^{\infty} b_n^2 = \sum_{n=1}^{\infty} \frac{4}{n^2}.

1π2π33=4n=11n2\frac{1}{\pi} \cdot \frac{2\pi^3}{3} = 4\sum_{n=1}^{\infty} \frac{1}{n^2}.

2π23=4n=11n2\frac{2\pi^2}{3} = 4\sum_{n=1}^{\infty} \frac{1}{n^2}.

n=11n2=π26\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}. \blacksquare