BMCG 1013
DIFFERENTIAL EQUATIONS
FOURIER SERIES
(Periodic Functions & Fourier Series)
Rahifa Ranom
[email protected]
Learning Outcomes
Upon completion of this week lesson, students should be
able to:
i. describe periodic functions
ii. determine even, odd and neither even nor odd
functions
iii. determine the Fourier Series of full range
CHAPTER 4
Fourier Series
❑ Periodic Functions
❑ Odd and Even Functions
❑ Finding a Fouries Series of a function
4.1 Periodic Functions
Definition
A function 𝑓(𝑡) defined on [−𝐿, 𝐿] is periodic function
with period of 𝑇 = 2𝐿 if
𝑓 𝑡+𝑇 =𝑓 𝑡 , 𝑇 >0
The smallest positive value of 𝑇 is called a period of
the function 𝑓(𝑡) .
Example 4.1
Show that 𝑓 𝑡 = sin 𝑡 is periodic function and find the period.
Solution:
The function 𝑓 𝑡 = sin 𝑡 , hence 𝑓 𝑡 + 𝑇 = sin(𝑡 + 𝑇) .
Using the trigonometric identity
sin 𝑡 + 𝑇 = sin 𝑡 cos 𝑇 + cos 𝑡 sin 𝑇
If sin 𝑇 = 0 and cos 𝑇 = 1, this is true for 𝑇 = 2𝜋𝑛 where 𝑛 = 1,2,3, ⋯.
The smallest value for 𝑇 is 𝑇 = 2𝜋 which is known as fundamental period.
Thus, sin 𝑡 = sin(𝑡 + 2𝜋) is a periodic function with period of 2𝜋.
Example 4.2
Sketch the periodic function
𝑓 𝑡 = 𝑡 , −1 ≤ 𝑡 ≤ 1,
𝑓 𝑡 + 2 = 𝑓(𝑡)
within the interval −3 ≤ 𝑡 ≤ 3.
Solution:
Firstly, sketch the 𝑓 𝑡 = 𝑡 ,
−1 ≤ 𝑡 ≤ 1.
Then, with 𝑇 = 2 , extend the plot
within the interval −3 ≤ 𝑡 ≤ 3 by
repeating itself identically.
Exercise 4.1
1. Determine whether 𝑓 𝑡 = cos 2𝑡 is periodic function? If yes,
find the period, 𝑇.
2. Sketch a periodic function, 𝑓 𝑡 = 𝑡 2 , 𝑓 𝑡 + 2 = 𝑓 𝑡 .
Answers:
1. Periodic, 𝑇 = 𝜋
4.2 Odd and Even functions
Properties:
Let 𝑓(𝑡) be a real-valued function of a real variable. Then
i. 𝑓(𝑡) is an even function if 𝑓 −𝑡 = 𝑓(𝑡).
The graph of an even function is symmetric about the
𝑦-axis.
ii. 𝑓(𝑡) is an odd function if 𝑓 −𝑡 = −𝑓 𝑡 .
The graph of an odd function is symmetric about the
origin.
Example 4.3
i. 𝑓 𝑡 = 𝑡 2 is an even function.
2
Property 1: 𝑓 −𝑡 = −𝑡 = 𝑡 2 = 𝑓(𝑡).
Property 2: The graph is symmetric about
𝑦 −axis.
ii. 𝑓 𝑡 = 𝑡 3 is an odd function.
3
Property 1: 𝑓 −𝑡 = −𝑡 = −𝑡 3 = −𝑓(𝑡).
Property 2: The graph is symmetric about
the origin.
Example 4.4
Functions Property 1 Property 2
EVEN
𝑓 −𝑡 = 𝑓(𝑡) Symmetry about 𝑦 −axis
𝑡 , 𝑡 2 , 𝑡 4 , 𝑡 6 , cos 𝑡 , cosh 𝑡
ODD
𝑓 −𝑡 = −𝑓(𝑡) Symmetry about the origin
3 5
𝑡, 𝑡 , 𝑡 , sin 𝑡 , sinh 𝑡
Example 4.5
Given a function;
1 + 𝑡; −1 ≤ 𝑡 < 0
𝑓 𝑡 =ቊ
1 − 𝑡; 0≤𝑡<1
𝑓 𝑡 + 2 = 𝑓(𝑡)
i. Sketch the function over the interval −3,3
ii. Hence, determine whether the function is an odd or an even
function or neither.
Solution:
i.
ii. Since,
1 − 𝑡; 0 ≤ 𝑡 < 1
𝑓 −𝑡 = ቊ = 𝑓(𝑡)
1 + 𝑡; −1 ≤ 𝑡 < 0
and the sketch is symmetry about
𝑦 −axis, therefore, the function is an
even function.
Exercise 4.2
1. Show that 𝑓 𝑡 = cos 2𝑡 is an even function.
2. Determine whether the given function is even, odd or neither both of
them.
a) 𝑓 𝑡 = 𝑒 −𝑡 + 𝑒 𝑡
b) 𝑓 𝑡 = 𝑡 2 + 2
c) 𝑓 𝑡 = 𝑡 2 sin 𝑡
d) 𝑓 𝑡 = 𝑡 3 cos 𝑡
e) 𝑓 𝑡 = 𝑡𝑒 𝑡
3. Sketch the following function,
𝑓 𝑡 = 𝑡 2, −1 ≤ 𝑡 ≤ 1
𝑓 𝑡+2 =𝑓 𝑡
over the interval −3,3 . Hence, determine whether the function is an
even or an odd function.
Answers: 2. a) even b) even c) odd d) odd e) neither
3. even
4.3 Fourier Series
• Fourier Series is a series representing real periodic functions as an
expansion in a series of sine and cosine.
• The Fourier Series method is used to determine the unknown
coefficients arise in solving PDE.
• Applications:
Electrical engineering, vibration analysis, optics, signal processing,
image processing
Definition – Fourier Series
Let 𝑓(𝑡) be a periodic function defined in the interval [−𝐿, 𝐿] with period 𝑇 = 2𝐿 . If the
function 𝑓(𝑡) is either continuous or has finite discontinuities at some points in the
interval, hence, the Fourier series for 𝑓(𝑡) is given by
∞
𝑎0 𝑛𝜋𝑡 𝑛𝜋𝑡
𝑓 𝑡 = + 𝑎𝑛 cos + 𝑏𝑛 sin
2 𝐿 𝐿
𝑛=1
where the Fourier coefficients 𝑎0 , 𝑎𝑛 , 𝑏𝑛 are defined by
𝐿
1
𝑎0 = න 𝑓(𝑡) 𝑑𝑡
𝐿
−𝐿
𝐿
1 𝑛𝜋𝑡
𝑎𝑛 = න 𝑓 𝑡 cos 𝑑𝑡
𝐿 𝐿
−𝐿
𝐿
1 𝑛𝜋𝑡
𝑏𝑛 = න 𝑓 𝑡 sin 𝑑𝑡
𝐿 𝐿
−𝐿
• Working steps of Fourier Series
• Some helpful identities for calculating Fourier coefficients.
sin 0 = 0 ; cos 0 = 1
sin(−𝑡) = −sin 𝑡 ; cos(−𝑡) = cos 𝑡
sin 𝑛𝜋 = 0 ; cos 𝑛𝜋 = −1 𝑛
sin 2𝑛𝜋 = 0 ; cos 2𝑛𝜋 = 1
for 𝑛 integers.
Example 4.6
0 ; −2 ≤ 𝑡 < 0
Given a function, 𝑓 𝑡 = ቊ , 𝑓 𝑡 + 4 = 𝑓(𝑡).
𝑡; 0≤𝑡<2
i. Sketch the function over the interval [−6,6]. Determine whether the function
is even, odd or neither.
ii. Find the Fourier Series of the function.
Solution:
i.
The function is
neither even nor
odd function.
ii.
Step 1: Based on the function, 𝐿 = 2.
Step 2: Calculate the Fourier coefficients, 𝑎0 , 𝑎𝑛 , 𝑏𝑛
2 0 2
1 1
𝑎0 = න 𝑓(𝑡) 𝑑𝑡 = න 0𝑑𝑡 + න 𝑡𝑑𝑡
2 2
−2 −2 0
2
1 𝑡2 1 4
= = =1
2 2 0
2 2
2 0 2
1 𝑛𝜋𝑡 1 𝑛𝜋𝑡
𝑎𝑛 = න 𝑓 𝑡 cos 𝑑𝑡 = න 0𝑑𝑡 + න 𝑡 cos 𝑑𝑡
2 2 2 2 Tabular method:
−2 −2 0
2 Differentiate Integrate
1 2𝑡 𝑛𝜋𝑡 4 𝑛𝜋𝑡
= sin + 2 cos 2
2 𝑛𝜋 2 𝑛𝜋 0
1 4 =0 4 = −1 4𝑛
= sin 𝑛𝜋 + cos 𝑛𝜋 −
2 𝑛𝜋 𝑛𝜋 2 𝑛𝜋 2
2 𝑛−1
= −1
𝑛𝜋 2
2 0 2
1 𝑛𝜋𝑡 1 𝑛𝜋𝑡
𝑏𝑛 = න 𝑓 𝑡 sin 𝑑𝑡 = න 0𝑑𝑡 + න 𝑡 sin 𝑑𝑡
2 2 2 2
−2 −2 0
2
1 −2𝑡 𝑛𝜋𝑡 4 𝑛𝜋𝑡
= cos + 2
sin Differentiate Integrate
2 𝑛𝜋 2 𝑛𝜋 2 0
1 −4 = −1 4 𝑛
=0
= cos 𝑛𝜋 + sin 𝑛𝜋 − 0
2 𝑛𝜋 𝑛𝜋 2
−2 𝑛
2
= −1 = −1 𝑛+1
𝑛𝜋 𝑛𝜋
• Step 3: Substitute Fourier coefficients 𝑎0 , 𝑎𝑛 , 𝑏𝑛 into Fourier series formula.
∞
𝑎0 𝑛𝜋𝑡 𝑛𝜋𝑡
𝑓 𝑡 = + 𝑎𝑛 cos + 𝑏𝑛 sin
2 𝐿 𝐿
𝑛=1
∞
1 2 𝑛
𝑛𝜋𝑡 2 𝑛+1
𝑛𝜋𝑡
𝑓 𝑡 = + 2
−1 − 1 cos + −1 sin
2 𝑛𝜋 2 𝑛𝜋 2
𝑛=1
Solution to the Example 4.6
The function, 𝑓(𝑡) can be written in series;
0 ; −2 ≤ 𝑡 < 0
𝑓 𝑡 =ቊ , 𝑓 𝑡 + 4 = 𝑓(𝑡).
𝑡; 0≤𝑡<2
∞
1 2 𝑛
𝑛𝜋𝑡 2 𝑛+1 sin
𝑛𝜋𝑡
= + 2 −1 − 1 cos + −1
2 𝑛𝜋 2 𝑛𝜋 2
𝑛=1
How the Fourier series will look like graphically?
Example 4.6: Graphical Fourier Series for multiple 𝑛
5
1 2 𝑛
𝑛𝜋𝑡 2 𝑛+1 sin
𝑛𝜋𝑡
𝑓 𝑡 = + 2
−1 − 1 cos + −1
2 𝑛𝜋 2 𝑛𝜋 2
𝑛=1
Example 4.6: Graphical Fourier Series for multiple 𝑛
10
1 2 𝑛
𝑛𝜋𝑡 2 𝑛+1 sin
𝑛𝜋𝑡
𝑓 𝑡 = + 2 −1 − 1 cos + −1
2 𝑛𝜋 2 𝑛𝜋 2
𝑛=1
Example 4.6: Graphical Fourier Series for multiple 𝑛
25
1 2 𝑛
𝑛𝜋𝑡 2 𝑛+1 sin
𝑛𝜋𝑡
𝑓 𝑡 = + 2
−1 − 1 cos + −1
2 𝑛𝜋 2 𝑛𝜋 2
𝑛=1
Example 4.6: Graphical Fourier Series for multiple 𝑛
50
1 2 𝑛
𝑛𝜋𝑡 2 𝑛+1 sin
𝑛𝜋𝑡
𝑓 𝑡 = + 2 −1 − 1 cos + −1
2 𝑛𝜋 2 𝑛𝜋 2
𝑛=1
Example 4.7
Find the Fourier Series of the following function;
−2 ; −1 ≤ 𝑡 < 0
𝑓 𝑡 =ቊ , 𝑓 𝑡 + 2 = 𝑓(𝑡).
1; 0≤𝑡<1
Solution:
The function is
neither even nor
odd function.
Step 1: Based on the function and sketch, 𝐿 = 1.
Step 2: Calculate the Fourier coefficients, 𝑎0 , 𝑎𝑛 , 𝑏𝑛
1 0 1
1
𝑎0 = න 𝑓(𝑡) 𝑑𝑡 = න −2𝑑𝑡 + න 1𝑑𝑡
1
−1 −1 0
0
= ( −2𝑡 −1 + 𝑡 10 ) = −2 + 1 = −1
1 0 1
1 𝑛𝜋𝑡
𝑎𝑛 = න 𝑓 𝑡 cos 𝑑𝑡 = න −2 cos 𝑛𝜋𝑡 𝑑𝑡 + න cos 𝑛𝜋𝑡 𝑑𝑡
1 1
−1 −1 0
0 1
2 1
= − sin 𝑛𝜋𝑡 + sin 𝑛𝜋𝑡
𝑛𝜋 −1
𝑛𝜋 0
2 =0 1 =0
= − sin −𝑛𝜋 + sin 𝑛𝜋 = 0
𝑛𝜋 𝑛𝜋
1 0 1
1 𝑛𝜋𝑡
𝑏𝑛 = න 𝑓 𝑡 sin 𝑑𝑡 = න −2 sin 𝑛𝜋𝑡 𝑑𝑡 + න sin 𝑛𝜋𝑡 𝑑𝑡
1 1
−1 −1 0
0 1
2 −1
= cos 𝑛𝜋𝑡 + cos 𝑛𝜋𝑡
𝑛𝜋 −1
𝑛𝜋 0
= −1 𝑛 𝑛
2 1 = −1
= cos 0 − cos(−𝑛𝜋) − (cos 𝑛𝜋 − cos 0)
𝑛𝜋 𝑛𝜋
2 𝑛+1
1 𝑛+1
3 𝑛+1
= 1 + −1 + −1 +1 = 1 + −1
𝑛𝜋 𝑛𝜋 𝑛𝜋
• Step 3: Substitute Fourier coefficients 𝑎0 , 𝑎𝑛 , 𝑏𝑛 into Fourier series formula.
∞
𝑎0 𝑛𝜋𝑡 𝑛𝜋𝑡
𝑓 𝑡 = + 𝑎𝑛 cos + 𝑏𝑛 sin
2 𝐿 𝐿
𝑛=1
∞
1 3 𝑛+1
𝑓 𝑡 =− + 1 + −1 sin 𝑛𝜋𝑡
2 𝑛𝜋
𝑛=1
Example 4.7: Graphical Fourier Series for multiple 𝑛
5
1 3 𝑛+1
𝑓 𝑡 =− + 1 + −1 sin 𝑛𝜋𝑡
2 𝑛𝜋
𝑛=1
Example 4.7: Graphical Fourier Series for multiple 𝑛
15
1 3 𝑛+1
𝑓 𝑡 =− + 1 + −1 sin 𝑛𝜋𝑡
2 𝑛𝜋
𝑛=1
Example 4.7: Graphical Fourier Series for multiple 𝑛
50
1 3 𝑛+1
𝑓 𝑡 =− + 1 + −1 sin 𝑛𝜋𝑡
2 𝑛𝜋
𝑛=1
Example 4.7: Graphical Fourier Series for multiple 𝑛
100
1 3 𝑛+1
𝑓 𝑡 =− + 1 + −1 sin 𝑛𝜋𝑡
2 𝑛𝜋
𝑛=1
Exercise 4.3
Sketch and find the Fourier series of the following function;
𝑓 𝑡 = 1 − 𝑡 2; −1 ≤ 𝑡 ≤ 1
𝑓 𝑡+2 =𝑓 𝑡
Answers:
Step 1: Determine the parameter 𝐿: 𝐿 = 1.
Step 2: Calculate the Fourier coefficients, 𝑎0 , 𝑎𝑛 , 𝑏𝑛
4 4 𝑛+1 ; 𝑏 = 0
𝑎0 = ; 𝑎𝑛 = −1 𝑛
3 𝑛𝜋 2
Step 3: Substitute Fourier coefficients 𝑎0 , 𝑎𝑛 , 𝑏𝑛 into the Fourier series
formula.
∞
2 4 𝑛+1 cos 𝑛𝜋𝑡
𝑓 𝑡 = + 2
−1
3 𝑛𝜋
𝑛=1
Exercise 4.4
1. Given a function
𝑥; −𝜋 ≤ 𝑥 ≤ 0
𝑓 𝑥 =ቊ ;
0; 0≤𝑥≤𝜋
𝑓 𝑥 + 2𝜋 = 𝑓(𝑥)
a) Sketch the given function.
b) Determine the Fourier series of the function.
2. Find the Fourier series of the following functions
1
0; − 2 ≤ 𝑥 ≤ 0
a) 𝑓 𝑥 = ቐ 1 ; 𝑓 𝑥+1 =𝑓 𝑥
2; 0≤𝑥≤2
1 + 𝑡; −1 ≤ 𝑡 ≤ 0
b) 𝑓 𝑡 = ൜ ; 𝑓 𝑡 + 2 = 𝑓(𝑡)
1; 0≤𝑡≤1
Answer:
𝜋 1 1 −1 𝑛+1
1. b) 𝑓 𝑥 = − 4 + 𝜋 σ∞
𝑛=1 𝑛2 𝜋
1 + −1 𝑛+1 cos 𝑛𝑥 + 𝑛
sin 𝑛𝑥
2
2. a) 𝑓 𝑥 = 1 + σ∞
𝑛=1 𝑛𝜋 −1
𝑛+1
+ 1 sin 2𝑛𝜋𝑥
3 1 −1 𝑛+1
b) 𝑓 𝑡 = 4 + σ∞
𝑛=1 𝑛𝜋 2
1 + −1 𝑛+1
cos 𝑛𝜋𝑡 + 𝑛𝜋
sin 𝑛𝜋𝑡
References
Edwards C. H., Penny D.E. & Calvis D. (2016). Differential
Equations and Boundary Value Problems, 5thEdition. Pearson
Education Inc..
Zill, D. G. (2017). Differential Equations with Boundary-Value
Problems, 9thEdition. Cengage Learning Inc
Thank You
Questions & Answer?