4.6: Fourier series for even and odd functions
- Page ID
- 8352
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\dsum}{\displaystyle\sum\limits} \)
\( \newcommand{\dint}{\displaystyle\int\limits} \)
\( \newcommand{\dlim}{\displaystyle\lim\limits} \)
\( \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}}\)
\( \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}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\(\newcommand{\longvect}{\overrightarrow}\)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\ket}[1]{\left| #1 \right>}\)
\(\newcommand{\bra}[1]{\left< #1 \right|}\)
\(\newcommand{\braket}[2]{\left< #1 \vphantom{#2} \right| \left. #2 \vphantom{#1} \right>}\)
\(\newcommand{\braopket}[3]{\left< #1 \vphantom{#2}\vphantom{#3} \right| #2 \vphantom{#1}\vphantom{#3} \left| #3 \vphantom{#1}\vphantom{#2} \right>}\)
\(\newcommand{\qmvec}[1]{\mathbf{\vec{#1}}}\)
\(\newcommand{\op}[1]{\hat{\mathbf{#1}}}\)
\(\newcommand{\expect}[1]{\langle #1 \rangle}\)
\(\newcommand{\dfn}[1]{\emph{\textbf{#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.
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 \]

