Mathematical Methods II

\( \newcommand\C{\mathbb{C}} \newcommand\R{\mathbb{R}} \newcommand\Q{\mathbb{Q}} \newcommand\Z{\mathbb{Z}} \newcommand\N{\mathbb{N}} \newcommand\ve[1]{\boldsymbol{#1}} \newcommand\x{\ve{x}} \newcommand\r{\ve{r}} \newcommand\ppx[1]{\frac{\partial #1}{\partial x}} \newcommand\ppt[1]{\frac{\partial #1}{\partial t}} \newcommand\pp[3][]{\frac{\partial^{#1}{#2}}{\partial {#3}^{#1}}} \newcommand\ddx[1]{\frac{d #1}{d x}} \newcommand\ddt[1]{\frac{d #1}{d t}} \newcommand\dd[3][]{\frac{d^{#1}{#2}}{d {#3}^{#1}}} \newcommand\norm[1]{\left\lVert#1\right\rVert} \newcommand\grad[1]{\ve{\nabla}#1} \newcommand\divg[1]{\ve{\nabla}\cdot#1} \newcommand\curl[1]{\ve{\nabla}\times#1} \newcommand\lapl[1]{\nabla^2 #1} \newcommand\E[1]{\langle #1\rangle} \)

Fourier Series

Recall that the Fourier series of an integrable function \(f\) with period \(T\) is given by

\[ f(x) = \frac{a_0}{2} \,+\, \sum_{n = 1}^\infty a_n\cos\frac{2n\pi x}{T} \,+\, \sum_{n = 1}^\infty b_n\sin\frac{2n\pi x}{T}, \] where the Fourier coefficients \(a_n\) and \(b_n\) are given by \[ a_n = \frac{2}{T} \int_0^T f(x) \cos\frac{2n\pi x}{T} \:dx, \quad\quad b_n = \frac{2}{T} \int_0^T f(x) \sin\frac{2n\pi x}{T} \:dx.\]

Alternatively, we may write \[ f(x) = \sum_{n = -\infty}^\infty c_n e^{2\pi inx/T},\quad\quad c_n = \frac{1}{T}\int_0^T f(x)\, e^{-2\pi inx/T} \:dx.\] This follows because \[ \frac{1}{2\pi}\int_0^{2\pi} e^{in\varphi} \:d\varphi = \begin{cases}1, & \text{if }\, n = 0 \\ 0, & \text{if }\, n \neq 0 \end{cases} \]

The coefficients \(a_n, b_n, c_n\) are related as follows. \[ c_n = \begin{cases} \frac{1}{2}a_n - \frac{1}{2}ib_n, & n \geq 1 \\ \frac{1}{2}a_0, & n = 1 \\ \frac{1}{2}a_{|n|} + \frac{1}{2}ib_{|n|}, & n \leq 1 \end{cases},\quad\quad a_n = 2\operatorname{Re}c_n, \quad b_n = -2\operatorname{Im}c_n. \]

Average value of a function

The mean value of \(f\) on a domain \((a, b)\) is defined as \[ \E{f} = \frac{1}{b - a}\int_a^b f(t)\: dt.\] Note that for a periodic function, this is precisely the constant term in its Fourier series, namely \(a_0 /2\) or \(c_0\).

For example, the averages of the square of the sine and cosine functions are \[ \frac{1}{2\pi}\int_0^{2\pi} \sin^2{t}\:dt = \frac{1}{2\pi}\int_0^{2\pi} \cos^2{t}\:dt = \frac{1}{2}. \]

A curious case arises for products of sinusoidal functions. \[ \begin{align} \frac{1}{2\pi}\int_0^{2\pi} \sin{mx}\sin{nx}\:dt &= \begin{cases}\frac{1}{2}, & \text{if }\, m = n \neq 0 \\ 0, & \text{if }\, m \neq n \text{ or } m = n = 0 \end{cases} \\ \frac{1}{2\pi}\int_0^{2\pi} \cos{mx}\cos{nx}\:dt &= \begin{cases} 1, & \text{if }\, m = n = 0 \\ \frac{1}{2}, & \text{if }\, m = n \neq 0 \\ 0, & \text{if }\, m \neq n \\ \end{cases} \\ \frac{1}{2\pi}\int_0^{2\pi} \sin{mx}\cos{nx}\:dt &= 0. \end{align} \] We thus define the inner product for two functions \(f\) and \(g\) over an interval \([a, b]\). \[ \E{f, g} = \frac{1}{b - a}\int_a^b f(t)g(t)\:dt. \]

It can be shown that if \(f\) is periodic on \([-\pi, +\pi]\), then \(\E{f^2} = \sum_{n=-\infty}^{+\infty} |c_n|^2\). This is called Parseval's identity. For example, consider \(f\colon [-\pi, +\pi] \to \R\), \(f(x) = x\). We see that \[ \E{f^2} = \frac{1}{2\pi}\int_{-\pi}^{+\pi} x^2\: dx = \frac{\pi^2}{3}\] Expanding \(f\) as a Fourier series gives \[ c_n = \frac{1}{2\pi}\int_{-\pi}^{+\pi} xe^{inx}\:dx = \frac{1}{2\pi n^2}(1 + inx)e^{-inx}\Big|_{-\pi}^{+\pi} = \begin{cases} (-1)^n i/n^2, &n\neq 0, \\ 0, & n = 0. \end{cases} \] Thus, we obtain \[ \frac{1}{2}\sum_{n = -\infty}^{+\infty}|c_n|^2 = \sum_{n = 1}^\infty \frac{1}{n^2}= \frac{\pi^2}{6}. \]

Even and odd functions

A function \(f\) is even if \(f(x) = f(-x)\), and \(f\) is odd if \(f(x) = -f(-x)\).

Any function \(f\) can be written as the sum of an even and an odd function. Note that \[ f(x) \;=\; \frac{1}{2}[f(x) + f(-x)] \,+\, \frac{1}{2}[f(x) - f(-x)]. \] The first term is even, and the second is odd.

For a periodic function with period \(T\), this immediately gives \[ \int_0^T f(t)\:dt = \begin{cases}0, & f\text{ is odd} \\ 2\int_0^{T/2} f(t)\:dt, & f\text{ is even} \\\end{cases} \]