4.6: Fourier series for even and odd functions
- Page ID
- 8352
Notice that in the Fourier series of the square wave (4.5.3) all coefficients \(a_n\) vanish, the series only contains sines. This is a very general phenomenon for so-called even and odd functions.
A function is called even if \(f(-x)=f(x)\), e.g. \(\cos(x)\).
A function is called odd if \(f(-x)=-f(x)\), e.g. \(\sin(x)\).
These have somewhat different properties than the even and odd numbers:
- The sum of two even functions is even, and of two odd ones odd.
- The product of two even or two odd functions is even.
- The product of an even and an odd function is odd.
Which of the following functions is even or odd?
a) \(sin (2 x)\), b) \(sin ( x) cos ( x)\), c) \(tan ( x)\), d) \(x^2\), e) \(x^3\), f) \(|x|\)
- Answer
-
even: d, f; odd: a, b, c, e.
Now if we look at a Fourier series, the Fourier cosine series \[f(x) = \frac{a_0}{2} + \sum_{n=1}^\infty a_n \cos\frac{n\pi}{L}x \nonumber \] describes an even function (why?), and the Fourier sine series \[f(x) = \sum_{n=1}^\infty b_n \sin\frac{n\pi}{L}x \nonumber \] an odd function. These series are interesting by themselves, but play an especially important rôle for functions defined on half the Fourier interval, i.e., on \([0,L]\) instead of \([-L,L]\). There are three possible ways to define a Fourier series in this way, see Fig. \(\PageIndex{1}\)
- Continue \(f\) as an even function, so that \(f'(0)=0\).
- Continue \(f\) as an odd function, so that \(f(0)=0\).
Of course these all lead to different Fourier series, that represent the same function on \([0,L]\). The usefulness of even and odd Fourier series is related to the imposition of boundary conditions. A Fourier cosine series has \(df/dx = 0\) at \(x=0\), and the Fourier sine series has \(f(x=0)=0\). Let me check the first of these statements: \[\frac{d}{dx} \left[\frac{a_0}{2} + \sum_{n=1}^\infty a_n \cos\frac{n\pi}{L}x \right] = -\frac{\pi}{L}\sum_{n=1}^\infty n a_n \sin\frac{n\pi}{L}x =0\quad\text{at $x=0$.} \nonumber \]
As an example look at the function \(f(x) = 1-x\), \(0 \leq x \leq 1\), with an even continuation on the interval \([-1,1]\). We find \[\begin{aligned} a_0 & = \frac{2}{1} \int_0^1 (1-x) dx = 1 \nonumber\\ a_n &= 2 \int_0^1 (1-x) \cos n\pi x dx\nonumber\\ &= \left.\left\{ \frac{2}{n\pi} \sin n\pi x - \frac{2}{n^2\pi^2} [\cos n\pi x + n \pi x \sin n\pi x] \right\} \right|_0^1 \nonumber\\&= \begin{cases} 0 & \text{if $n$ even}\\ \frac{4}{n^2\pi^2}&\text{if $n$ is odd} \end{cases}\quad.\end{aligned} \nonumber \] So, changing variables by defining \(n=2m+1\) so that in a sum over all \(m\) \(n\) runs over all odd numbers, \[f(x) = \frac{1}{2} + \frac{4}{\pi^2}\sum_{m=0}^{\infty} \frac{1}{(2m+1)^2} \cos(2m+1)\pi x. \nonumber \]