Lecture Notes

9.1 Periodic Functions and Fourier Series

Processed February 27, 2026 at 09:38 AM
Download Original Handwritten Notes
PAGE 1

9.1 Periodic Functions and Fourier Series

revisit Taylor series \(\rightarrow\) break \(f(x)\) into its building blocks \(x^n\)

for example, \[e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \dots\]

\(\rightarrow\) to build \(e^x\) using \(x^n\), we need one part of 1, one part of \(x\), \(\frac{1}{2!}\) parts of \(x^n\), ...

\[\frac{1}{1-x} = 1 + x + x^2 + x^3 + \dots\]

to have a Taylor series, \(f(x)\) needs to be infinitely differentiable at \(x=a\)

these \(x^n\) are called basis functions

(analogy like \(\vec{i}, \vec{j}, \vec{k}\) we use to build any \(\mathbb{R}^3\) vector)

PAGE 2

Fourier series is very similar: instead of \( x^n \), the basis functions are now \( \cos(nx) \) and \( \sin(nx) \)

to have a Fourier series, \( f(x) \) need to be periodic and piecewise continuous smooth

a function \( f(x) \) is periodic w/ period \( T \) if

\[ f(x) = f(x+T) \]

for example, \( \sin(x) = \sin(x+2\pi) \)

A hand-drawn graph of a green sine wave on a Cartesian coordinate system. The horizontal x-axis is shown with a vertical y-axis. Points on the x-axis are marked as 'x', '2\pi', and 'x+2\pi'. A horizontal double-headed arrow labeled 'T=2\pi' spans the distance between two consecutive peaks of the wave, illustrating the period.
Figure: A hand-drawn graph of a green sine wave on a Cartesian coordinate system. The horizontal x-axis is shown with a vertical y-axis. Points on the x-axis are marked as 'x', '2\pi', and 'x+2\pi'. A horizontal double-headed arrow labeled 'T=2\pi' spans the distance between two consecutive peaks of the wave, illustrating the period.
\[ \sin(x) = \sin(x+2\pi) = \sin(x+4\pi) = \sin(x+6\pi) \]\[ = \dots = \sin(x+k \cdot 2\pi) \quad k=1, 2, 3, \dots \]

\( f(x) = f(x+T) = f(x+k \cdot T) \) any integer multiple of period is also a period

PAGE 3

the shortest period \( T \) is the fundamental period

what is \( T \) for \( \sin(3x) \)? \( T = \frac{2\pi}{3} \)

this is a periodic function that is piecewise smooth continuous

period \( 2\pi \)

A coordinate graph showing a periodic piecewise function f(x). The horizontal x-axis has tick marks at -pi, 0, pi, 2pi, 3pi, and 4pi. The vertical y-axis has a tick mark at 1. The function consists of horizontal segments. One segment is at y=1 from x=-pi to x=0, with an open circle at (-pi, 1) and a closed circle at (0, 1). The next segment is at y=0 from x=0 to x=pi, with an open circle at (0, 0) and a closed circle at (pi, 0). This pattern repeats every 2pi, creating a square wave.
Figure: A coordinate graph showing a periodic piecewise function f(x). The horizontal x-axis has tick marks at -pi, 0, pi, 2pi, 3pi, and 4pi. The vertical y-axis has a tick mark at 1. The function consists of horizontal segments. One segment is at y=1 from x=-pi to x=0, with an open circle at (-pi, 1) and a closed circle at (0, 1). The next segment is at y=0 from x=0 to x=pi, with an open circle at (0, 0) and a closed circle at (pi, 0). This pattern repeats every 2pi, creating a square wave.

\[ f(x) = \begin{cases} 1 & -\pi < x \le 0 \\ 0 & 0 < x \le \pi \end{cases} \] period \( 2\pi \)

(specify two half periods then state period)

this clunky function has a Fourier series (good because sines and cosines are easy to work with)

PAGE 4

Fourier series of \( f(x) \) with period \( 2\pi \) defined on \( -\pi < x < \pi \)

is

Annotation: \( a_0 = a_0 \cdot 1 = a_0 \cdot \cos(0x) \)

\[ f(x) = \frac{1}{2} a_0 + a_1 \cos(x) + a_2 \cos(2x) + a_3 \cos(3x) + \dots \]\[ + b_1 \sin(x) + b_2 \sin(2x) + b_3 \sin(3x) + \dots \]\[ = \frac{1}{2} a_0 + \sum_{n=1}^{\infty} a_n \cos(nx) + b_n \sin(nx) \]

(as a comparison, Taylor series is \( f(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!} (x-a)^n \))

how to find \( a_n \) and \( b_n \) ?

Some important properties of cosines and sines

\[ \int_{-\pi}^{\pi} \cos(\alpha x) \cos(\beta x) dx = \begin{cases} \pi & \text{if } \alpha = \beta \neq 0 \\ 2\pi & \text{if } \alpha = \beta = 0 \\ 0 & \text{if } \alpha \neq \beta \end{cases} \]\[ \int_{-\pi}^{\pi} \sin(\alpha x) \sin(\beta x) dx = \begin{cases} \pi & \text{if } \alpha = \beta \neq 0 \\ 0 & \text{if } \alpha \neq \beta \text{ or } \alpha = \beta = 0 \end{cases} \]
PAGE 5
\[ \int_{-\pi}^{\pi} \cos(\alpha x) \sin(\beta x) dx = 0 \text{ for all } \alpha, \beta \]

Cosines and sines are mutually orthogonal

\[ f(x) = \frac{1}{2} a_0 + a_1 \cos(x) + a_2 \cos(2x) + \dots + b_1 \sin(x) + b_2 \sin(2x) + \dots \]

multiply both sides by \( \cos(nx) \) and integrate over \( -\pi < x < \pi \)

\[ \begin{aligned} \int_{-\pi}^{\pi} f(x) \cos(nx) dx &= \int_{-\pi}^{\pi} \frac{1}{2} a_0 \cdot \cos(0x) \cos(nx) dx \\ &+ \int_{-\pi}^{\pi} a_1 \cos(x) \cos(nx) dx + \int_{-\pi}^{\pi} a_2 \cos(2x) \cos(nx) dx \\ &+ \dots + \int_{-\pi}^{\pi} b_1 \sin(x) \cos(nx) dx + \int_{-\pi}^{\pi} b_2 \sin(2x) \cos(nx) dx \\ &+ \dots \end{aligned} \]

go to 0 if \( n \neq 0, 1, 2, \dots \)

0

\[ = \int_{-\pi}^{\pi} a_n \cos(nx) \cos(nx) dx = a_n \cdot \pi \]
PAGE 6
\[ a_n = \frac{1}{\pi} \int_{-\pi}^{\pi} f(x) \cos(nx) dx \]

\( n=0, 1, 2, 3, \dots \)

likewise, if we multiply by \( \sin(nx) \) and integrate over \( -\pi < x < \pi \), we get

\[ b_n = \frac{1}{\pi} \int_{-\pi}^{\pi} f(x) \sin(nx) dx \]

\( n=1, 2, 3, \dots \)

let's try it on \( f(x) = \begin{cases} 1 & \text{if } -\pi < x < 0 \\ 0 & \text{if } 0 < x < \pi \end{cases} \) period \( 2\pi \)

\[ a_0 = \frac{1}{\pi} \int_{-\pi}^{\pi} f(x) dx = \frac{1}{\pi} \int_{-\pi}^{0} 1 \cdot dx = 1 \]

\[ a_n = \frac{1}{\pi} \int_{-\pi}^{\pi} f(x) \cos(nx) dx \]

\[ = \frac{1}{\pi} \int_{-\pi}^{0} \cos(nx) dx = \left. \frac{1}{n\pi} \sin(nx) \right|_{-\pi}^{0} = 0 \]

PAGE 7
\[ b_n = \frac{1}{\pi} \int_{-\pi}^{\pi} f(x) \sin(nx) dx = \frac{1}{\pi} \int_{-\pi}^{0} \sin(nx) dx \]\[ = -\frac{1}{n\pi} \cos(nx) \Big|_{-\pi}^{0} = -\frac{1}{n\pi} (1 - \cos(n\pi)) \]
  • \(-1\) if \(n\) is odd
  • \(1\) if \(n\) is even
  • \(\Rightarrow (-1)^n\)
\[ b_n = -\frac{1}{n\pi} (1 - (-1)^n) = \begin{cases} 0 & \text{if } n \text{ is even} \\ -\frac{2}{n\pi} & \text{if } n \text{ is odd} \end{cases} \]