0% found this document useful (0 votes)
48 views

Chapter 7 Fourier Series: 1 Learning Outcomes

The document provides an overview of Fourier series. It defines periodic, even, and odd functions. Periodic functions repeat over a period, while even functions satisfy f(-x)=f(x) and odd functions satisfy f(-x)=-f(x). Sinusoidal functions include sine, cosine, and more general waves defined by amplitude, frequency, and phase offset. Any sinusoid can be decomposed into a sine and cosine wave. Harmonic functions are composed of integer multiples of a fundamental frequency. The document states that all periodic functions are harmonic and can be expressed as an infinite sum of sines and cosines using Fourier series coefficients. This represents the function as a sum of sinusoidal components. Examples
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views

Chapter 7 Fourier Series: 1 Learning Outcomes

The document provides an overview of Fourier series. It defines periodic, even, and odd functions. Periodic functions repeat over a period, while even functions satisfy f(-x)=f(x) and odd functions satisfy f(-x)=-f(x). Sinusoidal functions include sine, cosine, and more general waves defined by amplitude, frequency, and phase offset. Any sinusoid can be decomposed into a sine and cosine wave. Harmonic functions are composed of integer multiples of a fundamental frequency. The document states that all periodic functions are harmonic and can be expressed as an infinite sum of sines and cosines using Fourier series coefficients. This represents the function as a sum of sinusoidal components. Examples
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

MTCA4001 | Engineering Mathematics 2

Chapter 7 Fourier Series


1 Learning Outcomes
By the end of this topic you will be able to:

o Understand the Fourier Series o Define


Periodic, Even and Odd Functions
o Explain the relationship between the
Fourier Series and Fourier Transform

2 Periodic and Sinusoids Functions

2.1 Periodic Function

A Function (𝜃)is periodic if it is defined for all real 𝜃and if there is some positive number, 𝑇 such
that𝑓(𝑇 + 𝜃) = 𝑓(𝜃).

Generally, a periodic functions are functions which consist of a single cycle which repeats itself
endlessly. Some examples can be seen in Figure 1.

Figure 1: Example periodic functions.

1
MTCA4001 | Engineering Mathematics 2

The period of a periodic function is the length of single cycle of the function. The inverse of this
length is called the fundamental frequency, i.e. .

These functions are full described by simply writing down their behaviour over a single period 𝑇. For
example, in the case of the functions above:

(𝑥) = −𝑥 + 1, 0≤𝑥<𝑇

2.2 Sinusoidal Functions


Amongst the most common periodic functions are sine and cosine functions. These are specific
example of a larger family of functions called sinusoidal functions. In general, a sinusoidal function is
written like this:

where 𝐴 is the amplitude of the sinusoid, 𝜔 is its angular frequency and 𝜃 is the phase offset which
determines the “starting point” of the waveform. A sine wave, cosine wave and more general
sinusoidal function is given in Figure 2.

2
MTCA4001 | Engineering Mathematics 2

Figure 2. (Top) A sine wave. (Middle) A cosine wave. (Bottom). A general sinusoid.

2.3 Sinusoidal Decomposition


Interestingly, any sinusoid can be decomposed – or broken up – into the sum of a sine wave of
amplitude 𝑃 and a cosine wave of amplitude 𝑄. In order to see this, we first begin with the general
sinusoidal equation:

We then separate the cosine term into two products based upon the well-known trigonometric
identity.
cos(𝛼 − 𝛽) = cos𝛼 cos 𝛽 + sin 𝛼 sin𝛽
→ 𝐴 cos(𝜔𝑡 − 𝜃) = 𝐴(cos𝜔𝑡 cos 𝜃 + sin𝜔𝑡 sin𝜃)
= 𝐴 cos𝜃 cos 𝜔𝑡 + 𝐴 sin𝜃 sin𝜔𝑡

Setting 𝑎 = 𝐴 cos 𝜃 and 𝑏 = 𝐴 sin𝜃, we can see that:

This means that any arbitrary sinusoidal function with amplitude 𝐴, phase offset 𝜃, and angular
frequency 𝜔 can be written as the sum of a sine wave and cosine wave of specific amplitudes 𝑎 and
𝑏.

2.4 Harmonic Functions


Harmonic functions are those which are made up of a sum of a number of sinusoids whose
frequencies are all integer multiples of the lowest – or fundamental – frequency. The component
which is the lowest frequency sinusoid is called the fundamental or first harmonic, the component
which is twice the fundamental frequency is called the second harmonic, three times the
fundamental frequency the third harmonic, and so on.

For example:

is a harmonic function of fundamental frequency 𝜔, consisting of the first, second and third
harmonic. This function is plotted in Figure 3.

3
MTCA4001 | Engineering Mathematics 2

Figure 3. The harmonic function .

Harmonic functions are periodic, and the frequency is equal to the fundamental frequency.

3 Even and Odd Functions


An even function is one which satisfies the following property:

(−𝑥) = (𝑥) [3.1]

On the other hand, an odd function is one which satisfies the following property:

(−𝑥) = −(𝑥) [3.2]

(a)Even Function (b)Odd Function

4 Fourier Series
The previous sections described some periodic functions and some properties of functions generally.

We’ve previously seen that harmonic functions are composed of sinusoids whose frequencies have
an integer relationship with a particular fundamental. We’ve also seen that a sinusoid function can
be composed of both a sine and cosine wave component.

4
MTCA4001 | Engineering Mathematics 2

We now state that all periodic functions are harmonic functions which can be written in terms of a
sine and cosine functions. For example, the “sawtooth” waveform can be expressed as:
1 1 (−1)𝑘−1
𝑓(𝑥) = 2(sin 𝑥 − sin 2𝑥 + sin 3𝑥 − ⋯ + sin 𝑘𝑥 + ⋯ )
2 3 𝑘
containing an infinite number of sinusoidal components.

Mathematically, a single period of a sawtooth wave can be described:


𝐿 𝐿
𝑓(𝑥) = 2𝑥, − ≤𝑥≤
2 2

Figure 4: Sawtooth signals consisting of 𝑁 sinusoidal components

This sum-of-sinusoids representation of a periodic function is called the functions Fourier Series. In
general, the series can be written:

[4.3]
where 𝑎𝑛 and 𝑏𝑛 are called the Fourier coefficients. These values are calculated according to the
following formulae:

5
MTCA4001 | Engineering Mathematics 2

Example1: Find Fourier series for 𝑓(𝑥) = 2𝑥 + 1

The constant term is

1 1
𝑎0 = ∫ 𝑓(𝑥)𝑑𝑥
2 −1
1 1
= ∫ 2𝑥 + 1 𝑑𝑥
2 −1
1
1 2 1
= (𝑥 + 𝑥)| = (2)
2 −1 2
=1

The rest of the cosine coefficient are

1 𝐿 𝝅𝑛
𝑎𝑛 = ∫ 𝑓(𝑥) cos 𝑥 𝑑𝑥
𝐿 −𝐿 𝑳
1
= ∫ (2𝑥 + 1) cos 𝝅𝑛 𝑥 𝑑𝑥
−1
1
−(2𝑥 + 1) sin 𝒏𝝅𝑥 𝟏 1
= | − ∫ sin 𝒏𝝅𝑥 𝑑𝑡
𝒏𝝅 −1
𝝅𝑛 −1

1
3 1 2 cos(𝒏𝝅𝒙)
=− sin 𝒏𝝅 − sin(−𝒏𝝅) + |
𝒏𝝅 𝒏𝝅 (𝒏𝝅)2 −1

=0

Note that sin 𝑛𝜋 = 0 for all 𝑛 ∈ 𝑍 and cos 𝑛𝜋 = (−1)𝑛 for all 𝑛 ∈ 𝑍.

The sine coefficient of

6
MTCA4001 | Engineering Mathematics 2

1
𝑏𝑛 = ∫ 𝑓(𝑥) sin 𝒏𝝅𝑥 𝑑𝑥
−1

−(2𝑥 + 1) cos 𝒏𝝅𝑥 1 𝟏 1


=( | + ∫ cos 𝒏𝝅𝑥 𝑑𝑡)
𝒏𝝅 −1 𝝅𝑛 −1
1
3 1 2 sin(𝒏𝝅𝒙)
=− cos 𝒏𝝅 − cos(−𝒏𝝅) + |
𝒏𝝅 𝒏𝝅 (𝒏𝝅)2 −1

3 1 4
=− cos 𝒏𝝅 − cos(−𝒏𝝅) = − cos 𝒏𝝅
𝒏𝝅 𝒏𝝅 𝒏𝝅
4
= (−1)𝑛 (− )
𝒏𝝅

Therefore,

4 (−1)𝑛
𝑓(𝑥) = 1 − ∑ sin 𝝅𝑛 𝑥.
𝝅 𝒏
𝑛=1

Example2: Find Fourier series for 𝑓(𝑥) = 𝑥 2 , − 2 ≤ 𝑥 ≤ 2

Let now compute the Fourier coefficient. Note that 𝐿 = 2 in this case.

Note that sin 𝑛𝜋 = 0 for all 𝑛 ∈ 𝑍 and cos 𝑛𝜋 = (−1)𝑛 for all 𝑛 ∈ 𝑍.

7
MTCA4001 | Engineering Mathematics 2

2
1 2 𝑛𝜋𝑥 1 2 1 −1 1 2
𝑏𝑛 = ∫ 𝑓(𝑥) sin 𝑑𝑥 = ∫ 𝑥 sin 𝑛𝜋𝑥 𝑑𝑥 = ([ 𝑥 2 cos 𝑛𝜋𝑥] + ∫ 2x cos 𝑛𝜋𝑥 𝑑𝑥 )
𝐿 −2 𝐿 2 −2 2 𝑛𝜋 −2 𝑛𝜋 −2
=0
The Fourier series is given by

4.1 Fourier series of even and odd functions

Even functions can solely be represented by cosine waves because, cosine waves are even functions.
A sum of even functions is another even function.

Odd functions can solely be represented by sine waves because, sine waves are odd functions. A
sum of odd functions is another odd function.

8
MTCA4001 | Engineering Mathematics 2

Example 3:- Show that the trigonometric series of 𝑓(𝑥) = 3𝑥 for 𝑥 ∈ (−𝜋, 𝜋) given by

6
∑− (−1)𝑛 sin 𝑛𝑥
𝑛
𝑛=1
Solution:
Setp1: 𝑓(−𝑥) = 3(−𝑥) = −3𝑥 = −𝑓(𝑥), so 𝑓 is odd function.
Setp2: since 𝑓(𝑥) is odd and cos 𝑛𝑥 is even, it follow that 𝑓(𝑥) cos 𝑛𝑥 is odd, so
1 𝝅 1
𝑎𝑛 = ∫ 𝑓(𝑥) cos 𝒏𝝅𝑥 𝑑𝑥 = (0) = 0.
𝝅 −𝝅 𝝅
Moreover, since 𝑓 is odd
1 𝝅 1
𝑎0 = ∫ 𝑓(𝑥) 𝑑𝑥 = (0) = 0
𝟐 −𝝅 2
Step3: Noting that 𝑓(𝑥) and sin 𝑛𝑥 are odd, and therefore 𝑓(𝑥) sin 𝑛𝑥 is even, we have
1 𝝅
𝑏𝑛 = ∫ 𝑓(𝑥) sin 𝒏𝝅𝑥 𝑑𝑥 =.
𝝅 −𝝅
−(3𝑥) cos 𝒏𝑥 𝝅 𝟏 𝝅
=( | + ∫ cos 𝒏𝑥 𝑑𝑡)
𝒏 −𝝅 𝝅𝑛 −𝝅
𝝅
3 3 3 sin(𝒏𝒙)
= − cos 𝒏𝝅 − cos(−𝒏𝝅) + |
𝒏 𝒏 (𝒏)2 −𝝅

3 3 6
= − cos 𝒏𝝅 − cos(−𝒏𝝅) = − cos 𝒏𝝅
𝒏 𝒏 𝒏
6
= (−1)𝑛 (− )
𝒏

Therefore,

(−1)𝑛
𝑓(𝑥) = −6 ∑ sin 𝑛𝑥.
𝒏
𝑛=1

9
MTCA4001 | Engineering Mathematics 2

Example 4:- Show that the trigonometric series of 𝑓(𝑥) = 𝑥 2 for 𝑥 ∈ (−𝜋, 𝜋) given by

𝜋2 (−1)𝑛
+4∑ cos 𝑛𝑥
3 𝑛2
𝑛=1
Solution:
Setp1: 𝑓(−1) = (−1)2 = 1, so 𝑓 is an even function.
Setp2: since 𝑓(𝑥) is even function and sin 𝑛𝑥 is odd, it follow that 𝑓(𝑥) sin 𝑛𝑥 is odd, so
1 𝝅 1
𝑏𝑛 = ∫ 𝑓(𝑥) sin 𝒏𝝅𝑥 𝑑𝑥 = (0) = 0.
𝝅 −𝝅 𝝅
Step3:
As 𝑓(𝑥) is even
1 𝝅 𝜋2
𝑎0 = ∫ 𝑓(𝑥) 𝑑𝑥 =
𝟐𝝅 −𝝅 3

Moreover, as 𝑓(𝑥) and cos 𝑛𝑥 are even, therefore 𝑓(𝑥) cos 𝑛𝑥 is also even, so, we have
1 𝝅
𝑎𝑛 = ∫ 𝑓(𝑥) cos 𝒏𝑥 𝑑𝑥
𝝅 −𝝅
1 𝝅
= ∫ 𝑥 2 cos 𝒏𝑥 𝑑𝑥
𝝅 −𝝅

1 2 (sin 𝒏𝑥) 𝝅 𝝅
sin 𝒏𝑥
= (𝑥 | − ∫ 2𝑥 𝑑𝑥 )
𝝅 𝒏 −𝝅 −𝝅 𝑛

1 2 (sin 𝒏𝑥) 𝝅 2 (− cos 𝒏𝑥) 𝝅 𝝅


−cos 𝒏𝑥
= (𝑥 〈
| − (𝑥 | −∫ 𝑑𝑥 )〉)
𝝅 𝒏 −𝝅 𝒏 𝒏 −𝝅 −𝝅 𝑛

1 2 (sin 𝒏𝑥) 𝝅 (cos 𝒏𝑥) 𝝅 2(sin 𝒏𝑥) 𝝅


= (𝑥 | + (2𝑥 | − | ))
𝝅 𝒏 −𝝅 𝒏𝟐 −𝝅 𝒏𝟑 −𝝅

1 (cos 𝒏𝑥) 𝝅
= (0 + (2𝑥 | − 0))
𝝅 𝒏𝟐 −𝝅

(−1)𝑛
=4
𝑛2

Whereas

1 𝝅
𝑏𝑛 = ∫ 𝑓(𝑥) sin 𝒏𝑥 𝑑𝑥 = 0
𝝅 −𝝅

10
MTCA4001 | Engineering Mathematics 2

Therefore,

𝜋2 (−1)𝑛
𝑓(𝑥) = +4∑ cos 𝑛𝑥.
3 𝑛2
𝑛=1

%You can use the following commands to calculate the


nth partial sum of the Fourier series of the
expression f on the interval [-L,L]

syms t k L n

%The next command tells MATLAB that k is an integer.


That will allow simple and simplify to evaluate
sin(k*pi) and cos(k*pi) for a symbolic integer k.

evalin(symengine,'assume(k,Type::Integer)');
a1=@(f,t,k,L) int(f/2*L,t,-L,L);

%The kth Fourier cosine coefficient (a_k) of (f) is


given by the command:

a = @(f,t,k,L) int(f*cos(k*pi*t/L)/L,t,-L,L);

%The kth Fourier sine coefficient $b_k$ is given by


the command:

b = @(f,t,k,L) int(f*sin(k*pi*t/L)/L,t,-L,L);

%The nth partial sum is given by


fs = @(f,t,n,L) a1(f,t,k,L) + ...
symsum(a(f,t,k,L)*cos(k*pi*t/L) +
b(f,t,k,L)*sin(k*pi*t/L),k,1,n);

%For example, I can calculate the Fourier series of


f(x) = x on the interval [-1,1].
f =t+1

%The 10th partial sum is


pretty(fs(f,t,2,1))

11
MTCA4001 | Engineering Mathematics 2

%We can also have MATLAB calculate the general


Fourier coefficients.
[A]=simplify(a(f,t,k,1))
[B]=simplify(b(f,t,k,1))
%Here are the plots of the partial sums for n=2. The
plot also shows the function f.

ezplot(fs(f,t,2,1),-1,1)
hold on
ezplot(f,-1,1)
hold off
title('Partial sum with n=1')

12

You might also like