CHAPTER 2

Fourier Series

Any reasonable periodic wave is a sum of sines and cosines. You find how much of each frequency is inside it (the coefficients), then add them back up. Below, you can watch the sum build itself term by term.

2.1 Even and odd functions

Symmetry is your biggest shortcut. It kills half of the coefficients before you start.

Even · mirror in the y-axis\(f(-x)=f(x)\)
\(\int_{-a}^af\,dx=2\int_0^af\,dx\)
Examples: \(x^2,\ |x|,\ \cos x\)
Odd · rotate 180° about the origin\(f(-x)=-f(x)\)
\(\int_{-a}^af\,dx=0\)
Examples: \(x,\ x^3,\ \sin x\)
Split any function into an even part plus an odd part
f(x)f(−x) mirroreven part feodd part fo
Theorem 2.4 (like multiplying signs) even × even = even · odd × odd = even · even × odd = odd.
Every \(f\) splits as \(f=f_e+f_o\) with \(f_e=\frac{f(x)+f(-x)}2\) and \(f_o=\frac{f(x)-f(-x)}2\). For \(e^x\) that is \(\cosh x+\sinh x\).

2.2 Periodic and orthogonal functions

Why the coefficient formulas work: different harmonics cancel out when you integrate their product

Definitions 2.6–2.7\(f\) is p-periodic if \(f(x+p)=f(x)\). The smallest such \(p\) is the fundamental period. A constant has no fundamental period.
\(f,g\) are orthogonal on \([a,b]\) if \(\int_a^bf\,g\,dx=0\).
Orthogonality lab: the area of the product is 0 unless the frequencies match
firstsecondproduct (shaded area)
The table you getOver one period \(T\): \(\int\sin\cdot\sin=\int\cos\cdot\cos=0\) when \(n\ne m\). \(\int\sin\cdot\cos=0\) always. \(\int\sin^2=\int\cos^2=\frac T2\).

2.3 The Fourier series and its coefficients

Definition 2.9 for period \(2\pi\)

Fourier series \[f(x)\sim\frac{a_0}{2}+\sum_{n=1}^\infty\big(a_n\cos nx+b_n\sin nx\big)\] \[a_0=\frac1\pi\int_{-\pi}^{\pi}f\,dx,\quad a_n=\frac1\pi\int_{-\pi}^{\pi}f\cos nx\,dx,\quad b_n=\frac1\pi\int_{-\pi}^{\pi}f\sin nx\,dx\] \(\frac{a_0}{2}\) is the average value (the DC level). Any interval of length \(2\pi\) works for the integrals.
Fourier builder: add harmonics and watch the wave form
f(x) periodic extensionpartial sum SNnewest harmonic
aₙ (cos amounts)bₙ (sin amounts)
Gibbs phenomenonPick the square wave and push N to 60. The overshoot next to each jump never disappears. It stays near 9% of the jump size and just gets narrower.

Example 2.12 worked: f = x + x² on (−π, π)

Split it. \(x\) is odd, so it only feeds \(b_n\). \(x^2\) is even, so it only feeds \(a_0,a_n\).
\(a_0=\frac1\pi\int_{-\pi}^\pi x^2dx=\frac{2\pi^2}3\). Integrating by parts twice gives \(a_n=\frac2\pi\int_0^\pi x^2\cos nx\,dx=\frac{4(-1)^n}{n^2}\).
\(b_n=\frac2\pi\int_0^\pi x\sin nx\,dx=\frac{2(-1)^{n+1}}{n}\).
\(x+x^2=\frac{\pi^2}3+\sum\left(\frac{4(-1)^n}{n^2}\cos nx+\frac{2(-1)^{n+1}}{n}\sin nx\right)\)
At \(x=\pi\) there is a jump, from \(\pi+\pi^2\) on the left to \(-\pi+\pi^2\) on the right. Dirichlet says the series gives the average, \(\pi^2\). So \(\pi^2=\frac{\pi^2}{3}+4\sum\frac1{n^2}\), giving \(\boxed{\sum\frac1{n^2}=\frac{\pi^2}6}\).

2.4 Dirichlet conditions: what the series converges to

At a jump, the series always lands exactly halfway

Theorem 2.13If over one period \(f\) is absolutely integrable, has finitely many maxima and minima, and finitely many finite jumps, then the series converges to \[\frac{f(x^-)+f(x^+)}{2}\] At every point where \(f\) is continuous, this is just \(f(x)\).
Zoom into a jump: every partial sum passes through the midpoint
Example 2.14For \(f=x\) on \((-\pi,\pi)\), \(x=2\sum\frac{(-1)^{n+1}}n\sin nx\). At \(x=\pi\) the left limit is \(\pi\) and the right limit is \(-\pi\), so the series equals \(0\). Every \(\sin n\pi=0\) confirms it.

2.5 Piecewise functions, plus even and odd shortcuts

Split each integral at the break points. Use symmetry to skip work.

Odd f (2.6.1)\(a_0=a_n=0\)
\(b_n=\frac2\pi\int_0^\pi f\sin nx\,dx\)
The series has sines only.
Even f (2.6.2)\(b_n=0\)
\(a_n=\frac2\pi\int_0^\pi f\cos nx\,dx\)
The series has cosines only.
\(f=1\) on \((0,\pi)\) and \(-1\) on \((\pi,2\pi)\). This is odd about 0, so \(a_n=0\).
\(b_n=\frac1\pi\left[\int_0^\pi\sin nx\,dx-\int_\pi^{2\pi}\sin nx\,dx\right]=\frac{2(1-(-1)^n)}{n\pi}\). That is \(\frac4{n\pi}\) for odd \(n\) and 0 for even \(n\).
\(f=\frac4\pi\left(\sin x+\frac{\sin3x}3+\frac{\sin5x}5+\cdots\right)\). Pick "square wave" in the builder above to see it.
Triangle \(1\mp\frac{2x}\pi\) is even. \(a_0=0\) and \(a_n=\frac{4(1-(-1)^n)}{\pi^2n^2}\). At \(x=0\): \(1=\frac8{\pi^2}\sum_{odd}\frac1{n^2}\), so \(\sum\frac1{(2n-1)^2}=\frac{\pi^2}8\).

2.6 Half-range series

\(f\) is only given on \((0,\ell)\). You choose how to fill in \((-\ell,0)\).

Cosine series = even extension\[a_n=\frac2\ell\int_0^\ell f\cos\frac{n\pi x}\ell dx,\quad b_n=0\]
Sine series = odd extension\[b_n=\frac2\ell\int_0^\ell f\sin\frac{n\pi x}\ell dx,\quad a_n=0\]
Mirror or flip? Build the extension, then the series
given piece on (0, ℓ)extensionhalf-range series SN
Which one converges faster?An even extension of \(2x-1\) has no jumps, so its coefficients fall like \(1/n^2\). An odd extension creates jumps at \(0\) and \(\ell\), so they only fall like \(1/n\). Toggle and compare.

2.7 General period 2ℓ

Replace \(nx\) with \(\frac{n\pi x}{\ell}\) and \(\frac1\pi\) with \(\frac1\ell\)

Formula (2.3) \[f\sim\frac{a_0}2+\sum\left(a_n\cos\frac{n\pi x}\ell+b_n\sin\frac{n\pi x}\ell\right),\qquad a_n=\frac1\ell\int_{-\ell}^{\ell}f\cos\frac{n\pi x}\ell dx,\quad b_n=\frac1\ell\int_{-\ell}^{\ell}f\sin\frac{n\pi x}\ell dx\]
\(f=|x|\) on \((-2,2)\), so \(\ell=2\). It is even, so \(b_n=0\).
\(a_0=\frac22\int_0^2x\,dx=2\). \(a_n=\int_0^2x\cos\frac{n\pi x}2dx=\frac{4((-1)^n-1)}{n^2\pi^2}\).
\(|x|=1-\frac8{\pi^2}\left(\cos\frac{\pi x}2+\frac19\cos\frac{3\pi x}2+\cdots\right)\). Pick "|x|, period 4" in the builder.

2.8 Parseval's formula: energy in equals the sum of energies in each harmonic

The trick behind \(\sum 1/n^2\) and \(\sum 1/n^4\) questions

Parseval (2.4), period 2ℓ \[\frac1\ell\int_{-\ell}^{\ell}f^2\,dx=\frac{a_0^2}{2}+\sum_{n=1}^\infty\left(a_n^2+b_n^2\right)\] Half-range cosine: \(\frac2\ell\int_0^\ell f^2=\frac{a_0^2}2+\sum a_n^2\). Half-range sine: \(\frac2\ell\int_0^\ell f^2=\sum b_n^2\).
Energy bars: each harmonic adds its share until the total is reached
Take \(f=x^2\): \(a_0=\frac{2\pi^2}3\), \(a_n=\frac{4(-1)^n}{n^2}\), \(b_n=0\).
Left side: \(\frac1\pi\int_{-\pi}^\pi x^4dx=\frac{2\pi^4}5\).
Right side: \(\frac{1}{2}\cdot\frac{4\pi^4}9+16\sum\frac1{n^4}\).
\(16\sum\frac1{n^4}=\frac{2\pi^4}5-\frac{2\pi^4}9=\frac{8\pi^4}{45}\), so \(\boxed{\sum\frac1{n^4}=\frac{\pi^4}{90}}\).

2.9 Complex form of the Fourier series

One coefficient formula instead of three

Complex form \[f(x)\sim\sum_{n=-\infty}^{\infty}c_ne^{in\pi x/\ell},\qquad c_n=\frac1{2\ell}\int_{-\ell}^{\ell}f(x)e^{-in\pi x/\ell}dx\] Link to the real form: \(c_0=\frac{a_0}2\), \(c_n=\frac{a_n-ib_n}2\), \(c_{-n}=\frac{a_n+ib_n}2\).
Two-sided spectrum |cₙ| and the rebuilt signal

✓ Test yourself