# 5. Harmonic Analysis

Recall the Fourier series (that we met in Full Range Fourier Series):

`f(t)=(a_0)/2sum_(n=1)^ooa_n\ cos nt+sum_(n=1)^oob_n\ sin nt`

`=(a_0)/2+a_1\ cos t` ` +\ a_2\ cos 2t` ` +\ a_3\ cos 3t+... ` ` +\ b_1\ sin t` `+\ b_2\ sin 2t` ` +\ b_3\ sin 3t+...`

We can re-arrange this series and write it as:

`f(t)=(a_0)/2+(a_1\ cos t + b_1\ sin t)` ` + (a_2\ cos 2t + b_2\ sin 2t)` ` + (a_3\ cos 3t+ b_3\ sin 3t)+...`

The term (*a*_{1} cos *t* +
*b*_{1} sin *t*) is known as the
**fundamental**.

The term (*a*_{2} cos 2*t* + *b*_{2}
sin 2*t*) is called the **second harmonic.**

The term (*a*_{3} cos 3*t* + *b*_{3}
sin 3*t*) is called the **third harmonic,** etc.

## Odd Harmonics

The Fourier series will contain **odd harmonics** if `f(t + π) = - f(t)`.

### Example 1

Graph of `f(t)`, where `f(t + π) = - f(t)`.

In this case, the Fourier expansion will be of the form:

`f(t)=(a_0)/2+(a_1\ cos t + b_1\ sin t)` ` +\ (a_3\ cos 3t + b_3\ sin 3t)` ` +\ (a_5\ cos 5t+ b_5\ sin 5t)+...`

All of the harmonics are **odd**.

## Even Harmonics

The Fourier series will contain **even harmonics** if `f(t + π) = f(t)`.
That is, it has period `pi`.

Graph of `f(t)`, where `f(t + π) = f(t)`.

In this case, the Fourier expansion will be of the form:

`f(t)=(a_0)/2+(a_2\ cos 2t + b_2\ sin 2t)` ` +\ (a_4\ cos 4t + b_4\ sin 4t)` ` +\ (a_6\ cos 6t+ b_6\ sin 6t)+...`

All of the harmonics are **even**.

### Example 2

Determine the existence of odd or even harmonics for the following functions.

(a) `f(t)=` `{ {: (-t-pi/2",", -pi <=t <0),(t-pi/2",", 0 <= t < pi) :}`

`f(t) = f(t + 2π)`.

Answer

Graph of `f(t)`.

We can see from the graph that `f(t + π) = - f(t)`.

For example, we notice that `f(2) = 0.4`, approximately. If we now move `π` units to the right (or about `2 + 3.14 = 5.14`), we see that the function value is

`f(5.14) = -0.4`.

That is, `f(t + π) = - f(t)`.

This same behaviour will occur for any value of `t` that we choose.

So the Fourier Series will have **odd
harmonics**.

This means that in our Fourier expansion we will only see terms like the following:

`f(t)=(a_0)/2+(a_1\ cos t + b_1\ sin t)` ` +\ (a_3\ cos 3t + b_3\ sin 3t)` ` +\ (a_5\ cos 5t+ b_5\ sin 5t)+...`

[**Note: **Don't be confused with **odd functions** and **odd harmonics**. In this example, we have an **even function** (since it is symmetrical about the *y*-axis), but because the function has the property that `f(t + π) = - f(t)`, then we know it has **odd harmonics** only.

The fact that it is an even function does not affect the nature of the harmonics and can be ignored.]

### Aside: Music Harmonics

[Image source.]

**Playing harmonics on a guitar.** If you just lightly touch a string with the left hand and then pluck it, you hear a high pitched sound called the **harmonic**.

Music sounds "in tune" because the harmonics contained in each note sound "right" with certain other notes.

See also Line Spectrum.

(b) `f(t)={ {:(e^(-t),if , 0 {:<=:}t < pi), (e^(-t+pi),if, pi {:<=:} t < 2pi) :}`

### Useful Background

Check out Graphs of Exponential Functions.

`f(t) = f(t + π)`.

Answer

Graph of `f(t)`, where `f(t + π) = f(t)`.

As the question states, the function is periodic with period `pi`.

So, we conclude that the Fourier series will have **even
harmonics**, and will be of the form:

`(a_0)/2+(a_2\ cos 2t + b_2\ sin 2t)` ` +\ (a_4\ cos 4t + b_4\ sin 4t)` ` +\ (a_6\ cos 6t+ b_6\ sin 6t)+...`

### Search IntMath

### Online Calculus Solver

This calculus solver can solve a wide range of math problems.

Go to: Online calculus solver