Title: Default for 23.3 Even and Odd Functions
Course: HELM Workbooks 2023-2024

Introduction

In this Section we examine how to obtain Fourier series of periodic functions which are either even or odd. We show that the Fourier series for such functions is considerably easier to obtain as, if the signal is even only cosines are involved whereas if the signal is odd then only sines are involved. We also show that if a signal reverses after half a period then the Fourier series will only contain odd harmonics.

Even and odd functions

We have shown in a previous Section how to calculate, by integration, the coefficients \(a_n\) (\(n = 0, 1, 2, 3, \dots\)) and \(b_n\) (\(n = 1, 2, 3, \dots\)) in a Fourier series. Clearly this is a somewhat tedious process and it is advantageous if we can obtain as much information as possible without recourse to integration. Also in a previous Section we showed that the square wave (one period of which shown in the Figure below) has a Fourier series containing a constant term and cosine terms only (i.e. all the Fourier coefficients \(b_n\) are zero).

[Image: square-pulse]

 Alternatively the function shown below has a more complicated Fourier series containing both cosine and sine terms as well as a constant.

[Image: saw tooth]

One can see that the square (shown first) wave has a graph which is symmetrical about the \(y\)-axis and is called an even function. The saw-tooth wave (shown second) has no particular symmetry.

In general a function is called even if its graph is unchanged under reflection in the \(y\)-axis. This is equivalent to \[ f(-t) = f(t) \hspace{0.5cm} \text{for all} \hspace{0.3cm} t\] Obvious examples of even functions are \(t^2\), \(t^4\), \(\lvert t \rvert \), \(\cos t\), \(\cos^2 t\), \(\sin^2 t\), \(\cos nt\).

A function is said to be odd if its graph is symmetrical about the origin (i.e. it has rotational symmetry about the origin). This is equivalent to the condition \[ f(-t) = -f(t)\] The Figure below shows an example of an odd function.

[Image: odd-function]

Examples of odd functions are \(t\), \(t^3\), \(\sin t\), \(\sin nt\). A periodic function which is odd is the saw-tooth wave in the Figure below.

[Image: saw-tooth-pulse]

Some functions are neither even nor odd. The periodic saw-tooth wave (second Figure from top) is an example; another is the exponential function \(e^t\).

Q: Exercise

State the period of each of the following periodic functions and say whether it is even or odd or neither. Select 2 options from the list below. You will be penalised if you select more than 2.

[Image: period func]
- Period \(\pi\)
- Period \(2\)
- Period \(2\pi\)
- Even
- Odd
- Neither
A: Period \(2\pi\); Neither
Feedback: This functions is neither even nor odd and has a period \(2\pi\).

Q: Exercise

State the period of each of the following periodic functions and say whether it is even or odd or neither. Select 2 options from the list below. You will be penalised if you select more than 2.

[Image: period func]
- Period \(\pi\)
- Period \(2\)
- Period \(2\pi\)
- Even
- Odd
- Neither
A: Period \(\pi\); Odd
Feedback: This functions is odd and has a period \(\pi\).

Even and odd functions (continued)

A Fourier series contains a sum of terms while the integral formulae for the Fourier coefficients \(a_n\) and \(b_n\) contain products of the type \(f(t) \cos nt\) and \(f(t) \sin nt\). We need therefore results for sums and products of functions.

Suppose, for example, \(g(t)\) is an odd function and \(h(t)\) is an even function.

\[ \begin{align} \text{Let } \hspace{1cm} F_1(t) &= g(t)h(t) \hspace{1cm} \text{(product of odd and even functions)} \\ \text{so } \hspace{0.9cm} F_1(-t) &= g(-t)h(-t) \hspace{1cm} \text{(replacing } t \text{ with } -t \text{)} \\ &= (-g(t))h(t) \hspace{1cm} \text{(since } g \text{ is odd and } h \text{ is even)} \\ &= -g(t)h(t) \\ &= F_1(t) \end{align} \] So \(F_1(t) is odd.

Now suppose \[ \begin{align} F_2(t) &= g(t) + h(t) \hspace{1cm} \text{(sum of odd and even functions)} \\ \therefore \hspace{1cm} F_2(-t) &= g(-t) + h(t) \\ &= -g(t) + h(t) \end{align} \] We see that \[ F_2(-t) \neq F_2(t) \] and \[F_2(-t) \neq -F_2(t) \] So \(F_2(t)\) is neither odd nor even.

Exercise

Investigate the odd/even nature of sums and products of the following functions \(G(t)\) by calculating \(G(-t)\), expressing your answer in terms of the function \(G\).

1. \(G(t) = g_1(t)g_2(t)\)
where \(g_1(t)\) and \(g_2(t)\) are both odd functions.
\(G(-t) =\)
Therefore product of two odd functions is an function
2. \(G(t) = g_1(t) + g_2(t)\)
where \(g_1(t)\) and \(g_2(t)\) are both odd functions.
\(G(-t) =\)
Therefore the sum of two odd functions is an function
Feedback: We have \[ \begin{align} G(t) &= g_1(t)g_2(t) \\ G(-t) &= (-g_1(t))(-g_2(t)) \\ &= g_1(t)g_2(t) \\ &= G(t) \end{align} \] so the product of two odd functions is even. Then, we have \[ \begin{align} G(t) &= g_1(t) + g_2(t) \\ G(-t) &= -g_1(t) -g_2(t) \\ &= -G(t) \end{align} \] so the sum of two odd functions is odd.

Exercise

Investigate the odd/even nature of sums and products of the following functions \(H(t)\) by calculating \(H(-t)\), expressing your answer in terms of the function \(H\).

1. \(H(t) = h_1(t)h_2(t)\)
where \(h_1(t)\) and \(h_2(t)\) are both even functions.
\(H(-t) =\)
Therefore product of two even functions is an function
2. \(H(t) = h_1(t) + h_2(t)\)
where \(h_1(t)\) and \(h_2(t)\) are both even functions.
\(H(-t) =\)
Therefore the sum of two even functions is an function
Feedback: We have \[ \begin{align} H(t) &= h_1(t)h_2(t) \\ H(-t) &= (h_1(-t))(h_2(-t)) \\ &= h_1(t)h_2(t) \\ &= H(t) \end{align} \] so the product of two even functions is even. Then, we have \[ \begin{align} H(t) &= h_1(t) + h_2(t) \\ H(-t) &= h_1(-t) + h_2(-t) \\ &= h_1(t) + h_2(t) \\ &= H(t) \end{align} \] so the sum of two odd functions is even.

These results are summarized in the following Key Point.

Key Point

Products of functions

\[ \begin{align} \text{(even) } \times \text{(even)} &= \text{(even)} \\ \text{(even) } \times \text{(odd)} &= \text{(odd)} \\ \text{(odd) } \times \text{(odd)} &= \text{(even)} \end{align} \]

Sums of functions

\[ \begin{align} \text{(even) } + \text{(even)} &= \text{(even)} \\ \text{(even) } + \text{(odd)} &= \text{(neither)} \\ \text{(odd) } + \text{(odd)} &= \text{(odd)} \end{align} \]
Useful properties of even and of odd functions in connection with integrals can be readily deduced if we recall that a definite integral has the significance of giving us the value of an area as shown in the Figure below.

[Image: area under a curve]

\( \displaystyle{ \int_a^b } f(t) dt\) gives us the net value of the shaded area, that above the \(t\)-axis being positive, that below being negative.

For the case of a symmetrical interval \( (-a, a)\) for an odd function \(g(t)\) we have \[ \displaystyle{\int_{-a} ^a } g(t) dt = 0\] and for an even function \(h(t)\) we have \[ \displaystyle{\int_{-a} ^a } h(t) dt = 2 \displaystyle{\int_{0} ^a } h(t) dt \] This can be seen in the Figure below.

[Image: even-odd-integrals]

Fourier series implications

Since a sum of even functions is itself an even function it is not unreasonable to suggest that a Fourier series containing only cosine terms (and perhaps a constant term which can also be considered as an even function) can only represent an even periodic function. Similarly a series of sine terms (and no constant) can only represent an odd function. These results can readily be shown more formally using the expressions for the Fourier coefficients \(a_n\) and \(b_n\).

Recall that for a \(2\pi\)-periodic function, \[ b_n = \dfrac{1}{\pi} \displaystyle{ \int_{-\pi}^\pi }f(t) \sin nt \hspace{0.1cm} dt \] Then, if \(f(t)\) is even, \[ f(t) \sin nt = \text{ (even) } \times \text{ (odd) } = \text{ (odd)} \] hence \[ b_n = \dfrac{1}{\pi} \displaystyle{ \int_{-\pi}^\pi } \text{ (odd function)} \hspace{0.1cm} dt = 0\] Thus an even function has no sine terms in its Fourier series.

Also, \[ f(t) \cos nt = \text{ (even) } \times \text{ (even) } = \text{ (even)} \] \[ \therefore \hspace{1cm} a_n = \dfrac{1}{\pi} \displaystyle{ \int_{-\pi}^\pi } \text{ (even function)} \hspace{0.1cm} dt = \dfrac{2}{\pi} \displaystyle{ \int_{-\pi}^\pi }f(t) \cos nt \hspace{0.1cm} dt \] It should be obvious that, for an odd function \(f(t)\), \[ \begin{align} a_n &= \dfrac{1}{\pi} \displaystyle{ \int_{-\pi}^\pi }f(t) \cos nt \hspace{0.1cm} dt = \dfrac{1}{\pi} \displaystyle{ \int_{-\pi}^\pi } \text{ (odd function)} \hspace{0.1cm} dt = 0 \\ b_n &= \dfrac{2}{\pi} \displaystyle{ \int_{-\pi}^\pi }f(t) \sin nt \hspace{0.1cm} dt \end{align} \] Analogous results hold for functions of any period, not necessarily \(2\pi\).

For a periodic function which is neither even nor odd we can expect at least some of both the \(a_n\) and \(b_n\) to be non-zero. For example consider the square wave function shown in the Figure below:

[Image: square-wave]

This function is neither even nor odd and we have already seen in a previous section that its Fourier series contains a constant \( \left(\displaystyle{1}{2} \right) and sine terms.

This result could be expected because we can write \[ f(t) = \dfrac{1}{2} + g(t) \] where \(g(t)\) is as shown:

[Image: square-pulse]

Clearly \(g(t)\) is odd and will contain only sine terms. The Fourier series are in fact \[ f(t) = \dfrac{1}{2} + \dfrac{2}{\pi} \left( \sin t + \dfrac{1}{3} \sin 3t + \dfrac{1}{5} \sin 5t + \dots \right) \] and \[ g(t) = \dfrac{2}{\pi} \left( \sin t + \dfrac{1}{3} \sin 3t + \dfrac{1}{5} \sin 5t + \dots \right) \]

Exercise

For each of the following functions deduce whether the corresponding Fourier series contains sine terms only, cosine terms only or both as well as a constant term.

[Image: different functions]

1) constant term:

Other terms:

2) Constant term:

Other terms:

3) Constant term:

Other terms:

4) Constant term:

Other terms:

5) Constant term:

Other terms:

6) Constant term:

Other terms:

7) Constant term:

Other terms:

Example

Confirm the result obtained for the triangular wave, function 7 in the last Task, by finding the Fourier series fully. The function involved is

\[\begin{align*} f(t) & = |t| \quad\quad - \pi < t < \pi, \\ f(t+2\pi) & = f(t). \end{align*}\]

Solution

Since \(f(t)\) is even we can say immediately \[b_n=0\qquad n=1,2,3,\ldots\] Also \[\begin{aligned} a_n=\frac{2}{\pi}\int_0^\pi t\cos nt \, dt=\left\{\begin{array}{ccc}0&&n\ \text{even}\\ \\ -\frac{4}{n^2\pi}&&n\ \text{odd}\end{array}\right. \end{aligned}\] (after integration by parts). Also \(a_0=\frac{2}{\pi}\displaystyle\int_0^\pi t\ d t=\pi\) so the Fourier series is \[f(t)=\frac{\pi}{2}-\frac{4}{\pi}\left(\cos t+\frac{1}{9}\cos 3t+\frac{1}{25}\cos 5t+\ldots \right)\]