0% found this document useful (0 votes)
6 views11 pages

Work 2 Sol

The document provides solutions to various problems related to Fourier series, including sketches of specific functions and calculations of their Fourier coefficients. It covers functions such as |x| and |sin x| over defined intervals, detailing the steps to derive their Fourier series representations. The solutions emphasize the periodic nature of the functions and the application of integration techniques to find the coefficients.

Uploaded by

aliaashamek77
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views11 pages

Work 2 Sol

The document provides solutions to various problems related to Fourier series, including sketches of specific functions and calculations of their Fourier coefficients. It covers functions such as |x| and |sin x| over defined intervals, detailing the steps to derive their Fourier series representations. The solutions emphasize the periodic nature of the functions and the application of integration techniques to find the coefficients.

Uploaded by

aliaashamek77
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Mathematics Department

Dr. Mohammad Yasin

Worksheet (2) Solution


Fourier Series

Problem 1:
Knowing that 𝑓(𝑥) = 𝑓(𝑥 + 2𝜋) , sketch its graph in each of the following cases:

(a) 𝑓(𝑥) = |𝑥|, −𝜋 <𝑥 <𝜋 𝑥 if − 𝜋 < 𝑥 < 0


(c) 𝑓(𝑥) = {
(b) 𝑓(𝑥) = |sin 𝑥|, 0 < 𝑥 < 2𝜋 𝜋 − 𝑥 if 0 < 𝑥 < 𝜋

Solution:

(a) 𝑓(𝑥) = |𝑥|, −𝜋 <𝑥 <𝜋

(b) 𝑓(𝑥) = |sin 𝑥|, 0 < 𝑥 < 2𝜋

Page 1 of 11
𝑥 if − 𝜋 < 𝑥 ≤ 0
(c) 𝑓(𝑥) = {
𝜋 − 𝑥 if 0 < 𝑥 ≤ 𝜋

Problem 2:
Find the Fourier series of the given function 𝑓(𝑥), which is assumed to have a period 𝟐𝝅.

(a) 𝑓(𝑥) = |𝑥|, −𝜋 <𝑥 <𝜋 (c)

𝑥 if − 𝜋 < 𝑥 < 0
(b) 𝑓(𝑥) = {
𝜋 − 𝑥 if 0 < 𝑥 < 𝜋

Solution:

(a) 𝑓(𝑥) = |𝑥|, −𝜋 <𝑥 <𝜋

It is clear that 𝑓(𝑥) is even. So, 𝑏𝑛 = 0.

𝐿=𝜋


𝑎0
∴ 𝑓(𝑥) = + ∑ 𝑎𝑛 cos(𝑛𝑥)
2
𝑛=1

Page 2 of 11
𝜋
1
𝑎0 = ∫ 𝑓(𝑥) 𝑑𝑥
𝜋
−𝜋

𝜋 𝜋 𝜋
2 2 2 𝑥2
= ∫ 𝑓(𝑥) 𝑑𝑥 = ∫ 𝑥 𝑑𝑥 = [ ] = 𝜋
𝜋 𝜋 𝜋 2 0
0 0

𝜋
1
𝑎𝑛 = ∫ 𝑓(𝑥) cos(𝑛𝑥) 𝑑𝑥
𝜋
−𝜋

𝜋 𝜋
2 2
= ∫ 𝑓(𝑥) cos(𝑛𝑥) 𝑑𝑥 = ∫ 𝑥 cos(𝑛𝑥) 𝑑𝑥
𝜋 𝜋
0 0

using integration by parts 𝑑 Τ𝑑𝑥 ∫ 𝑑𝑥

𝜋 𝑥 cos(𝑛𝑥)
2 𝑥 sin(𝑛𝑥) cos(𝑛𝑥) +
= [ + ] sin(𝑛𝑥)
𝜋 𝑛 𝑛2 0 1
− 𝑛
− cos(𝑛𝑥)
2 𝜋 sin(𝑛𝜋) cos(𝑛𝜋) 1 0
= [( + ) − (0 + )] 𝑛2
𝜋 𝑛 𝑛2 𝑛2

2 (−1)𝑛 1 Note that


= [ 2 − 2]
𝜋 𝑛 𝑛
𝐬𝐢𝐧(𝒏𝝅) = 𝟎
2 and 𝐜𝐨𝐬(𝒏𝝅) = (−𝟏)𝒏
= [(−1)𝑛 − 1]
𝑛2 𝜋

Hence, the Fourier series of 𝑓(𝑥) is:



𝜋 2 [(−1)𝑛 − 1]
𝑓(𝑥) = + ∑ cos(𝑛𝑥)
2 𝜋 𝑛2
𝑛=1

Page 3 of 11
𝑥 if − 𝜋 < 𝑥 ≤ 0
(b) 𝑓(𝑥) = {
𝜋 − 𝑥 if 0 < 𝑥 ≤ 𝜋

It is clear that 𝑓(𝑥) is neither odd nor even and 𝐿 = 𝜋 .


𝑎0
∴ 𝑓(𝑥) = + ∑ [𝑎𝑛 cos(𝑛𝑥) + 𝑏𝑛 sin(𝑛𝑥)]
2
𝑛=1

𝜋
1
𝑎0 = ∫ 𝑓(𝑥) 𝑑𝑥
𝜋
−𝜋

0 𝜋 0 𝜋
1 1 𝑥2 𝑥2
= [ ∫(𝑥)𝑑𝑥 + ∫(𝜋 − 𝑥) 𝑑𝑥 ] = [( )| + (𝜋𝑥 − )| ] = 0
𝜋 𝜋 2 −𝜋 2 0
−𝜋 0

𝜋
𝑑 Τ𝑑𝑥 ∫ 𝑑𝑥
1
𝑎𝑛 = ∫ 𝑓(𝑥) cos(𝑛𝑥) 𝑑𝑥
𝜋 𝑥 cos(𝑛𝑥)
+
−𝜋
sin(𝑛𝑥)
1
0 𝜋 − 𝑛
1 − cos(𝑛𝑥)
= [ ∫ 𝑥 cos(𝑛𝑥) 𝑑𝑥 + ∫(𝜋 − 𝑥) cos(𝑛𝑥) 𝑑𝑥] 0
𝜋 𝑛2
−𝜋 0

0 𝜋
1 𝑥 sin(𝑛𝑥) cos(𝑛𝑥) (𝜋 − 𝑥) sin(𝑛𝑥) cos(𝑛𝑥)
= ([ + ] + [ − ] )
𝜋 𝑛 𝑛2 −𝜋
𝑛 𝑛 2
0

1 2 2 cos(𝑛𝜋) 2 𝑑 Τ𝑑𝑥 ∫ 𝑑𝑥
= [ 2− 2
] = 2
[1 − (−1)𝑛 ]
𝜋 𝑛 𝑛 𝑛 𝜋 𝜋−𝑥 cos(𝑛𝑥)
+

sin(𝑛𝑥)
−1
− 𝑛
− cos(𝑛𝑥)
0
𝑛2

Page 4 of 11
𝜋
𝑑 Τ𝑑𝑥 ∫ 𝑑𝑥
1
𝑏𝑛 = ∫ 𝑓(𝑥) sin(𝑛𝑥) 𝑑𝑥
𝜋 𝑥 sin(𝑛𝑥)
+
−𝜋
− cos(𝑛𝑥)
1
0 𝜋 − 𝑛
1 − sin(𝑛𝑥)
= [ ∫ 𝑥 sin(𝑛𝑥) 𝑑𝑥 + ∫(𝜋 − 𝑥) sin(𝑛𝑥) 𝑑𝑥] 0
𝜋 𝑛2
−𝜋 0

0 𝜋
1 −𝑥 cos(𝑛𝑥) sin(𝑛𝑥) −(𝜋 − 𝑥) cos(𝑛𝑥) sin(𝑛𝑥)
= ([ + ] + [ − ] )
𝜋 𝑛 𝑛2 −𝜋
𝑛 𝑛 2
0

1 −𝜋 cos(𝑛𝜋) 𝜋 1 𝑑 Τ𝑑𝑥 ∫ 𝑑𝑥
= [ + ] = [1 − cos(𝑛𝜋)]
𝜋 𝑛 𝑛 𝑛 𝜋−𝑥 + sin(𝑛𝑥)

− cos(𝑛𝑥)
1 −1
= [1 − (−1)𝑛 ] − 𝑛
𝑛 − sin(𝑛𝑥)
0
𝑛2
Hence, the Fourier series of 𝑓(𝑥) is


2 𝑛]
1
𝑓(𝑥) = ∑ { 2
[1 − (−1) cos(𝑛𝑥) + [1 − (−1)𝑛 ] sin(𝑛𝑥) }
𝑛 𝜋 𝑛
𝑛=1

Page 5 of 11
(c) The given sketch of 𝑓(𝑥) can be described over its period as follows:

0 if − 𝜋 < 𝑥 < −𝜋Τ2

𝑓(𝑥) = 𝑥 if −𝜋Τ2 < 𝑥 < 𝜋Τ2

{0 if 𝜋 Τ2 < 𝑥 < 𝜋

It is clear that 𝑓(𝑥) is odd. So, 𝑎0 = 𝑎𝑛 = 0 and 𝐿 = 𝜋 .

∴ 𝑓(𝑥) = ∑ 𝑏𝑛 sin(𝑛𝑥)
𝑛=1
𝜋
1
𝑏𝑛 = ∫ 𝑓(𝑥) sin(𝑛𝑥) 𝑑𝑥
𝜋
−𝜋

𝜋 𝜋/2 𝜋
2 2
= ∫ 𝑓(𝑥) sin(𝑛𝑥) 𝑑𝑥 = [ ∫ 𝑥 sin(𝑛𝑥) 𝑑𝑥 + ∫ 0 𝑑𝑥 ]
𝜋 𝜋
0 0 𝜋/2

𝜋
2 −𝑥 cos(𝑛𝑥) sin(𝑛𝑥) 2
𝑑 Τ𝑑𝑥 ∫ 𝑑𝑥
= [ + ]
𝜋 𝑛 𝑛2 0 𝑥 sin(𝑛𝑥)
+

𝑛𝜋 𝑛𝜋 − cos(𝑛𝑥)
1
2 −𝜋 cos ( 2 ) sin ( 2 ) − 𝑛
= [ + ]
𝜋 2𝑛 𝑛2 0
− sin(𝑛𝑥)
𝑛2

Hence, the Fourier series of 𝑓(𝑥) is

∞ 𝑛𝜋 𝑛𝜋
− cos ( ) 2 sin ( )
𝑓(𝑥) = ∑ [ 2 + 2 ] sin(𝑛𝑥)
𝑛 2
𝑛 𝜋
𝑛=1

Page 6 of 11
Problem 3:
Find the Fourier series of the given periodic functions, defined over its fundamental interval.

Solution:

(a) The given sketch of 𝑓(𝑥) can be described over its fundamental interval as follows:

−1 if − 2 < 𝑥 < 0
𝑓(𝑥) = {
1 if 0 < 𝑥 < 2

2𝐿 = 4 → 𝐿=2

It is clear that 𝑓(𝑥) is odd. So, 𝑎0 = 𝑎𝑛 = 0.


𝑛𝜋𝑥
𝑓(𝑥) = ∑ 𝑏𝑛 sin ( )
2
𝑛=1
𝐿
1 𝑛𝜋𝑥
𝑏𝑛 = ∫ 𝑓(𝑥) sin ( ) 𝑑𝑥
𝐿 𝐿
−𝐿

𝐿 2
2 𝑛𝜋𝑥 𝑛𝜋𝑥 −2 𝑛𝜋𝑥 2 2
= ∫ 𝑓(𝑥) sin ( ) 𝑑𝑥 = ∫ sin ( ) 𝑑𝑥 = [cos ( )] = [1 − (−1)𝑛 ]
𝐿 𝐿 2 𝑛𝜋 2 0 𝑛𝜋
0 0

The Fourier series of 𝑓(𝑥) is



2 𝑛𝜋𝑥
𝑓(𝑥) = ∑ [1 − (−1)𝑛 ] sin ( )
𝑛𝜋 2
𝑛=1

Page 7 of 11
(b) The given sketch of 𝑓(𝑥) can be described over its fundamental interval as follows:

0 if − 1Τ2 < 𝑥 < 0


𝑓(𝑥) = {
𝑥 if 0 < 𝑥 < 1Τ2

2𝐿 = 1 → 𝐿 = 1Τ2

It is clear that 𝑓(𝑥) is neither odd nor even. So,


𝑎0
∴ 𝑓(𝑥) = + ∑ [𝑎𝑛 cos(2𝑛𝜋𝑥) + 𝑏𝑛 sin(2𝑛𝜋𝑥)]
2
𝑛=1

𝐿
1
𝑎0 = ∫ 𝑓(𝑥) 𝑑𝑥
𝐿
−𝐿

1
0 2 1
𝑥2 2 1
= 2 ∫ 0 𝑑𝑥 + ∫ 𝑥 𝑑𝑥 = 2 ( )| =
2 0 4
−1 0
[ 2 ]

𝐿
1 𝑛𝜋𝑥
𝑎𝑛 = ∫ 𝑓(𝑥) cos ( ) 𝑑𝑥
𝐿 𝐿 𝑑 Τ𝑑𝑥 ∫ 𝑑𝑥
−𝐿
𝑥 cos(2𝑛𝜋𝑥)
+
1
0 2 sin(2𝑛𝜋𝑥)
1 1
= ∫ 0 cos(2𝑛𝜋𝑥) 𝑑𝑥 + ∫ 𝑥 cos(2𝑛𝜋𝑥) 𝑑𝑥 − 2𝑛𝜋
0.5 − cos(2𝑛𝜋𝑥)
−1 0 0
[ 2 ] 4𝑛2 𝜋 2

1
𝑥 sin(2𝑛𝜋𝑥) cos(2𝑛𝜋𝑥) 1 2
= 2[ + 2 2
] = 2 2
[(−1)𝑛 − 1]
2𝑛𝜋 4𝑛 𝜋 0
2𝑛 𝜋

Page 8 of 11
𝐿
1 𝑛𝜋𝑥
𝑏𝑛 = ∫ 𝑓(𝑥) sin ( ) 𝑑𝑥
𝐿 𝐿
−𝐿 𝑑Τ𝑑𝑥 ∫ 𝑑𝑥

𝑥 sin(2𝑛𝜋𝑥)
1 +
0 2
− cos(2𝑛𝜋𝑥)
1 1
= ∫ 0 sin(2𝑛𝜋𝑥) 𝑑𝑥 + ∫ 𝑥 sin(2𝑛𝜋𝑥) 𝑑𝑥 − 2𝑛𝜋
0.5
−1 0 − sin(2𝑛𝜋𝑥)
[ 2 ] 0
4𝑛2 𝜋 2
1
−𝑥 cos(2𝑛𝜋𝑥) sin(2𝑛𝜋𝑥) 2 − cos(𝑛𝜋) (−1)𝑛+1
= 2[ + ] = =
2𝑛𝜋 4𝑛2 𝜋 2 0 2𝑛𝜋 2𝑛𝜋

Hence, the Fourier series of 𝑓(𝑥) is


1 [(−1)𝑛 − 1] (−1)𝑛+1
𝑓(𝑥) = + ∑ { cos (2𝑛𝜋𝑥) + sin(2𝑛𝜋𝑥) }
8 2𝑛2 𝜋 2 2𝑛𝜋
𝑛=1

(c) The given sketch of 𝑓(𝑥) can be described over its fundamental interval as follows:

1+𝑥 if − 1 < 𝑥 < 0


𝑓(𝑥) = {
1−𝑥 if 0 < 𝑥 < 1

2𝐿 = 2 → 𝐿=1

It is clear that 𝑓(𝑥) is even. So, 𝑏𝑛 = 0.


𝑎0
∴ 𝑓(𝑥) = + ∑ 𝑎𝑛 cos(𝑛𝜋𝑥)
2
𝑛=1

Page 9 of 11
𝐿
1
𝑎0 = ∫ 𝑓(𝑥) 𝑑𝑥
𝐿
−𝐿

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

𝐿
1 𝑛𝜋𝑥
𝑎𝑛 = ∫ 𝑓(𝑥) cos ( ) 𝑑𝑥
𝐿 𝐿
−𝐿

𝐿 1
2 𝑛𝜋𝑥 𝑑 Τ𝑑𝑥 ∫ 𝑑𝑥
= ∫ 𝑓(𝑥) cos ( ) 𝑑𝑥 = 2 ∫(1 − 𝑥) cos(𝑛𝜋𝑥) 𝑑𝑥
𝐿 𝐿
0 0 1−𝑥 +
cos(𝑛𝜋𝑥)

sin(𝑛𝜋𝑥)
1 −1
(1 − 𝑥) sin(𝑛𝜋𝑥) cos(𝑛𝜋𝑥) − 𝑛𝜋
= 2[ − ]
𝑛𝜋 𝑛2 𝜋 2 − cos(𝑛𝜋𝑥)
0 0
𝑛2 𝜋 2
− cos(𝑛𝜋) 1 2
= 2[ 2 2
+ 2 2
] = 2 2
[1 − (−1)𝑛 ]
𝑛 𝜋 𝑛 𝜋 𝑛 𝜋

Hence, the Fourier series of 𝑓(𝑥) is


1 2 [1 − (−1)𝑛 ]
𝑓(𝑥) = + 2 ∑ cos (𝑛𝜋𝑥)
2 𝜋 𝑛2
𝑛=1

Page 10 of 11
Problem 4:

The Fourier series of the functions 𝑓(𝑥) and ℎ(𝑥) are as follows

2 𝑛𝜋𝑥
𝑓(𝑥) = ∑ (1 − (−1)𝑛 ) sin ( ) and
𝑛𝜋 2
𝑛=1


2 𝑛)
1
ℎ(𝑥) = ∑ [ 2
(1 − (−1) cos(𝑛𝑥) + (1 − (−1)𝑛 ) sin(𝑛𝑥)].
𝑛 𝜋 𝑛
𝑛=1

Complete the following:

1. The period of 𝑓(𝑥) equals 4 (𝑳 = 𝟐).

2. The function 𝑓(𝑥) is symmetric about origin (odd function).

3. ∫ ℎ(𝑥) 𝑑𝑥 = 𝜋 𝑎0 = 0
−𝜋

𝜋
2
4. ∫ ℎ(𝑥) cos(𝑛𝑥) 𝑑𝑥 = 𝜋 𝑎𝑛 = 2
(1 − (−1)𝑛 )
𝑛
−𝜋

Page 11 of 11

You might also like