Skip to main content
Mathematics LibreTexts

9.3: Fourier Series

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

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

    \( \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{\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}\)

    View tutorial on YouTube

    Our solution of the diffusion and wave equations will require use of a Fourier series. A periodic function \(f(x)\) with period \(2L\), can be represented as a Fourier series in the form \[\label{eq:1}f(x)=\frac{a_0}{2}+\sum\limits_{n=1}^\infty\left(a_n\cos\frac{n\pi x}{L}+b_n\sin\frac{n\pi x}{L}\right).\]

    Determination of the coefficients \(a_0,\: a_1,\: a_2,\ldots\) and \(b_1,\: b_2,\: b_3,\ldots\) makes use of orthogonality relations for sine and cosine. We first define the widely used Kronecker delta \(\delta_{nm}\) as \[\delta_{nm}=\left\{\begin{array}{rl}1&\text{if }n=m; \\ 0&\text{otherwise.}\end{array}\right.\nonumber\]

    The orthogonality relations for \(n\) and \(m\) positive integers are then given with compact notation as the integration formulas \[\label{eq:2} \int_{-L}^L\cos\left(\frac{m\pi x}{L}\right)\cos\left(\frac{n\pi x}{L}\right)dx=L\delta_{nm},\] \[\label{eq:3}\int_{-L}^L\sin\left(\frac{m\pi x}{L}\right)\sin\left(\frac{n\pi x}{L}\right)dx=L\delta_{nm},\] \[\label{eq:4}\int_{-L}^L\cos\left(\frac{m\pi x}{L}\right)\sin\left(\frac{n\pi x}{L}\right)dx=0.\]

    To illustrate the integration technique used to obtain these results, we derive \(\eqref{eq:3}\) assuming that \(n\) and \(m\) are positive integers with \(n\neq m\). Changing variables to \(ξ = \pi x/L\), we obtain \[\begin{aligned}\int_{-L}^L\sin&\left(\frac{m\pi x}{L}\right)\sin\left(\frac{n\pi x}{L}\right)dx \\ &=\frac{L}{\pi}\int_{-\pi}^\pi\sin(m\xi)\sin(n\xi)d\xi \\ &=\frac{L}{2\pi}\int_{-\pi}^\pi [\cos ((m-n)\xi)-\cos((m+n)\xi)]d\xi \\ &=\frac{L}{2\pi}\left[\frac{1}{m-n}\sin((m-n)\xi)-\frac{1}{m+n}\sin((m+n)\xi)\right]_{-\pi}^\pi \\ &=0.\end{aligned}\]

    For \(m=n\), however, \[\begin{aligned}\int_{-L}^L\sin^2\left(\frac{n\pi x}{L}\right)dx&=\frac{L}{\pi}\int_{-\pi}^\pi\sin^2(n\xi)d\xi \\ &=\frac{L}{2\pi}\int_{-\pi}^\pi(1-\cos(2n\xi))d\xi \\ &=\frac{L}{2\pi}\left[\xi-\frac{1}{2n}\sin 2n\xi\right]_{-\pi}^\pi \\ &=L.\end{aligned}\]

    Integration formulas given by \(\eqref{eq:2}\) and \(\eqref{eq:4}\) can be similarly derived.

    To determine the coefficient \(a_n\), we multiply both sides of \(\eqref{eq:1}\) by \(\cos (n\pi x/L)\) with \(n\) a nonnegative integer, and change the dummy summation variable from \(n\) to \(m\). Integrating over \(x\) from \(−L\) to \(L\) and assuming that the integration can be done term by term in the infinite sum, we obtain \[\begin{aligned}\int_{-L}^Lf(x)\cos &\frac{n\pi x}{L}dx=\frac{a_0}{2}\int_{-L}^L\cos\frac{n\pi x}{L}dx \\ &+\sum\limits_{m=1}^\infty\left\{a_m\int_{-L}^L\cos\frac{n\pi x}{L}\cos\frac{m\pi x}{L}dx+b_m\int_{-L}^L\cos\frac{n\pi x}{L}\sin\frac{m\pi x}{L}dx\right\}.\end{aligned}\]

    If \(n = 0\), then the second and third integrals on the right-hand-side are zero and the first integral is \(2L\) so that the right-hand-side becomes \(La_0\). If \(n\) is a positive integer, then the first and third integrals on the right-hand-side are zero, and the second integral is \(L\delta_{nm}\). For this case, we have \[\begin{aligned}\int_{-L}^Lf(x)\cos\frac{n\pi x}{L}dx&=\sum\limits_{m=1}^\infty La_m\delta_{nm} \\ &=La_n,\end{aligned}\] where all the terms in the summation except \(m = n\) are zero by virtue of the Kronecker delta. We therefore obtain for \(n = 0, 1, 2,\ldots\) \[\label{eq:5}a_n=\frac{1}{L}\int_{-L}^L f(x)\cos\frac{n\pi x}{L}dx.\]

    To determine the coefficients \(b_1,\: b_2,\: b_3,\ldots\), we multiply both sides of \(\eqref{eq:1}\) by \(\sin (n\pi x/L)\), with \(n\) a positive integer, and again change the dummy summation variable from \(n\) to \(m\). Integrating, we obtain \[\begin{aligned}\int_{-L}^L f(x)\sin &\frac{n\pi x}{L}dx=\frac{a_0}{2}\int_{-L}^L\sin\frac{n\pi x}{L}dx \\ &+\sum\limits_{m=1}^\infty\left\{a_m\int_{-L}^L\sin\frac{n\pi x}{L}\cos\frac{m\pi x}{L}dx+b_m\int_{-L}^L\sin\frac{n\pi x}{L}\sin\frac{m\pi x}{L}dx\right\}.\end{aligned}\]

    Here, the first and second integrals on the right-hand-side are zero, and the third integral is \(L\delta_{nm}\) so that \[\begin{aligned}\int_{-L}^L f(x)\sin\frac{n\pi x}{L}dx&=\sum\limits_{m=1}^\infty Lb_m\delta_{nm} \\ &=Lb_n.\end{aligned}\]

    Hence, for \(n = 1,\: 2,\: 3,\ldots\), \[\label{eq:6}b_n=\frac{1}{L}\int_{-L}^L f(x)\sin\frac{n\pi x}{L}dx.\]

    Our results for the Fourier series of a function \(f(x)\) with period \(2L\) are thus given by \(\eqref{eq:1}\), \(\eqref{eq:5}\) and \(\eqref{eq:6}\).


    This page titled 9.3: Fourier Series is shared under a CC BY 3.0 license and was authored, remixed, and/or curated by Jeffrey R. Chasnov via source content that was edited to the style and standards of the LibreTexts platform.