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{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)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 \]


