Fourier Series
Table of Contents
1. Fourier Series
1.1. Definitions and Setup
The functions we will be working with are known as piecewise continuous on \([a, b]\), which is a function that is continuous at every point in \([a, b]\) except possibly for a finite number of jump discontinuities.
Additionally, recall that a function is periodic if there is some fixed positive number \(T\) for which \(f(x+T)=f(x)\) for all \(x\) in the domain of \(f\). The smallest positive value of \(T\) is known as the fundamental period. Examples of periodic functions include \(\sin x\) and \(\cos x\) with fundamental period \(2\pi\), and \(\tan x\) with fundamental period \(\pi\).
Next, note that:
\begin{align} \int_{-L}^L \sin\frac{m\pi x}{L}\cos\frac{n\pi x}{L}\text{ d}x &= 0 \\ \int_{-L}^L \sin\frac{m\pi x}{L}\sin\frac{n\pi x}{L}\text{ d}x &= \begin{cases} 0 & \text{for } m\neq n \\ L & \text{for } m = n\end{cases} \\ \int_{-L}^L \cos\frac{m\pi x}{L}\cos\frac{n\pi x}{L}\text{ d}x &= \begin{cases} 0 & \text{for } m\neq n \\ L & \text{for } m = n \neq 0 \\ 2L & \text{for } m = n = 0\end{cases} \end{align}This can be readily checked with the sum and difference angle identities: each integrand can be written as a sum of sines or cosines. Intuitively, since the integral integrates over a whole number of periods, we have an equal amount of area above and below the axis, which leads to a total area of zero when \(m \neq n\). These are known as the orthogonality conditions.
Now, consider the inner product
\begin{align} \langle f,g \rangle = \int_{-L}^L f(x)g(x) \text{ d}x \end{align}under the set \(\left\{\sin\left(\frac{m\pi x}{L}\right), \cos\left(\frac{n\pi x}{L}\right) \,\middle|\, m, n \in \mathbb{Z}\right\}\). Notice that because of the orthogonality conditions (1), (2), and (3), this is an orthogonal set: the inner product of any two distinct elements is zero.
1.2. Regular Fourier Series
Similar to how we can use Taylor series to express a function as a series of derivatives, we can use a Fourier series to express a piecewise continuous function as a particular trigonometric series. The Fourier series of \(f\), then, is the trigonometric series:
\begin{align} \boxed{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]} \end{align}The question of how to find the constants \(a_0, a_1, b_1, a_2, b_2, \dots\) remains. First, to determine \(a_0\), we can integrate both sides from \(-L\) to \(L\):
\begin{align} \int_{-L}^L f(x) \text{ d}x = \int_{-L}^L \frac{a_0}{2}\text{ d}x + \sum_{n=1}^{\infty}\left[a_n\int_{-L}^L\cos\left(\frac{n\pi x}{L}\right)\text{ d}x + b_n\int_{-L}^L\sin\left(\frac{n\pi x}{L}\right)\text{ d}x\right] \notag \end{align}The key here is to realize that since we are integrating the periodic functions \(\cos\) and \(\sin\) over a whole number of their periods, those integrals go to zero. Hence, we are left with:
\begin{align} \int_{-L}^L f(x)\text{ d}x &= \int_{-L}^L\frac{a_0}{2}\text{ d}x \notag \\ &= a_0L \notag \end{align}and so
\begin{align} \boxed{a_0 = \frac{1}{L}\int_{-L}^{L}f(x)\text{ d}x} \end{align}Next, to find the coefficient \(a_m\) when \(m \geq 1\), we multiply (5) by \(\cos\frac{m\pi x}{L}\) and integrate:
\begin{align} \int_{-L}^L f(x)\cos\left(\frac{m\pi x}{L}\right) \text{ d}x = \frac{a_0}{2}\int_{-L}^L\cos\left(\frac{m\pi x}{L}\right)\text{ d}x + \sum_{n=1}^{\infty}\left[a_n\int_{-L}^L\cos\left(\frac{n\pi x}{L}\right)\cos\left(\frac{m\pi x}{L}\right)\text{ d}x + b_n\int_{-L}^L\sin\left(\frac{n\pi x}{L}\right)\cos\left(\frac{m\pi x}{L}\right)\text{ d}x\right] \notag \end{align}We observe that due to the orthogonality conditions, the only one term out of the sum in the right-hand side that survives the integration is:
\begin{align} \int_{-L}^L f(x)\cos\left(\frac{m\pi x}{L}\right)\text{ d}x = a_mL \notag \end{align}Therefore, we have a formula for the coefficient \(a_m\):
\begin{align} \boxed{a_m = \frac{1}{L}\int_{-L}^Lf(x)\cos\left(\frac{m\pi x}{L}\right)\text{ d}x} \end{align}Doing the same steps, but multiplying with \(\sin\frac{m\pi x}{L}\) instead and integrating, yields a formula for the coefficient \(b_m\) as well:
\begin{align} \boxed{b_m = \frac{1}{L}\int_{-L}^Lf(x)\sin\left(\frac{m\pi x}{L}\right)\text{ d}x} \end{align}These formulas for \(a_m\) and \(b_m\) are known as the Euler-Fourier formulas.
1.3. Generalized Fourier Series
Fourier series are examples of orthogonal expansions. A set of functions \({f_n(x)}_{n=1}^{\infty}\) is an orthogonal system with respect to a nonnegative weight function \(w(x)\) on the interval \([a, b]\) if:
\begin{align} \int_a^b f_m(x)f_n(x)w(x) \text{ d}x = 0, \: \forall m \neq n \end{align}If we then define the norm of \(f\) as:
\begin{align} |f| = \sqrt{\int_a^b f^2(x)w(x)\text{ d}x} \end{align}Then we say the set of functions is an orthonormal system with respect to \(w(x)\) if it is an orthogonal system and also \(|f|=1\). We can obtain an orthonormal system from an orthogonal system by just dividing each function by its norm.
Given an orthogonal system \({f_n(x)}_{n=1}^{\infty}\), expressing a function \(f(x)\) in terms of these functions in the form \(f(x) = c_1f_1(x) + c_2f_2(x) + c_3f_3(x) + \cdots\) is known as an orthogonal expansion or a generalized Fourier series.
1.4. Fourier Cosine and Sine Series
If \(f(x)\) is an odd function, then by (7), all of the \(a_n\) terms go to zero due to symmetry and since an odd function times an even function is an odd function. Similarly, if \(f(x)\) is even, then all the \(b_n\) terms go to zero. Additionally, if a function \(f(x)\) is defined on \([0, L]\) only, we can extend it to the domain \([-L, L]\) such that the resulting function is odd.
Thus, when \(f(x)\) is even, we have the Fourier cosine series:
\begin{align} \boxed{f(x) = \frac{a_0}{2} + \sum_{n=1}^{\infty}a_n\cos\left(\frac{n\pi x}{L}\right), \: a_n = \frac{2}{L}\int_0^L f(x)\cos\left(\frac{n\pi x}{L}\right)\text{ d}x} \end{align}And, when \(f(x)\) is odd, we have the Fourier sine series:
\begin{align} \boxed{f(x) = \frac{b_0}{2} + \sum_{n=1}^{\infty}b_n\sin\left(\frac{n\pi x}{L}\right), \: b_n = \frac{2}{L}\int_0^L f(x)\sin\left(\frac{n\pi x}{L}\right)\text{ d}x} \end{align}