AEMN04E - Topic 5 (5.1-5.4) - Fourier Series
AEMN04E - Topic 5 (5.1-5.4) - Fourier Series
AEMN04E - Topic 5 (5.1-5.4) - Fourier Series
LEARNING OBJECTIVES:
At the end of the discussion, the student should be able to:
1. obtain Fourier series of a given function
2. obtain half-range Fourier sine or cosine series
KEY TERMS
Fourier
Fourier series odd function periodic function
coefficients
half-range Fourier
even function period
series
CORE CONTENT
period=2𝜋
(one full wave)
𝑦 = 𝑠𝑖𝑛𝑥
period=2𝜋
(one full wave)
𝑦 = 𝑐𝑜𝑠 𝑥
𝜋
Example 2: The function 𝑡𝑎𝑛𝑥 has period 𝜋 and 𝑡𝑎𝑛𝑘𝑥 has period
|𝑘|
Example 3: A constant function 𝑓(𝑥) = 𝑐 has any positive number as period.
Recall:
A function 𝑓 is neither even nor odd if 𝑓(−𝑥) ≠ 𝑓(𝑥) and 𝑓(−𝑥) ≠ −𝑓(𝑥).
Examples:
The functions 3𝑥 + 1, 4𝑥 6 + 5𝑥 3 + 2 are neither even nor odd.
Examples:
2
1. ∫−2 𝑥 3 𝑑𝑥 = 0 since 𝑥 3 is odd
3 3
2. ∫−3(𝑥 4 − 5𝑥 2 + 6)𝑑𝑥 = 2 ∫0 (𝑥 4 − 5𝑥 2 + 6)𝑑𝑥 since 𝑥 4 − 5𝑥 2 + 6 is even
𝜋
3. ∫−𝜋 𝑥 2 𝑠𝑖𝑛𝑥 𝑑𝑥 = 0 since 𝑥 2 𝑠𝑖𝑛𝑥 is odd
𝜋 𝜋
4. ∫−𝜋 𝑥 𝑠𝑖𝑛𝑥 𝑑𝑥 = 2 ∫0 𝑥 𝑠𝑖𝑛𝑥 𝑑𝑥 since 𝑥 𝑠𝑖𝑛𝑥 is even
5.2 Fourier Series
Example 1: Find the Fourier series of the function 𝑓(𝑥) = 𝑥 for −𝜋 < 𝑥 < 𝜋.
Solution:
“sawtooth wave”
1 𝐿 𝑛𝜋𝑥 1 𝜋 𝑛𝜋𝑥
𝑏𝑛 = 𝐿 ∫−𝐿 𝑓(𝑥) sin ( ) 𝑑𝑥 = 𝜋 ∫−𝜋 𝑥 sin ( ) 𝑑𝑥
𝐿 𝜋
1 𝜋
= 𝜋 ∫−𝜋 𝑥 sin 𝑛𝑥 𝑑𝑥
1 𝜋
= 𝜋 ∙ 2 ∫0 𝑥 sin 𝑛𝑥 𝑑𝑥 since 𝑥 sin 𝑛𝑥 is an even function
𝜋 −𝑥 𝑐𝑜𝑠𝑛𝑥 𝜋 𝜋 𝑐𝑜𝑠𝑛𝑥
∫0 𝑥 sin 𝑛𝑥 𝑑𝑥 = 𝑛
] − ∫0 − 𝑛
𝑑𝑥
0
−𝑥 𝑐𝑜𝑠𝑛𝑥 𝜋 1 𝜋
= ] + 𝑛 ∫0 𝑐𝑜𝑠𝑛𝑥 𝑑𝑥
𝑛0
−𝑥 𝑐𝑜𝑠𝑛𝑥 𝜋 1 sin 𝑛𝑥 𝜋
= ] +𝑛∙ ]
𝑛 0 𝑛 0
−𝑥 𝑐𝑜𝑠𝑛𝑥 sin 𝑛𝑥 𝜋
= + ]
𝑛 𝑛2 0
−𝜋 𝑐𝑜𝑠𝑛𝜋 sin 𝑛𝜋 −0 𝑐𝑜𝑠𝑛0 sin 𝑛0
=( + )−( + )
𝑛 𝑛2 𝑛 𝑛2
−𝜋 𝑐𝑜𝑠𝑛𝜋
= +0+0−0
𝑛
−𝜋
= (−1)𝑛 since 𝑐𝑜𝑠𝑛𝜋 = (−1)𝑛 , 𝑛 is an integer
𝑛
𝜋
= 𝑛 (−1)𝑛+1
1 𝜋 1 𝜋 2
Thus , 𝑏𝑛 =𝜋 ∙ 2 ∫0 𝑥 sin 𝑛𝑥 𝑑𝑥 = 𝜋 ∙ 2 ∙ (−1)𝑛+1 = (−1)𝑛+1
𝑛 𝑛
2
We obtained 𝑎0 = 0, 𝑎𝑛 = 0 and 𝑏𝑛 = (−1)𝑛+1 . Hence, the Fourier series is
𝑛
1 𝑛𝜋𝑥 𝑛𝜋𝑥
𝑥 = 𝑎0 + ∑+∞
𝑛=1 [𝑎𝑛 𝑐𝑜𝑠 ( ) + 𝑏𝑛 𝑠𝑖𝑛 ( )]
2 𝐿 𝐿
1 𝑛𝜋𝑥 2 𝑛𝜋𝑥
𝑥 = (0) + ∑+∞
𝑛=1 [(0) 𝑐𝑜𝑠 ( ) + (−1)𝑛+1 𝑠𝑖𝑛 ( )]
2 𝜋 𝑛 𝜋
2
𝑥 = ∑+∞
𝑛=1 (−1)𝑛+1 sin 𝑛𝑥
𝑛
2 sin 𝑛𝑥
𝑥 = ∑+∞
𝑛=1 (−1)
𝑛+1
𝑛
0, −5 < 𝑥 < 0
Example 2: Find the Fourier series of the function whose definition in one period is 𝑓(𝑥) = { .
3, 0 < 𝑥 < 5
Solution:
“square wave”
1 𝑐+2𝐿 𝑛𝜋𝑥
𝑎𝑛 = 𝐿 ∫𝑐 𝑓(𝑥) cos ( ) 𝑑𝑥
𝐿
1 5 𝑛𝜋𝑥
= 5 ∫−5 𝑓(𝑥) cos ( ) 𝑑𝑥
5
1 0 𝑛𝜋𝑥 5 𝑛𝜋𝑥
= 5 [∫−5 0 cos ( ) 𝑑𝑥 + ∫0 3 cos ( ) 𝑑𝑥]
5 5
3 5 𝑛𝜋𝑥
= 5 ∫0 cos ( ) 𝑑𝑥
5
3 5 𝑛𝜋𝑥 5
= 5 ∙ 𝑛𝜋 𝑠𝑖𝑛 ]
5 0
3
=𝑛𝜋 [sin 𝑛𝜋 − 𝑠𝑖𝑛0] sin 𝑛𝜋 = 0 for any integer 𝑛
𝑎𝑛 = 0 , if 𝑛 ≠ 0
1 𝑐+2𝐿 𝑛𝜋𝑥
𝑏𝑛 = 𝐿 ∫𝑐 𝑓(𝑥) sin ( ) 𝑑𝑥
𝐿
1 5 𝑛𝜋𝑥
= 5 ∫−5 𝑓(𝑥) sin ( ) 𝑑𝑥
5
1 0 𝑛𝜋𝑥 5 𝑛𝜋𝑥
=5 [∫−5 0 sin ( ) 𝑑𝑥 + ∫0 3 sin ( ) 𝑑𝑥]
5 5
3 5 𝑛𝜋𝑥
= 5 ∫0 sin ( ) 𝑑𝑥
5
3 −5 𝑛𝜋𝑥 5
= 5 ∙ 𝑛𝜋 𝑐𝑜𝑠 ]
5 0
3
=− 𝑛𝜋 [cos 𝑛𝜋 − 𝑐𝑜𝑠0]
3
=− 𝑛𝜋 [(−1)𝑛 − 1] 𝑐𝑜𝑠𝑛𝜋 = (−1)𝑛 , 𝑛 is an integer
3
𝑏𝑛 =𝑛𝜋 [1 − (−1)𝑛 ]
Example 3: Find the Fourier series of the function 𝑓(𝑥) = 𝑥 2 , 0 < 𝑥 < 2𝜋.
Solution:
1 𝑐+2𝐿 𝑛𝜋𝑥
𝑎𝑛 = 𝐿 ∫𝑐 𝑓(𝑥) cos ( ) 𝑑𝑥
𝐿
1 2𝜋 𝑛𝜋𝑥
=𝜋 ∫0 𝑥 2 cos ( ) 𝑑𝑥
𝜋
1 2𝜋
=𝜋 ∫0 𝑥 2 cos 𝑛𝑥 𝑑𝑥
Using integration by parts twice or tabular integration , we obtain
2𝜋
1 𝑥 2 sin 𝑛𝑥 2𝑥 𝑐𝑜𝑠𝑛𝑥 2 sin 𝑛𝑥
=𝜋 [ + − ]
𝑛 𝑛2 𝑛3 0
1 4𝜋 2 sin 2𝑛𝜋 4𝜋 𝑐𝑜𝑠2𝑛𝜋 2 sin 2𝑛𝜋 2 sin 0
=𝜋 [ + − −0−0+ ] 𝑠𝑖𝑛2𝑛𝜋 = 0, 𝑐𝑜𝑠2𝑛𝜋 = 1
𝑛 𝑛2 𝑛3 𝑛3
1 4𝜋
=𝜋 [ 𝑛 2 ]
4
𝑎𝑛 = 𝑛2 , if 𝑛 ≠ 0
1 𝑐+2𝐿 𝑛𝜋𝑥
𝑏𝑛 = 𝐿 ∫𝑐 𝑓(𝑥) sin ( ) 𝑑𝑥
𝐿
1 2𝜋 𝑛𝜋𝑥
=𝜋 ∫0 𝑥 2 sin ( ) 𝑑𝑥
𝜋
1 2𝜋
= 𝜋 ∫0 𝑥 2 sin 𝑛𝑥 𝑑𝑥
2𝜋
1 −𝑥 2 cos 𝑛𝑥 2𝑥 sin 𝑛𝑥 2 cos 𝑛𝑥
=𝜋 [ + + ]
𝑛 𝑛2 𝑛3 0
1 −4𝜋2 cos 2𝑛𝜋 4𝜋 𝑠𝑖𝑛2𝑛𝜋 2 cos 2𝑛𝜋 2 cos 0
=𝜋 [ + + +0−0− ]
𝑛 𝑛2 𝑛3 𝑛3
1 4𝜋 2 2 2
= 𝜋 [− + 𝑛3 − 𝑛3 ]
𝑛
4𝜋
𝑏𝑛 = − 𝑛
−4, −𝜋 ≤ 𝑥 ≤ 0
Example 4: Determine the Fourier series of the function 𝑓(𝑥) = {
4, 0 < 𝑥 ≤ 𝜋
Solution:
“square wave”
1 𝑐+2𝐿 𝑛𝜋𝑥
𝑏𝑛 = 𝐿 ∫𝑐 𝑓(𝑥) sin ( ) 𝑑𝑥
𝐿
1 𝜋 𝑛𝜋𝑥
=𝜋 ∫−𝜋 𝑓(𝑥) sin ( ) 𝑑𝑥
𝜋
1 𝜋
= ∫−𝜋 𝑓(𝑥) sin 𝑛𝑥 𝑑𝑥
𝜋
1 0 𝜋
=𝜋 [∫−𝜋 −4 sin 𝑛𝑥 𝑑𝑥 + ∫0 4 sin 𝑛𝑥 𝑑𝑥]
1 4 0 4 𝜋
=𝜋 {𝑛 cos 𝑛𝑥] − 𝑛 cos 𝑛𝑥] }
−𝜋 0
1 4 4 4 4
=𝜋 {𝑛 + 𝑛 cosnπ − 𝑛 cos 𝑛𝜋 + 𝑛}
1 8 8
=𝜋 {𝑛 − 𝑛 cos 𝑛𝜋}
8
=𝑛𝜋 {1 − 𝑐𝑜𝑠𝑛𝜋} 𝑐𝑜𝑠𝑛𝜋 = (−1)𝑛
8
𝑏𝑛 = {1 − (−1)𝑛 }
𝑛𝜋
Note:
The Fourier series corresponding to an odd function consists of sine terms only (𝑎𝑛 = 0), and the
Fourier series corresponding to an even function consists of cosine terms only (𝑏𝑛 = 0)and possibly a
constant which is considered a cosine term.
2 𝐿 𝑛𝜋𝑥
For half-range Fourier sine series: 𝑎𝑛 = 0, 𝑏𝑛 = 𝐿 ∫0 𝑓(𝑥) sin 𝑑𝑥
𝐿
2 𝐿 𝑛𝜋𝑥
For half-range Fourier cosine series: 𝑏𝑛 = 0, 𝑎𝑛 = 𝐿 ∫0 𝑓(𝑥) cos 𝑑𝑥
𝐿
Example 1: Expand 𝑓(𝑥) = 𝑥, 0 < 𝑥 < 2 in a half-range Fourier sine series.
Solution:
We extend the definition of the given function to that of an odd function of period 4. This is called the
odd extension of 𝑓.
Extend 0 < 𝑥 < 2 to −2 < 𝑥 < 2 so that 2𝐿 = 4 and 𝐿 = 2.
“sawtooth wave”
odd extension
𝑎𝑛 = 0
2 𝐿 𝑛𝜋𝑥
𝑏𝑛 = 𝐿 ∫0 𝑓(𝑥) sin 𝑑𝑥
𝐿
2 2 𝑛𝜋𝑥
=2 ∫0 𝑥 sin 2 𝑑𝑥
2 𝑛𝜋𝑥
=∫0 𝑥 sin 2 𝑑𝑥
𝑛𝜋𝑥
Using integration by parts with 𝑢 = 𝑥 , 𝑑𝑣 = sin 𝑑𝑥 , we get
2
2 𝑛𝜋𝑥
𝑑𝑢 = 𝑑𝑥 , 𝑣=− 𝑐𝑜𝑠
𝑛𝜋 2
−2𝑥 𝑛𝜋𝑥 2
2 2 𝑛𝜋𝑥
= 𝑛𝜋 𝑐𝑜𝑠 2 ] − ∫0 − 𝑛𝜋 𝑐𝑜𝑠 2 𝑑𝑥
0
−2𝑥 𝑛𝜋𝑥 4 𝑛𝜋𝑥 2
= 𝑛𝜋 𝑐𝑜𝑠 + 𝑛2 𝜋2 sin ]
2 2 0
−4 4
= [ 𝑛𝜋 cos 𝑛𝜋 + 𝑛2 𝜋2 sin𝑛𝜋] − [0 + 0]
−4
= 𝑛𝜋 𝑐𝑜𝑠𝑛𝜋
−4
= 𝑛𝜋 (−1)𝑛
4
𝑏𝑛 = 𝑛𝜋 (−1)𝑛+1
4 𝑛𝜋𝑥
The half-range Fourier sine series is 𝑥 = ∑+∞
𝑛=1(−1)
𝑛+1
𝑠𝑖𝑛 ( )
𝑛𝜋 2
even extension
𝑏𝑛 = 0
2 𝐿 𝑛𝜋𝑥
𝑎𝑛 = 𝐿 ∫0 𝑓(𝑥) cos 𝑑𝑥
𝐿
2 2 𝑛𝜋𝑥
= 2 ∫0 𝑥 cos 𝑑𝑥
2
2 𝑛𝜋𝑥
= ∫0 𝑥 cos 𝑑𝑥
2
𝑛𝜋𝑥
Applying integration by parts with 𝑢 = 𝑥 , 𝑑𝑣 = cos 𝑑𝑥 , we have
2
2 𝑛𝜋𝑥
𝑑𝑢 = 𝑑𝑥 , 𝑣 = 𝑛𝜋 𝑠𝑖𝑛 2
2𝑥 𝑛𝜋𝑥 2
2 2 𝑛𝜋𝑥
= 𝑛𝜋 𝑠𝑖𝑛 2 ] − ∫0 𝑛𝜋 𝑠𝑖𝑛 2 𝑑𝑥
0
2𝑥 𝑛𝜋𝑥 4 𝑛𝜋𝑥 2
= 𝑛𝜋 𝑠𝑖𝑛 + 𝑛2 𝜋2 cos ]
2 2 0
4 4 4
=[𝑛𝜋 sin 𝑛𝜋 + 𝑛2 𝜋2 cos𝑛𝜋] − [0 + 𝑛2𝜋2 cos0]
4 4
= 𝑛2 𝜋2 cos𝑛𝜋 − 𝑛2 𝜋2
4
=𝑛2 𝜋2 {𝑐𝑜𝑠𝑛𝜋 − 1}
4
𝑎𝑛 = 𝑛2 𝜋2 {(−1)𝑛 − 1} if 𝑛 ≠ 0
2
2 2 𝑥2
If 𝑛 = 0: 𝑎0 = ∫0 𝑥 cos 0 𝑑𝑥 = ∫0 𝑥 𝑑𝑥 = 2 ] = 2
0
IN-TEXT ACTIVITY
REFERENCES
Solve the following problems. Show complete solutions and box your final answers. (10 pts each)
Problem 1: Obtain the Fourier series for the function 𝑓 whose definition in one period is
𝑓(𝑥) = 4𝑥, 0 < 𝑥 < 10. Sketch the graph of 𝑓.
Problem 2: Determine the Fourier series for the function 𝑓 whose definition in one period is
8 ,0 < 𝑥 < 2
𝑓(𝑥) = { . Sketch the graph of 𝑓.
−8, 2 < 𝑥 < 4
Problem 3: Obtain the Fourier series for the function 𝑓 whose definition in one period is
𝑓(𝑥) = 2 − 𝑥, −2 < 𝑥 < 2. Sketch the graph of 𝑓.