Calculus

Fourier Series

Fourier Series Logo

Fourier Series of Functions with an Arbitrary Period

  • Fourier Series Expansion on the Interval \(\left[ { – L,L} \right]\)

    We assume that the function \(f\left( x \right)\) is piecewise continuous on the interval \(\left[ { – L,L} \right].\) Using the substitution \(x = \) \({\large\frac{{Ly}}{\pi }\normalsize}\) \(\left( { – \pi \le x \le \pi } \right)\), we can transform it into the function

    \[F\left( y \right) = f\left( {\frac{{Ly}}{\pi }} \right),\]

    which is defined and integrable on \(\left[ { – \pi ,\pi } \right].\) Fourier series expansion of this function \(F\left( y \right)\) can be written as

    \[
    {F\left( y \right) = f\left( {\frac{{Ly}}{\pi }} \right) }
    = {\frac{{{a_0}}}{2} }+{ \sum\limits_{n = 1}^\infty {\left( {{a_n}\cos ny + {b_n}\sin ny} \right)} .}
    \]

    The Fourier coefficients for the function are given by

    \[{a_0} = \frac{1}{\pi }\int\limits_{ – \pi }^\pi {F\left( y \right)dy} ,\]

    \[
    {{a_n} = \frac{1}{\pi }\int\limits_{ – \pi }^\pi {F\left( y \right)\cos nydy} }
    = {\frac{1}{\pi }\int\limits_{ – \pi }^\pi {f\left( {\frac{{Ly}}{\pi }} \right)\cos nydy} ,}
    \]

    \[
    {{b_n} = \frac{1}{\pi }\int\limits_{ – \pi }^\pi {F\left( y \right)\sin nydy} }
    = {\frac{1}{\pi }\int\limits_{ – \pi }^\pi {f\left( {\frac{{Ly}}{\pi }} \right)\sin nydy} ,\;\;}\kern-0.3pt
    {n = 1,2,3, \ldots }
    \]

    Returning to the initial variables, that is setting \(y = {\large\frac{{\pi x}}{L}\normalsize},\) we obtain the following trigonometric series for \(f\left( x \right):\)

    \[
    {f\left( x \right) = \frac{{{a_0}}}{2} \text{ + }}\kern0pt{ \sum\limits_{n = 1}^\infty {\left( {{a_n}\cos \frac{{n\pi x}}{L} + {b_n}\sin\frac{{n\pi x}}{L}} \right)}}
    \]

    where

    \[
    {{{a_0} }={ \frac{1}{L}\int\limits_{ – L}^L {f\left( x \right)dx} ,\;\;}}\kern-0.3pt
    {{{a_n} }={ \frac{1}{L}\int\limits_{ – L}^L {f\left( x \right)\cos \frac{{n\pi x}}{L}dx} ,\;\;}}\kern-0.3pt
    {{{b_n} }={ \frac{1}{L}\int\limits_{ – L}^L {f\left( x \right)\sin\frac{{n\pi x}}{L}dx} .}}
    \]

    Fourier Series Expansion on the Interval \(\left[ { a,b} \right]\)

    If the function \(f\left( x \right)\) is defined on the interval \(\left[ { a,b} \right],\) then its Fourier series representation is given by the same formula

    \[{f\left( x \right) = \frac{{{a_0}}}{2} \text{ + }}\kern0pt{ \sum\limits_{n = 1}^\infty {\left( {{a_n}\cos \frac{{n\pi x}}{L} + {b_n}\sin\frac{{n\pi x}}{L}} \right)}}\]

    where \(L = \large\frac{{b – a}}{2}\normalsize\) and Fourier coefficients are calculated as follows:

    \[
    {{{a_0} }={ \frac{1}{L}\int\limits_{ – L}^L {f\left( x \right)dx} ,\;\;}}\kern-0.3pt
    {{{a_n} }={ \frac{1}{L}\int\limits_{ – L}^L {f\left( x \right)\cos \frac{{n\pi x}}{L}dx} ,\;\;}}\kern-0.3pt
    {{{b_n} }={ \frac{1}{L}\int\limits_{ – L}^L {f\left( x \right)\sin\frac{{n\pi x}}{L}dx} ,\;\;}}\kern-0.3pt
    {n = 1,2,3, \ldots }
    \]

    Even and Odd Functions

    The Fourier series expansion of an even function, defined on the interval \(\left[ { – L,L} \right]\) has the form:

    \[{f\left( x \right) }={ \frac{{{a_0}}}{2} + \sum\limits_{n = 1}^\infty {{a_n}\cos \frac{{n\pi x}}{L}} ,}\]

    where

    \[
    {{a_0} = \frac{2}{L}\int\limits_0^L {f\left( x \right)dx} ,\;\;}\kern-0.3pt
    {{a_n} = \frac{2}{L}\int\limits_0^L {f\left( x \right)\cos \frac{{n\pi x}}{L}dx}.}
    \]

    The Fourier series expansion of an odd function defined on the interval \(\left[ { – L,L} \right]\) is expressed by the formula

    \[f\left( x \right) = \sum\limits_{n = 1}^\infty {{b_n}\sin\frac{{n\pi x}}{L}} ,\]

    where the Fourier coefficients are

    \[{{b_n} }={ \frac{2}{L}\int\limits_0^L {f\left( x \right)\sin\frac{{n\pi x}}{L}dx} .}\]


  • Solved Problems

    Click a problem to see the solution.

    Example 1

    Find the Fourier series of the function
    \[ {f\left( x \right) }= {\begin{cases} A, & 0 \le x \le L \\ 0, & L \lt x \le 2L \end{cases}.} \]

    Example 2

    Find the Fourier series of the function:
    \[ {f\left( x \right) }= {\begin{cases} 0, & -1 \le x \le 0 \\ x, & 0 \lt x \le 1 \end{cases}.} \]

    Example 3

    Find the Fourier series of the trapezoidal wave defined by the function
    \[ {f\left( x \right) }= {\begin{cases} x, & 0 \le x \le 1 \\ 1, & 1 \lt x \le 2 \\ 3-x, & 2 \lt x \le 3 \end{cases}.} \]

    Example 4

    Find the Fourier series of the function \(f\left( x \right) = {\cos ^2}x.\)

    Example 1.

    Find the Fourier series of the function
    \[ {f\left( x \right) }= {\begin{cases} A, & 0 \le x \le L \\ 0, & L \lt x \le 2L \end{cases}.} \]

    Solution.

    Determine the Fourier coefficients:

    \[
    {{a_0} }={ \frac{1}{L}\int\limits_a^b {f\left( x \right)dx} }
    = {\frac{1}{L}\int\limits_0^L {Adx} }={ A,}
    \]

    \[
    {{a_n} }={ \frac{1}{L}\int\limits_a^b {f\left( x \right)\cos \frac{{n\pi x}}{L}dx} }
    = {\frac{1}{L}\int\limits_a^b {A\cos \frac{{n\pi x}}{L}dx} }
    = {\frac{A}{L}\left[ {\left. {\left( {\frac{L}{{n\pi }}\sin\frac{{n\pi x}}{L}} \right)} \right|_0^L} \right] }
    = {\frac{A}{{n\pi }}\left( {\sin n\pi – \sin 0} \right) }={ 0,}
    \]

    \[
    {{b_n} }={ \frac{1}{L}\int\limits_a^b {f\left( x \right)\sin\frac{{n\pi x}}{L}dx} }
    = {\frac{1}{L}\int\limits_a^b {A\sin \frac{{n\pi x}}{L}dx} }
    = {\frac{A}{L}\left[ {\left. {\left( { – \frac{L}{{n\pi }}\cos\frac{{n\pi x}}{L}} \right)} \right|_0^L} \right] }
    = {\frac{A}{{n\pi }}\left[ { – \cos n\pi + \cos 0} \right] }
    = {\frac{A}{{n\pi }}\left[ {1 – {{\left( { – 1} \right)}^n}} \right] }
    = {\frac{A}{{n\pi }}\left[ {1 + {{\left( { – 1} \right)}^{n + 1}}} \right].}
    \]

    One can notice that for even \(n = 2k,\) \(k = 1,2,3, \ldots \)

    \[{{b_{2k}} }={ \frac{A}{{2k\pi }}\left[ {1 + {{\left( { – 1} \right)}^{2k + 1}}} \right] }={ 0.}\]

    For odd \(n = 2k – 1,\) \(k = 1,2,3, \ldots \)

    \[
    {{b_{2k – 1}} }={ \frac{A}{{\left( {2k – 1} \right)\pi }}\left[ {1 + {{\left( { – 1} \right)}^{2k}}} \right] }
    = {\frac{{2A}}{{\left( {2k – 1} \right)\pi }}.}
    \]

    Hence, the Fourier series expansion of the given function (Figure \(1\)) is

    \[{f\left( x \right) = \frac{A}{2} \text{ + }}\kern0pt{ \frac{{2A}}{\pi }\sum\limits_{k = 1}^\infty {\frac{1}{{2k – 1}}\sin \left( {\frac{{2k – 1}}{L}\pi x} \right)}}\]

    Fourier series for a rectangular function
    Figure 1, A = 2, L = 2, n = 2, n = 10
    Page 1
    Problem 1
    Page 2
    Problems 2-4