Fourier series: The complex Fourier series
The complex Fourier series
For a 'neat' periodic function \(f(x)\) with period \(2L\) we have: \[f(x) = \frac{a_0}{2}+\sum_{n=1}^{\infty}\bigl(a_n\cos(n\omega x) +b_n\sin(n\omega x)\bigr)\] where \(\omega=\dfrac{\pi}{L}\) and the Fourier coefficients can be calculated with the following formulas: \[\begin{aligned} a_n &= \frac{1}{L}\int_{-L}^{L}f(x)\cos(n\omega x)\,\dd x\qquad\text{if }n=0,1,2,\ldots\\ \\ b_n &= \frac{1}{L}\int_{-L}^{L}f(x)\sin(n\omega x)\,\dd x \qquad\text{if }n=1,2,3,\ldots\end{aligned}\]
We pluck our courage and start describing the Fourier series in terms of complex numbers and functions. Using the known formulas of Euler \[\begin{aligned} e^{\,\mathrm{i}\,\varphi} &= \cos \varphi +\mathrm{i}\sin \varphi \\ \\ \cos \varphi &= \frac{e^{\,\mathrm{i}\,\varphi} + e^{-\mathrm{i}\,\varphi}}{2} \\ \\ \sin \varphi &= \frac{e^{\,\mathrm{i}\,\varphi} - \e^{-\mathrm{i}\,\varphi}}{2\,\mathrm{i}} \end{aligned}\] we can rewrite the Fourier series as \[\sum_{n = -\infty}^{\infty} \alpha_n \, \e^{\mathrm{i}n\omega x} = \cdots + \alpha_{-2}\e^{-2\mathrm{i}\omega x} + \alpha_{-1}\e^{-\mathrm{i}\omega x} + \alpha_0 + \alpha_{1}\e^{\mathrm{i}\omega x} + \alpha_{2}\e^{2\mathrm{i}\omega x} + \cdots \] which \[\begin{aligned} \alpha_0 &= \tfrac{1}{2}a_0 \\
\alpha_n &= \tfrac{1}{2}(a_n-\mathrm{i}\, b_n) & (n\ge 1) \\ \alpha_{-n} &= \tfrac{1}{2}(a_n+\mathrm{i}\, b_n) = \overline{\alpha_{n}} & (n\ge 1)\end{aligned}\] We call this the complex Fourier series, although the sum is actually a real function of \(x\), provided of course that \(f(x)\) itself is a neat periodic real function. We can express the coefficients \(\alpha_n\) as an integral of a complex function, too (if we assume that complex functions can also be integrated), namely \[\alpha_n = \frac{1}{2L}\int_{-L}^{L}f(x)e^{-\mathrm{i}n\omega x}\,\dd x\] After all \[\begin{aligned}\alpha_n &= \tfrac{1}{2}(a_n-\mathrm{i}\,b_n) \\ \\ &= \frac{1}{2}\left( \frac{1}{L}\int_{-L}^{L}f(x)\cos(n\omega x)\,\dd x -\mathrm{i}\frac{1}{L}\int_{-L}^{L}f(x)\sin(n\omega x)\,\dd x\right)\\ \\ &= \frac{1}{2L}\int_{-L}^{L}f(x)\bigl(\cos(n\omega x)-\mathrm{i}\,\sin(n\omega x)\bigr)\,\dd x \\ \\ &= \frac{1}{2L}\int_{-L}^{L} f(x)e^{-\mathrm{i}n\omega x}\,\dd x\end{aligned}\] If \(f(x)\) is a periodic function with period \(T\) then we can write this result in more compact form as \[\alpha_n=\frac{1}{T}\int_T f(x)e^{-\mathrm{i}n\omega x}\,\dd x\] where the \(T\) under the integral sign indicates that there is a 'full period', i.e., an interval of length \(T\), over which integration takes place; where the interval starts, does not matter due to the periodicity of \(f(x)\). The coefficients \(\alpha_n\) are called the complex Fourier coefficients. They are complex numbers, but the matching complex Fourier series is real. The reals Fourier coefficients can easily be calculated from the complex Fourier coefficients: \[a_n = 2\,\mathrm{Re}(\alpha_n)\quad\mathrm{and}\quad b_n = -2\,\mathrm{Im}(\alpha_n)\] It is also clear that the amplitude spectrum is made up of a scalar multiple of \(|\alpha_n|\) because \[|\alpha_n| = \tfrac{1}{2}\bigl|(a_n-\mathrm{i}\,b_n)\bigr|=\tfrac{1}{2}\sqrt{a_n^2+b_n^2}\tiny.\]
So far we have only rewritten the Fourier series in another form, in terms of complex numbers and complex functions. But what have we achieved by this? The main advantage seems to be that integration of complex functions is often much easier and we kill two birds with one stone: We simultaneously calculate the Fourier coefficient of the sine and cosine term.
In calculations, we often use the following property:
Integration property of complex e-powers \[\int_{-\pi}^{\pi} e^{\,\mathrm{i}nx}\,\dd x = \begin{cases} 2\pi & \text{if }n=0\\ 0 & \text{if }n\neq 0\end{cases}\]
Now let's consider two examples of calculations of Fourier series in order to appreciate the usefulness of calculating with complex numbers.
Example 1 We have another look at the very first example of the continuation of the periodic function \(f(x)=\tfrac{1}{2}x\) on the interval \((-\pi,\pi)\). Because \(\omega=1\), we have: \[\begin{aligned} \alpha_n &= \frac{1}{2\pi}\int_{-\pi}^{\pi}\tfrac{1}{2}xe^{-\mathrm{i}n x}\,\dd x \\ \\ &=\Bigl[ -\frac{1}{4\pi\mathrm{i}n}x e^{-\mathrm{i}n x}\Bigr]_{-\pi}^{\pi} +\frac{1}{4\pi\mathrm{i}n}\int_{-\pi}^{\pi} e^{-\mathrm{i}n x}\,\dd x\qquad\blue{\text{partial integration}}\\ \\ &= -\frac{1}{4\pi\mathrm{i}n}x\pi e^{-\mathrm{i}n\pi}-\frac{1}{4\pi\mathrm{i}n}\pi e^{\mathrm{i}n\pi} \qquad\blue{\text{because the integral is zero for }n\neq 0} \\ \\ &= \frac{\mathrm{i}}{2n}\left(\frac{e^{\mathrm{i}n\pi}+e^{-\mathrm{i}n\pi}}{2}\right)\\ \\ &= \frac{\mathrm{i}}{2n}\cos(n\pi) \\ \\ &= \frac{\mathrm{i}(-1)^n}{2n} \end{aligned}\] The result is an imaginary number and thus the real Fourier series is a sine series, and with coefficients \[b_n= -2\,\mathrm{Im}\left(\frac{\mathrm{i}(-1)^n}{2n}\right)= -\frac{(-1)^n}{n}=\frac{(-1)^{n+1}}{n}\]
Example 2 We consider the continuation of the periodic function \(f(x)=e^{- 2\pi x}\) on the interval \((0,1)\). Then \(T=1\) and \(\omega=2\pi\), and thus: \[\begin{aligned} \alpha_n &=\int_{0}^{1}e^{-2\pi x}e^{-2\pi n\mathrm{i} x}\,\dd x \\ &= \int_{0}^{1}e^{-2\pi(1+n\,\mathrm{i}) x}\,\dd x \\ \\ &= \Bigl[-\frac{1}{2\pi(1+n\,\mathrm{i})}e^{-2\pi(1+n\,\mathrm{i}) x} \Bigr]_0^1 \\ \\ &= -\frac{1}{2\pi(1+n\,\mathrm{i})}e^{-2\pi(1+n\,\mathrm{i})} + \frac{1}{2\pi(1+n\,\mathrm{i})}e^0 \\ \\ &= \frac{1}{2\pi(1+n\,\mathrm{i})}\left(1-e^{-2\pi}\right)\qquad\text{because }e^{-2\pi\mathrm{i}}=1\\ \\ &= \frac{1-e^{-2\pi}}{2\pi}\left(\frac{1}{n^2+1}-\frac{n}{n^2+1}\,\mathrm{i}\right)\end{aligned}\] The complex Fourier coefficient could easily be calculated and thus the real Fourier coefficients are known: \[a_n=\frac{1-e^{-2\pi}}{\pi(n^2+1)}\quad\mathrm{and}\quad b_n = \frac{n(1-e^{-2\pi})}{\pi(n^2+1)}\] The frequency-amplitude spectrum is also known when one determines the absolute value of the complex Fourier coefficients; this yields the following mapping: \[n\mapsto \frac{1-e^{-2\pi}}{2\pi\sqrt{n^2+1}}\] This calculation would have been much more complicated when we had not used complex numbers and functions.