Title: Default for 23.5 Half-Range Series
Course: HELM Workbooks 2023-2024

Introduction

In this Section we address the following problem:

Can we find a Fourier series expansion of a function defined over a finite interval?

Of course we recognise that such a function could not be periodic (as periodicity demands an infinite interval). The answer to this question is yes but we must first convert the given non-periodic function into a periodic function. There are many ways of doing this. We shall concentrate on the most useful extension to produce a so-called half-range Fourier series.

Half-range Fourier series

So far we have shown how to represent given periodic functions by Fourier series. We now consider a slight variation on this theme (which will be useful in the study of Partial Differential Equations).

Suppose that instead of specifying a periodic function we begin with a function \(f(t)\) defined only over a limited range of values of \(t\), say \(0 < t < \pi\). Suppose further that we wish to represent this function, over \(0 < t < \pi\), by a Fourier series. (This situation may seem a little artificial at this point, but this is precisely the situation that will arise in solving differential equations.)

To be specific, suppose we define \(f(t) = t^2 \), \( 0 < t < \pi\) as shown in the Figure below.

[Image: t-squared]

We shall consider the interval \(0 < t < \pi\) to be half a period of a \(2\pi\) periodic function. We must therefore define \(f(t)\) for \(-\pi < t < 0\) to complete the specification.

Exercise

Complete the definition of the above function \(f(t) = t^2\), \(0 < t < \pi\) by defining it over \(-\pi < t < 0\) such that the resulting functions will have a Fourier series containing

1. Only cosine terms
2. Only sine terms
3. Both cosine and sine terms

Only tick \(1\) box in each question.
Feedback: 1. We must complete the definition so as to have an even periodic function: \(f(t) = t^2\), \( -\pi < t < 0\) [Image: t_squared] 2. We must complete the definition so as to have an odd periodic function: \(f(t) = -t^2\), \( -\pi < t < 0\) [Image: -t_squared] 3. We may define \(f(t)\) in any way we please (other than (a) and (b) above). For example we might define \(f(t) = 0\) over \( -\pi < t < 0\) [Image: zero]

The point is that all three periodic functions \(f_1(t)\), \(f_2(t)\), \(f_3(t)\) will give rise to a different Fourier series but all will represent the function \(f(t) = t^2\) over \(0 < t < \pi\). Fourier series obtained by extending functions in this sort of way are often referred to as half-range series.

Normally, in applications, we require either a Fourier Cosine series (so we would complete a definition as in (a) above to obtain an even periodic function) or a Fourier Sine series (for which, as in (b) above, we need an odd periodic function.)

The above considerations apply equally well for a function defined over any interval.

Example

Obtain the half range Fourier Sine series to represent \(f(t) = t^2\), \(0 < t < 3\).

Solution

We first extend \(f(t)\) as an odd periodic function \(F(t)\) of period 6: \(f(t) = -t^2\), \(-3 < t < 0\). So \[ F(t) = \begin{cases} -t^2 \hspace{1cm} -3 < t < 0 \\ t^2 \hspace{1.4cm} 0 < t < 3 \end{cases} \]

[Image: example-F(t) odd]

We now evaluate the Fourier series of \(F(t)\) by standard techniques but take advantage of the symmetry and put \(a_n = 0\), \(n = 0, 1, 2, \dots \).

Using the results for the Fourier Sine coefficients for period \(T\) as \[ b_n = \dfrac{2}{T} \displaystyle{ \int _{-\frac{T}{2}} ^{\frac{T}{2}} } F(t) \sin \left( \dfrac{2n\pi t}{T} \right) dt ,\] we put \(T = 6\) and, since the integrand is even (a product of 2 odd functions), we can write \[ b_n = \dfrac{2}{3} \displaystyle{ \int _{0} ^{3} } F(t) \sin \left( \dfrac{2n\pi t}{6} \right) dt = \dfrac{2}{3} \displaystyle{ \int _{0} ^{3} } t^2 \sin \left( \dfrac{n \pi t}{3} \right) dt \] (Note that we always integrate over the originally defined range, in this case \(0 < t < 3\).)

We now have to integrate by parts (twice!) \[ \begin{align} b_n &= \dfrac{2}{3} \left\{ \left[ -\dfrac{3t^2}{n\pi} \cos \left( \dfrac{n\pi t}{3} \right) \right] _0 ^3 + 2\left( \dfrac{3}{n\pi} \right) \int _0 ^3 t \cos \left( \dfrac{n \pi t}{3} \right) dt \right\} \\ &= \dfrac{2}{3} \left\{ -\dfrac{27}{n \pi} \cos n\pi + \dfrac{6}{n\pi} \left[ \dfrac{3}{n\pi} t \sin \left( \dfrac{n \pi t}{3} \right) \right] _0^3 - \left( \dfrac{6}{n\pi} \right) \left( \dfrac{3}{n\pi} \right) \int _0^3 \sin \left( \dfrac{n \pi t}{3} \right) dt \right\} \\ &= \dfrac{2}{3} \left\{ -\dfrac{27}{n \pi} \cos n\pi -\dfrac{18}{n^2\pi^2} \left[ -\dfrac{3}{n\pi}\cos \left( \dfrac{n\pi t}{3} \right) \right] _0^3 \right\} \\ &= \dfrac{2}{3} \left\{ - \dfrac{27}{n\pi} \cos n\pi + \dfrac{54}{n^3\pi^3} \left( \cos n\pi -1 \right) \right\} \end{align} \] so

\( b_n = \begin{cases} -\dfrac{18}{n\pi} \hspace{2.4cm} n = 2, 4, 6, \dots \\ \dfrac{18}{n\pi} - \dfrac{72}{n^3\pi^3} \hspace{1cm} n = 1, 3, 5 \dots \end{cases} \)

So the required Fourier series is \[ F(t) = 18 \left( \dfrac{1}{\pi} - \dfrac{4}{\pi^3} \right) \sin \left( \dfrac{\pi t}{3} \right) - \dfrac{18}{2\pi}\sin \left( \dfrac{2\pi t}{3} \right) + 18 \left( \dfrac{1}{3\pi} - \dfrac{4}{27\pi^3} \right) \sin (\pi t) - \dots \]
Feedback: \[ \begin{align} b_n &= \dfrac{2}{3} \left\{ \left[ -\dfrac{3t^2}{n\pi} \cos \left( \dfrac{n\pi t}{3} \right) \right] _0 ^3 + 2\left( \dfrac{3}{n\pi} \right) \int _0 ^3 t \cos \left( \dfrac{n \pi t}{3} \right) dt \right\} \\ &= \dfrac{2}{3} \left\{ -\dfrac{27}{n \pi} \cos n\pi + \dfrac{6}{n\pi} \left[ \dfrac{3}{n\pi} t \sin \left( \dfrac{n \pi t}{3} \right) \right] _0^3 - \left( \dfrac{6}{n\pi} \right) \left( \dfrac{3}{n\pi} \right) \int _0^3 \sin \left( \dfrac{n \pi t}{3} \right) dt \right\} \\ &= \dfrac{2}{3} \left\{ -\dfrac{27}{n \pi} \cos n\pi -\dfrac{18}{n^2\pi^2} \left[ -\dfrac{3}{n\pi}\cos \left( \dfrac{n\pi t}{3} \right) \right] _0^3 \right\} \\ &= \dfrac{2}{3} \left\{ - \dfrac{27}{n\pi} \cos n\pi + \dfrac{54}{n^3\pi^3} \left( \cos n\pi -1 \right) \right\} \end{align} \]

Exercise

Obtain a half-range Fourier Cosine series to represent the function \[ f(t) = 4 - t \hspace{1cm} 0 < t < 4 \]

[Image: 4-t]

 Write you answers in the boxes below to correspond to the form \[ \dfrac{a_0}{2} + a_1 \cos c_1 t + a_2 \cos c_2 t + a_3 \cos c_3 t + a_4 \cos c_4 t + a_5 \cos c_5 t + \dots \] You answers will be displayed below in the series as you fill in the boxes.

\(\dfrac{a_0}{2} =\) \(a_1 =\) \(c_1 =\) \(a_2 =\) \(c_2 =\) \(a_3 =\) \(c_3 =\)

\(a_4 =\) \(c_4 =\) \(a_5 =\) \(c_5 =\)

\(+\) \(\cos\) \(t\) \(+\) \(\cos\) \(t\) \(+\) \(\cos\) \(t\) \(+\) \(\cos\) \(t\) \(+\) \(\cos\) \(t\) \(+ \dots\)
Feedback: First complete the definition to obtain an even periodic function \(F(t)\) of period \(8\) as \[ F(t) = \begin{cases} t + 4 \hspace{1cm} -4 < t < 0 \\ 4 - t \hspace{1.1cm} 0 < t < 4 \end{cases} \] [Image: even function] Now formulate the integral from which the Fourier coefficients \(a_n\) can be calculated: With \(T = 8\) \[ a_n = \dfrac{2}{8} \int_{-4}^4 F(t) \cos \left( \dfrac{2n\pi t}{8} \right) dt \] Utilising the fact that the integrand here is even we get \[ a_n = \dfrac{1}{2} \int_{0}^4 (4-t) \cos \left( \dfrac{n\pi t}{4} \right) dt \] Using integration by parts we obtain for \(n = 1, 2, 3, \dots \) \[ \begin{align} a_n &= \dfrac{1}{2} \left\{ \left[ (4-t) \dfrac{4}{n\pi} \sin \left( \dfrac{n\pi t}{4} \right) \right]_0^4 + \dfrac{4}{n\pi} \int _0^4 \sin \left( \dfrac{n\pi t}{4} \right) dt \right\} \\ &= \dfrac{1}{2} \left( \dfrac{4}{n\pi} \right) \left( \dfrac{4}{n\pi} \right) \left[ -\cos \left( \dfrac{n\pi t}{4} \right) \right] _0^4 \\ &= \dfrac{8}{n^2\pi^2} [ \cos (n\pi) + 1] \end{align} \] i.e \[ a_n = \begin{cases} 0 \hspace{2cm} n = 2,4,6, \dots \\ \dfrac{16}{n^2\pi^2} \hspace{1.3cm} n = 1,3,5, \dots \end{cases} \] Also, \[ a_0 = \dfrac{1}{2} \int _0^4 (4-t) dt = 4, \] so the constant term is \( \dfrac{a_0}{2} = 2\). Therefore we have \[ 2 + \dfrac{16}{\pi^2} \left\{ \cos \left( \dfrac{\pi t}{4} \right) + \dfrac{1}{9}\cos \left( \dfrac{3 \pi t}{4} \right) + \dfrac{1}{25}\cos \left( \dfrac{5 \pi t}{4} \right) + \dots \right\} \]

Exercise

Obtain the half-range Fourier Cosine series for the functions \[f(t) = \sin t \hspace{1cm} 0 \leq t \leq \pi\]

Series is

\(+ \displaystyle{ \sum_{n=2}^\infty} \)
Feedback: We extend as an even function, so \[ f(t) = -\sin t \hspace{1cm} -\pi \leq t \leq 0 \] Therefore we define \[ F(t) = \begin{cases} -\sin t \hspace{1cm} -\pi \leq t \leq 0 \\ \sin t \hspace{1.2cm} 0 \leq t \leq \pi \end{cases} \] As \( F(t)\) is an even function, \(b_n = 0\). Then we have \[ \begin{align} a_n &= \dfrac{1}{\pi} \int_{-\pi}^\pi F(t) \cos nt \hspace{0.1cm} dt = \dfrac{2}{\pi} \int_{0}^\pi \sin t \cos nt \hspace{0.1cm} dt \\ &= \dfrac{2}{\pi} \left[ - \dfrac{\cos \left( \left(1-n\right) t \right)}{2 \left( 1-n \right)} - \dfrac{\cos \left( \left(1+n\right) t \right)}{2 \left( 1+n \right)} \right]_0^\pi \\ &= \dfrac{1}{\pi} \left[ \dfrac{1}{1-n} - \dfrac{ \cos \left( [1-n] \pi \right) }{1-n} + \dfrac{1}{1+n} - \dfrac{ \cos \left( [1+n] \pi \right) }{1+n} \right] \\ &= \dfrac{1}{\pi} \left[ \dfrac{1}{1-n} \left( 1 - \cos \left( [1-n] \pi \right) \right) + \dfrac{1}{1+n} \left( 1 - \cos \left( [1+n] \pi \right) \right) \right] \end{align} \] Also, \[ a_0 = \dfrac{1}{\pi} \left( 1 - \cos \pi + 1 - \cos \pi \right) = \dfrac{4}{\pi} \] so \( \dfrac{a_0}{2} = \dfrac{2}{\pi} \). We can see from \(a_n\) that the series is not defined for \(n = 1\), so the half range Fourier cosine series is given by \[ F(t) = \dfrac{2}{\pi} + \sum_{n=2}^\infty \dfrac{1}{\pi} \left[ \dfrac{1}{1-n} \left( 1 - \cos \left( [1-n] \pi \right) \right) + \dfrac{1}{1+n} \left( 1 - \cos \left( [1+n] \pi \right) \right) \right] \cos nt \]

Exercise

Obtain the half-range Fourier Sine series for the functions \[f(t) = e^{2t} \hspace{1cm} 0 \leq t \leq 1\]

Series is

\( \displaystyle{ \sum_{n=1}^\infty} \)
Feedback: We extend as an odd function, so \[ f(t) = - e^{-2t} \hspace{1cm} -1 \leq t \leq 0 \] Therefore we define \[ F(t) = \begin{cases} - e^{-2t} \hspace{1cm} -1 \leq t \leq 0 \\ e^{2t} \hspace{1cm} 0 \leq t \leq 1 \end{cases} \] As \( F(t)\) is an odd function, \(a_n = 0\). Then we have \[ \begin{align} b_n &= \int_{-1}^1 F(t) \sin n\pi t \hspace{0.1cm} dt = 2\int_{0}^1 e^{2t} \sin n\pi t \hspace{0.1cm} dt \\ &= 2\left\{ \left[ - \dfrac{e^{2t}}{n\pi} \cos n\pi t \right]_0^1 + \dfrac{2}{n\pi} \int_0^1 e^{2t} \cos n\pi t \hspace{0.1cm} dt \right\} \\ &= 2\left\{ - \dfrac{e^2}{n\pi}\cos n\pi + \dfrac{1}{n\pi} + \dfrac{2}{n\pi} \left( \left[ \dfrac{e^{2t}}{n\pi} \sin n\pi t \right]_0^1 - \dfrac{2}{n\pi} \int_0^1 e^{2t} \sin n\pi t \hspace{0.1cm} dt \right) \right\} \\ &= 2\left\{\dfrac{1}{n\pi} - \dfrac{e^{2}}{n\pi} \cos n\pi - \dfrac{4}{n^2\pi^2} \int_0^1 e^{2t} \sin n\pi t \hspace{0.1cm} dt \right\} \\ &= 2 \left( \dfrac{1}{n\pi} - \dfrac{e^2}{n\pi} \cos n\pi \right) - \dfrac{4}{n^2\pi^2}b_n \end{align} \] Rearranging now for \(b_n\) gives \[b_n = \dfrac{2n\pi}{4 + n^2\pi^2} \left( 1 - e^2 \cos n\pi \right) \sin n\pi t \] Finally the half range Fourier sine series is given by \[ F(t) = \sum_{n=1}^\infty \dfrac{2n\pi}{4 + n^2\pi^2} \left( 1 - e^2 \cos n\pi \right) \sin n\pi t\]

Exercise

Obtain the half-range Fourier Cosine series for the functions \[f(t) = e^{2t} \hspace{1cm} 0 \leq t \leq 1\]

Series is

  \(+ \displaystyle{ \sum_{n=1}^\infty} \)
Feedback: We extend as an even function, so \[ f(t) = e^{-2t} \hspace{1cm} -1 \leq t \leq 0 \] Therefore we define \[ F(t) = \begin{cases} e^{-2t} \hspace{1cm} -1 \leq t \leq 0 \\ e^{2t} \hspace{1cm} 0 \leq t \leq 1 \end{cases} \] As \( F(t)\) is an even function, \(b_n = 0\). Then we have \[ \begin{align} a_n &= \int_{-1}^1 F(t) \cos n\pi t \hspace{0.1cm} dt = 2\int_{0}^1 e^{2t} \cos n\pi t \hspace{0.1cm} dt \\ &= 2\left\{ \left[ \dfrac{e^{2t}}{n\pi} \sin n\pi t \right]_0^1 - \dfrac{2}{n\pi} \int_0^1 e^{2t} \sin n\pi t \hspace{0.1cm} dt \right\} \\ &= 2\left\{ - \dfrac{2}{n\pi} \left( \left[ - \dfrac{e^{2t}}{n\pi} \cos n\pi t \right]_0^1 + \dfrac{2}{n\pi} \int_0^1 e^{2t} \cos n\pi t \hspace{0.1cm} dt \right) \right\} \\ &= -\dfrac{4}{n\pi} \left(\dfrac{1}{n\pi} - \dfrac{e^2}{n\pi} \cos n\pi \right) - \dfrac{4}{n^2\pi^2}a_n \end{align} \] Rearranging now for \(a_n\) gives \[a_n = \dfrac{4}{4 + n^2\pi^2} \left( e^2 \cos n\pi -1 \right) \] Also, \(a_0 = e^2 - 1\), so \( \dfrac{a_0}{2} = \dfrac{e^2 - 1}{2}\). Finally the half range Fourier cosine series is given by \[ F(t) = \dfrac{e^2 - 1}{2} + \sum_{n=1}^\infty \dfrac{4}{4 + n^2\pi^2} \left( e^2 \cos n\pi -1 \right) \cos n\pi t\]

Exercise

Obtain the half-range Fourier Sine series for the functions \[f(t) =  t \hspace{1cm} 0 \leq t \leq 1 \]

Series is

\( \displaystyle{ \sum_{n=1}^\infty} \)
Feedback: We extend as an odd function, so \[ f(t) = -t \hspace{1cm} -1 \leq t \leq 0 \] Therefore we define \[ F(t) = \begin{cases} -t \hspace{1cm} -1 \leq t \leq 0 \\ t \hspace{1.2cm} 0 \leq t \leq 1 \end{cases} \] As \( F(t)\) is an odd function, \(a_n = 0\). Then we have \[ \begin{align} b_n &= \int_{-1}^1 F(t) \sin n\pi t \hspace{0.1cm} dt = 2 \int_{0}^1 t \sin n\pi t \hspace{0.1cm} dt \\ &= 2\left[ - \dfrac{ t }{n\pi} \cos n\pi t \right]_0^1 + \dfrac{1}{n\pi} \int _0^1 \cos n\pi t \hspace{0.1cm} dt \\ &= -\dfrac{2}{n\pi} \cos n\pi \\ &= -\dfrac{2}{n\pi} (-1)^n \end{align} \] So the half range Fourier sine series is given by \[ F(t) =\sum_{n=1}^\infty -\dfrac{2}{n\pi} (-1)^n \sin n\pi t \]

Exercise

Obtain the half-range Fourier Sine series for the functions \[f(t) =  1 \hspace{1cm} 0 \leq t \leq \pi \]

Series is

\( \displaystyle{ \sum_{n=1}^\infty} \)
Feedback: We extend as an odd function, so \[ f(t) = -1 \hspace{1cm} -\pi \leq t \leq 0 \] Therefore we define \[ F(t) = \begin{cases} -1 \hspace{1cm} -\pi \leq t \leq 0 \\ 1 \hspace{1.2cm} 0 \leq t \leq \pi \end{cases} \] As \( F(t)\) is an odd function, \(a_n = 0\). Then we have \[ \begin{align} b_n &= \dfrac{1}{\pi} \int_{-\pi}^\pi F(t) \sin n t \hspace{0.1cm} dt = \dfrac{2}{\pi} \int_{0}^\pi \sin n t \hspace{0.1cm} dt \\ &= \dfrac{2}{\pi} \left[ - \dfrac{ 1 }{n} \cos n t \right]_0^\pi \\ &= \dfrac{2}{n\pi} ( 1 - \cos n\pi )\\ &= \dfrac{2}{n\pi}( 1 - (-1)^n) \end{align} \] So the half range Fourier sine series is given by \[ F(t) =\sum_{n=1}^\infty \dfrac{2}{n\pi}( 1 - (-1)^n) \sin n t \]