Skip to main content
\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)
[ "article:topic", "authorname:nwalet", "license:ccbyncsa", "showtoc:no" ]
Mathematics LibreTexts

4.6: Fourier series for even and odd functions

  • Page ID
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    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.

    EVEn and odd

    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:

    1. The sum of two even functions is even, and of two odd ones odd.

    2. The product of two even or two odd functions is even.

    3. The product of an even and an odd function is odd.

    Exercise \(\PageIndex{1}\)

    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|\)


    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\] describes an even function (why?), and the Fourier sine series \[f(x) = \sum_{n=1}^\infty b_n \sin\frac{n\pi}{L}x\] 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}\)

    1. Continue \(f\) as an even function, so that \(f'(0)=0\).

    2. Continue \(f\) as an odd function, so that \(f(0)=0\).

    3. Neither of the two above. We now nothing about \(f\) at \(x=0\).

    Figure \(\PageIndex{1}\): A sketch of the possible ways to continue \(f\) beyond its definition region for \(0<x<L\). From left to right as even function, odd function or assuming no symmetry at all.

    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$.}\]

    Figure \(\PageIndex{2}\): The function \(y=1-x\).

    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}\] 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.\]