Chapter 4 Fourier Series

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 34

Engineering Maths.

II
BDA 14103
Chapter 4 – Fourier Series

By:
Bukhari bin Manshoor, PhD CEng MIET PTech
Assoc. Prof.
Dept. of Mechanical Engineering
Faculty of Mechanical & Manufacturing Engineering

© Dr. Bukhari bin Manshoor


Fourier Series
● Periodic function.
● Odd and even function.
● Fourier series in interval (-l, l)
● Half range series.
Introduction
● Fourier analysis has its most important applications in modelling and solving partial
differential equations (PDEs).
● Mostly related to boundary and initial value problems of mechanics, heat flow,
electrostatics, and other fields.
● Fourier analysis allows us to model periodic phenomena which appear frequently in
engineering and elsewhere - rotating parts of machines, alternating electric currents or
even the motion of planets.
● Related period functions may be complicated.
● The ingenious idea of Fourier analysis is to represent complicated functions in terms of
simple periodic functions, namely cosines and sines.
● The representations will be infinite series called Fourier Series.
Periodic Function
● To define Fourier series, we first need some
background material.
● A function 𝑓(𝑥) is called a periodic function if 𝑓(𝑥)
is defined for all real 𝑥, and if there is some positive
number 𝑝, called a period of 𝑓(𝑥), such that;

𝑓 𝑥 + 𝑝 = 𝑓(𝑥)

● First few sections of this sub-chapter will be the


representation of various functions as follow.
 𝑓 𝑥 of period 2𝜋
 𝑓 𝑥 of period 2𝑙
Periodic function of period 2π – −𝝅 < 𝒙 < 𝝅
● 𝑓(𝑥) be a periodic function with period 2π, the function can be represented by
trigonometric series as;
∞ ∞

𝑓 𝑥 = 𝑎𝑜 + ෍ 𝑎𝑛 cos 𝑛𝑥 + ෍ 𝑏𝑛 sin 𝑛𝑥
𝑛=1 𝑛=1

● The coefficient of Fourier series can be determine by using;


1 𝜋
𝑎𝑜 = න 𝑓 𝑥 𝑑𝑥
2𝜋 −𝜋

1 𝜋
𝑎𝑛 = න 𝑓 𝑥 cos 𝑛𝑥 𝑑𝑥 𝑛 = 1,2, …
𝜋 −𝜋

1 𝜋
𝑏𝑛 = න 𝑓 𝑥 sin 𝑛𝑥 𝑑𝑥 𝑛 = 1,2, …
𝜋 −𝜋
Convergence and Sum of Fourier Series
● Let 𝑓(𝑥) be periodic with period 2𝜋 and piecewise continuous in the interval −𝜋 ≤ 𝑥 ≤ 𝜋.
● Furthermore, let 𝑓(𝑥) have a left-hand derivative and a right-hand derivative at each
point of that interval - Then the Fourier series converges.
● Its sum is 𝑓(𝑥), except at points 𝑥0 where is discontinuous.
● There the sum of the series is the average of the left- and right-hand limits of 𝑓(𝑥) at 𝑥0 .
● If 𝑥 is a point of continuity of 𝑓(𝑥), then the series of Fourier converges to the value of
𝑓 𝑥 .
1
● If 𝑓(𝑥) has a jump discontinuity at 𝑥, then the series converges to 𝑓 𝑥+ + 𝑓 𝑥−
2
Example a:
f(x)
Find the Fourier series of the function.

k
−𝑘 −𝜋 < 𝑥 < 0
𝑓 𝑡 =ቊ
𝑘 0<𝑥<𝜋 x
-π 0 π 2π
and 𝑓 𝑥 + 2𝜋 = 𝑓(𝑥) -k

Solution.

- A periodic function with period 2π;


∞ ∞

𝑓 𝑥 = 𝑎𝑜 + ෍ 𝑎𝑛 cos 𝑛𝑥 + ෍ 𝑏𝑛 sin 𝑛𝑥
𝑛=1 𝑛=1

- The coefficient of Fourier series,


1 𝜋 1 𝜋 1 𝜋
𝑎𝑜 = න 𝑓 𝑥 𝑑𝑥 𝑎𝑛 = න 𝑓 𝑥 cos 𝑛𝑥 𝑑𝑥 𝑏𝑛 = න 𝑓 𝑥 sin 𝑛𝑥 𝑑𝑥
2𝜋 −𝜋 𝜋 −𝜋 𝜋 −𝜋
0 𝜋
1
𝑎𝑜 = න −𝑘 𝑑𝑥 + න 𝑘 𝑑𝑥
2𝜋 −𝜋 0

1 0 𝜋
= −𝑘𝑥 ቚ +𝑘𝑥 ቚ
2𝜋 −𝜋 0

1
= 0 − (−𝑘(−𝜋 ) + 𝑘𝜋 − 0 =0
2𝜋

1 0 𝜋
𝑎𝑛 = න −𝑘 cos 𝑛𝑥 𝑑𝑥 + න 𝑘 cos 𝑛𝑥 𝑑𝑥
𝜋 −𝜋 0

0 𝜋
1 sin 𝑛𝑥 sin 𝑛𝑥
= −𝑘 ቤ +𝑘 ቤ
𝜋 𝑛 −𝜋 𝑛 0

1 sin 0 sin −𝑛𝜋 sin 𝑛𝜋 sin 0


= −𝑘 +𝑘 + 𝑘 −𝑘 =0
𝜋 𝑛 𝑛 𝑛 𝑛

* sin 𝑛𝜋 = 0 at −𝜋, 0 and 𝜋 for all 𝑛 = 1,2 …


1 0 𝜋
𝑏𝑛 = න −𝑘 sin 𝑛𝑥 𝑑𝑥 + න 𝑘 sin 𝑛𝑥 𝑑𝑥
𝜋 −𝜋 0

1 cos 𝑛𝑥 0 cos 𝑛𝑥 𝜋
= 𝑘 ฬ −𝑘 ฬ
𝜋 𝑛 −𝜋 𝑛 0

1 cos 0 cos −𝑛𝜋 cos 𝑛𝜋 cos 0


= 𝑘 −𝑘 − 𝑘 −𝑘
𝜋 𝑛 𝑛 𝑛 𝑛

* cos −𝜋 = cos 𝜋 and cos 0 = 1


1 𝑘 𝑘 𝑘 𝑘
= cos 0 − cos 𝑛𝜋 − cos 𝑛𝜋 − cos 0
𝜋 𝑛 𝑛 𝑛 𝑛

𝑘
= cos 0 − cos 𝑛𝜋 − cos 𝑛𝜋 − cos 0
𝑛𝜋
𝑘
= 2 − 2 cos 𝑛𝜋
𝑛𝜋
2𝑘
= 1 − cos 𝑛𝜋
𝑛𝜋
cos 𝜋 = −1 cos 2𝜋 = 1 cos 3𝜋 = −1 𝑒𝑡𝑐.
In general;
−1 for odd 𝑛
cos 𝑛𝜋 = ቊ
1 for even 𝑛

Thus;

2 for odd 𝑛
1 − cos 𝑛𝜋 = ቊ
0 for even 𝑛

Hence, for Fourier coefficient, 𝑏𝑛 of the function are;


4𝑘 4𝑘 4𝑘
𝑏1 = 𝑏2 = 0 𝑏3 = 𝑏4 = 0 𝑏5 = ,…
𝜋 3𝜋 5𝜋

The Fourier series of 𝑓 𝑥 is;


4𝑘 1 1
𝑓(𝑥) = sin 𝑥 + sin 3𝑥 + sin 5𝑥 + ⋯
𝜋 3 5
Example b:
Find the Fourier series of the function.

−𝜋 −𝜋 < 𝑥 ≤ 0
𝑓 𝑡 =ቊ
𝑥 0≤𝑥<𝜋

By choosing an appropriate value for x, show that;

𝜋2 1 1 1
= 2+ 2+ 2+⋯
8 1 3 5
Solution.
Example c:
Write the function for the following graph, then find the Fourier series of the function.

f(x)

π 𝑓 𝑥 = 𝑓(𝑥 + 2𝜋)

x
-2π -π 0 π 2π

By choosing an appropriate value for x, show that;

𝜋 1 1 1 1
= 1 − + − + − ⋯+ ⋯
4 3 5 7 9
Solution.
Periodic function of period 2l – −𝒍 < 𝒙 < 𝒍
● 𝑓(𝑥) be a periodic function with period 2l, the function can be represented by
trigonometric series as;
∞ ∞
𝑛𝜋 𝑛𝜋
𝑓 𝑥 = 𝑎𝑜 + ෍ 𝑎𝑛 cos 𝑥 + ෍ 𝑏𝑛 sin 𝑥
𝑙 𝑙
𝑛=1 𝑛=1

● The coefficient of Fourier series can be determine by using;

1 𝑙
𝑎𝑜 = න 𝑓 𝑥 𝑑𝑥
2𝑙 −𝑙

1 𝑙 𝑛𝜋𝑥
𝑎𝑛 = න 𝑓 𝑥 cos 𝑑𝑥 𝑛 = 1,2, …
𝑙 −𝑙 𝑙

1 𝑙 𝑛𝜋𝑥
𝑏𝑛 = න 𝑓 𝑥 sin 𝑑𝑥 𝑛 = 1,2, …
𝑙 −𝑙 𝑙
Example d:
Find the Fourier series of the function.
f(x)

0 −2 < 𝑥 < −1 k
𝑓 𝑡 = ቐ𝑘 −1 < 𝑥 < 1
0 1<𝑥<2 x
-2 -1 0 1 2
Solution.

- From the graph, 𝑝 = 2𝑙 = 4 𝑙=2


- A periodic function with period 2l;
∞ ∞
𝑛𝜋 𝑛𝜋
𝑓 𝑥 = 𝑎𝑜 + ෍ 𝑎𝑛 cos 𝑥 + ෍ 𝑏𝑛 sin 𝑥
𝑙 𝑙
𝑛=1 𝑛=1

- The coefficient of Fourier series,


1 𝑙 1 𝑙 𝑛𝜋𝑥 1 𝑙 𝑛𝜋𝑥
𝑎𝑜 = න 𝑓 𝑥 𝑑𝑥 𝑎𝑛 = න 𝑓 𝑥 cos 𝑑𝑥 𝑏𝑛 = න 𝑓 𝑥 sin 𝑑𝑥
2𝑙 −𝑙 𝑙 −𝑙 𝑙 𝑙 −𝑙 𝑙
Example e:
Find the Fourier series of the function. f(x)

k
−𝑘 −𝐿 < 𝑡 < 0
𝑓 𝑡 =ቊ
𝑘 0<𝑡<𝐿 x
-2 -1 0 1 2
-k
Solution.

- From the graph, 𝑝 = 2𝑙 = 2 𝑙=1


- A periodic function with period 2l;
∞ ∞
𝑛𝜋 𝑛𝜋
𝑓 𝑥 = 𝑎𝑜 + ෍ 𝑎𝑛 cos 𝑥 + ෍ 𝑏𝑛 sin 𝑥
𝑙 𝑙
𝑛=1 𝑛=1

- The coefficient of Fourier series,


1 𝑙 1 𝑙 𝑛𝜋𝑥 1 𝑙 𝑛𝜋𝑥
𝑎𝑜 = න 𝑓 𝑥 𝑑𝑥 𝑎𝑛 = න 𝑓 𝑥 cos 𝑑𝑥 𝑏𝑛 = න 𝑓 𝑥 sin 𝑑𝑥
2𝑙 −𝑙 𝑙 −𝑙 𝑙 𝑙 −𝑙 𝑙
Odd & Even Function
● Even Function - The value of the function would be the x )
ff(q)
same when we walk equal distances along the x-axis in
opposite directions.
xq
● Also known as Fourier cosine series.
● Mathematically speaking;

𝑓 −𝑥 = 𝑓(𝑥) Even function

● Odd Function - The value of the function would change its


sign but with the same magnitude when we walk equal x )
ff(q)
distances along the x-axis in opposite directions.
● Also known as Fourier sine series. xq
● Mathematically speaking;

𝑓 −𝑥 = −𝑓(𝑥) Odd function


● Even Function can solely be ● Odd Function can solely be
represented by cosine waves. A sum represented by sine waves. A sum of
of even function is another even odd function is another odd
function. function.

5
10 0 10
q

Even function Odd function


● Even Function of period 2π – If 𝑓(𝑥) is even and 𝐿 = 𝜋, then;

𝑓 𝑥 = 𝑎0 + ෍ 𝑎𝑛 cos 𝑛𝑥
𝑛=1

with coefficient;
1 𝜋 2 𝜋
𝑎0 = න 𝑓 𝑥 𝑑𝑥 𝑎𝑛 = න 𝑓 𝑥 cos 𝑛𝑥 𝑑𝑥 n=1,2,3,…
𝜋 0 𝜋 0

● Odd Function of period 2π – If 𝑓(𝑥) is even and 𝐿 = 𝜋, then;


𝑓 𝑥 = ෍ 𝑏𝑛 sin 𝑛𝑥
𝑛=1

with coefficient;
2 𝜋
𝑏𝑛 = න 𝑓 𝑥 sin 𝑛𝑥 𝑑𝑥 n=1,2,3,…
𝜋 0
Example f:
Find the Fourier cosine series of the following function.
f(x)

0 −2 < 𝑥 < −1 k
𝑓 𝑡 = ቐ𝑘 −1 < 𝑥 < 1
0 1<𝑥<2 x
-2 -1 0 1 2
Solution.

- From the graph, 𝑝 = 2𝑙 = 4 𝑙=2


- A periodic function with period 2l;

𝑛𝜋
𝑓 𝑥 = 𝑎𝑜 + ෍ 𝑎𝑛 cos 𝑥
𝑙
𝑛=1

- The coefficient of Fourier series,


1 𝑙 1 𝑙 𝑛𝜋𝑥
𝑎𝑜 = න 𝑓 𝑥 𝑑𝑥 𝑎𝑛 = න 𝑓 𝑥 cos 𝑑𝑥
2𝑙 −𝑙 𝑙 −𝑙 𝑙
Example g:
Find the Fourier sine series of the following function.

f(x)

−𝑘 −𝐿 < 𝑡 < 0
𝑓 𝑡 =ቊ k
𝑘 0<𝑡<𝐿
x
Solution. -2 -1 0 1 2
-k
- A periodic function with period 2π;

𝑓 𝑥 = ෍ 𝑏𝑛 sin 𝑛𝑥
𝑛−1

- The coefficient of Fourier series,

1 𝜋
𝑏𝑛 = න 𝑓 𝑥 sin 𝑛𝑥 𝑑𝑥
𝜋 −𝜋
Half Range Series
● In some case, a function 𝑓(𝑥) is defined only over 0 < 𝑥 < 𝑙 instead of the complete
range –l to l.
● If we desire a Fourier series representation of 𝑓(𝑥) on over the interval 0 < 𝑥 < 𝑙 , then
we need to provide an additional information of 𝑓(𝑥) over the interval −1 < 𝑥 < 0 to
make the period 2l.
● This motivates the name Half-Range Expansions or Half Range Series.

f(x)

f(x) = x 0<x<l

x
l
Half range cosine series
● Let 𝑓(𝑥) be a function on the interval 0 < 𝑥 < 𝑙.
● If 𝑓(𝑥) is extended to the interval −𝑙 < 𝑥 < 𝑙 as an even function, then the Fourier
series representation over the interval is given by;

1 𝑛𝜋𝑥
𝑓 𝑥 = 𝑎0 + ෍ 𝑎𝑛 cos
2 𝑙
𝑛=1 f(x)

2 𝑙 f(x) = x 0<x<l
𝑎0 = න 𝑓 𝑥 𝑑𝑥
𝑙 0

2 𝑙 𝑛𝜋𝑥
𝑎𝑛 = න 𝑓 𝑥 cos 𝑑𝑥 n = 1,2,3,… x
𝑙 0 𝑙 -l l

Extended function
Half range sine series
● Let 𝑓(𝑥) be a function on the interval 0 < 𝑥 < 𝑙.
● If 𝑓(𝑥) is extended to the interval −𝑙 < 𝑥 < 𝑙 as an odd function, then the Fourier
series representation over the interval is given by;
∞ f(x)
𝑛𝜋𝑥
𝑓 𝑥 = ෍ 𝑏𝑛 sin
𝑙 f(x) = x 0<x<l
𝑛=1

2 𝑙 𝑛𝜋𝑥
𝑏𝑛 = න 𝑓 𝑥 sin 𝑑𝑥 n = 1,2,3,…
𝑙 0 𝑙
x
-l l

Extended function
Example h:
Find the two half range expansions of the given function. Sketch the periodic extension for both series.

2𝑘 𝑙 f(x)
𝑥 0<𝑥<
𝑓 𝑥 = 𝑙 2
2𝑘 𝑙
𝑙−𝑥 <𝑥<𝑙 k
𝑙 2

Solution.
x
a) Even periodic expansion. l/2 l
b) Odd periodic expansion.
Some useful trick…
● When calculating the Fourier coefficients 𝑎𝑛 and 𝑏𝑛 for which 𝑛 = 1,2,3, …, the
following trigonometry results are useful.
● Each of these results, which are also true for 𝑛 = 0, −1, −2, −3, …, can be deduced
from the graph of sin 𝑥 or that of cos 𝑥 .
● If 𝑓(𝑥) is extended to the interval −𝑙 < 𝑥 < 𝑙 as an even function, then the Fourier
series representation over the interval is given by;
1 1
sin 𝑥 cos 𝑥

-3π -2π -π 0 π 2π 3π

-1 -1

0 𝑛 even 0 𝑛 odd
𝑛𝜋 𝑛 𝑛𝜋
sin 𝑛𝜋 = 0 sin =ቐ 1 𝑛 = 1,5,9, … cos 𝑛𝜋 = −1 cos =ቐ 1 𝑛 = 0,4,8, …
2 𝑛 = 3,7,11, … 2
−1 −1 𝑛 = 2,6,10, …

You might also like