You are on page 1of 10

Birmingham City University

Faculty of Computing, Engineering and the Built Environment

School of Engineering, Design and Manufacturing Systems
Mathematical Analysis - Feedback Sheets
These sheets are designed to provide feedback and to help you with the tutorial
worksheets.
They should not really be accessed until you have attempted the questions in the
tutorial.
Should you have any problems then you should contact your tutorial tutor in the first
instance or the module coordinator.
Help is also available in the Centre for Academic Success on level 4 (Millennium
Point)
Mathematical Analysis Fourier Worksheets Working out

2.a)

a) f(x)

x
 2 3 4 5 6 7

f(x) = 0 π < x < 2π (takes the value 0 between π and 2π)

f(x) = f(x + 2π) (repeats itself every 2π, i.e. the period is 2π)

Use the formulae to find a0, an and bn

  
1 1 1
π 
a0 =  f(x)dx
π 
an = f(x)cos(n x)dx and bn = f(x)sin(n x)dx
π 

1 𝜋 1 1
a0 = 𝜋 ∫0 5𝑑𝑥 = [5𝑥]𝜋0 = [5𝜋 − 5(0)] = 5
𝜋 𝜋

1 𝜋 1 5 𝜋 1 5 5
an = 𝜋 ∫0 5𝐶𝑜𝑠(𝑛𝑥)𝑑𝑥 = [ 𝑆𝑖𝑛(𝑛𝑥)] = [ 𝑆𝑖𝑛(𝑛𝜋) − 𝑛 𝑆𝑖𝑛(0)] = 0 for n
𝜋 𝑛 0 𝜋 𝑛

This is because sin(nπ) is zero for all n, sin(0) = 0, sin(π) = 0, sin(2π) = 0, sin(3π) = 0,
sin(4π) = 0 and so on

1 𝜋 1 5 𝜋 1 5 5
bn = 𝜋 ∫0 5𝑆𝑖𝑛(𝑛𝑥)𝑑𝑥 = 𝜋
[− 𝑛 𝐶𝑜𝑠(𝑛𝑥)] = 𝜋
[− 𝑛 𝐶𝑜𝑠(𝑛𝜋) − − 𝑛 𝐶𝑜𝑠(0)]
0

1 5 5
bn = [− 𝐶𝑜𝑠(𝑛𝜋) + ] because cos(0) = 1 and two minuses make a plus
𝜋 𝑛 𝑛
Now = Cos(nπ) = 1 or −1 depending the value of n

Looking at a cosine wave cos(nπ) is 1 if n is even and −1 if n is odd

5 5 5 5
If n is even then Cos(nπ) = 1 and the term[− 𝑛 𝐶𝑜𝑠(𝑛𝜋) + 𝑛] becomes − 𝑛 + 𝑛 which is
zero. So bn = 0 if n is even.

5 5 5 5
If n is odd then Cos(nπ) = −1 and the term[− 𝑛 𝐶𝑜𝑠(𝑛𝜋) + 𝑛] becomes 𝑛 + 𝑛 which is
10 10
So bn = if n is odd.
nπ nπ
Summary

10
a0 = 5, an = 0 for all n, bn = 0 if n is even and bn = if n is odd

We now put these constants into the general formula for our fourier series.

+ b1 Sin(x) + b2Sin(2x) + b3Sin(3x) + b4Sin(4x) + b5Sin(5x) + . . . .

5 10 1 1 1 1
So F(x) = 2 + [Sin(x) + 3 Sin(3x) + 5 Sin(5x) + 7 Sin(7x) + 9 Sin(9x)and so on]
π

No even Sin terms as bn = 0 for n even

Mjbs/MathematicalAnalysis/FeedbackFourierWorksheets 2
2.b)

f(x)

x
–/2 /2 3/2 5/2 7/2 9/2

Define the function

f(x) = 4 –/2 < x < /2 (takes the value 4 between –/2 and /2)

f(x) = 0 /2 < x < 3/2 (takes the value 0 between /2 and 3/2)

f(x) = f(x + 2π) (repeats itself every 2π, i.e. the period is 2π)

Use the formulae to find a0, an and bn

  
1 1 1
π 
a0 =  f(x)dx
π 
an = f(x)cos(n x)dx and bn = f(x)sin(n x)dx
π 

1 𝜋/2 1 1 𝜋 −𝜋
a0 = 𝜋 ∫−𝜋⁄2 4𝑑𝑥 = [4𝑥]𝜋/2
–𝜋/2 = [4 2 − 4( 2 )] = 4π
𝜋 𝜋

1 𝜋/2 1 4 𝜋/2 1 4 4
an = 𝜋 ∫−𝜋/2 4𝐶𝑜𝑠(𝑛𝑥)𝑑𝑥 = [ 𝑆𝑖𝑛(𝑛𝑥)] = [ 𝑆𝑖𝑛(𝑛𝜋/2) − 𝑛 𝑆𝑖𝑛(−𝑛𝜋/2)]
𝜋 𝑛 −𝜋/2 𝜋 𝑛

1 4 4 1 8
Now sin(–) = –sin(+) so an = 𝜋 [𝑛 𝑆𝑖𝑛(𝑛𝜋/2) + 𝑛 𝑆𝑖𝑛(𝑛𝜋/2)] = 𝜋 [𝑛 𝑆𝑖𝑛(𝑛𝜋/2)]

Sin(nπ/2) takes different values for different values of n

Sin(nπ/2) = 0 if n = 0,2,4,6,8 etc, i.e = 0 for n even
Lets now consider for n odd
Sin(nπ/2) is 1 if n = 1,5,9,13
Sin(nπ/2) is –1 if n = 3,7,11,15 and so on
8 8
an = 𝑛𝜋 if n = 1,5,9,13 . . . . and an = − 𝑛𝜋 if n = 3,7,11,15

1 𝜋/2 1 4 𝜋/2 1 4 4
bn = 𝜋 ∫−𝜋/2 4𝑆𝑖𝑛(𝑛𝑥)𝑑𝑥 = [ 𝐶𝑜𝑠(𝑛𝑥)] = [ 𝐶𝑜𝑠(𝑛𝜋/2) − 𝑛 𝐶𝑜𝑠(−𝜋/2)]
𝜋 𝑛 −𝜋/2 𝜋 𝑛

1 4 4
Now cos(–) = cos(+) so an = 𝜋 [𝑛 𝑐𝑜𝑠(𝑛𝜋/2) − 𝑛 𝑐𝑜𝑠(𝑛𝜋/2)] = 0 for all n

Summary

Mjbs/MathematicalAnalysis/FeedbackFourierWorksheets 3
8 8
a0 = 4π, an = 𝑛𝜋 if n = 1,5,9,13 . . . . and an = − 𝑛𝜋 if n = 3,7,11,15

bn = 0 for all n

We now put these constants into the general formula for our fourier series.

+ b1 Sin(x) + b2Sin(2x) + b3Sin(3x) + b4Sin(4x) + b5Sin(5x) + . . . .

8 1 1 1 1 1
So F(x) = 2 + π [cos(x) − 3 cos(3x) + 5 cos(5x) − 7 cos(7x) + 9 cos(9x) − 11 cos(11x)+ . ]

Note
No even cos terms as an = 0 for n even
No Sin terms as bn = 0 for all n

2.c) f(x)
3

3  2 3 4 5 6 7 x

f(x) = –3 π < x < 2π (takes the value –3 between π and 2π)

f(x) = f(x + 2π) (repeats itself every 2π, i.e. the period is 2π)

Use the formulae to find a0, an and bn

  
1 1 1
π 
a0 =  f(x)dx
π 
an = f(x)cos(n x)dx and bn = f(x)sin(n x)dx
π 

1 𝜋 1 2𝜋 1 1
a0 = 𝜋 ∫0 3𝑑𝑥 + ∫ −3𝑑𝑥 = [3𝑥]𝜋0 + [−3𝑥]2𝜋
𝜋
𝜋 𝜋 𝜋 𝜋

1 1
= [3𝜋 − 3(0)] + [−3(2𝜋) − −3(𝜋)]
𝜋 𝜋

1
= 𝜋 [3𝜋 − 6𝜋 + 3𝜋] = 0

1 𝜋 1 2𝜋 1 3 𝜋 1 3 2𝜋
an = 𝜋 ∫0 3𝐶𝑜𝑠(𝑛𝑥)𝑑𝑥 + 𝜋 ∫𝜋 −3𝐶𝑜𝑠(𝑛𝑥)𝑑𝑥 = [ 𝑆𝑖𝑛(𝑛𝑥)] + 𝜋 [− 𝑛 𝑆𝑖𝑛(𝑛𝑥)]
𝜋 𝑛 0 𝜋

Mjbs/MathematicalAnalysis/FeedbackFourierWorksheets 4
= 0 for n because sin(nπ) is zero for all n, sin(0) = 0, sin(π) = 0, sin(2π) = 0 and so on

1 𝜋 1 2𝜋 1 3 𝜋 1 3 2𝜋
bn = 𝜋 ∫0 3𝑆𝑖𝑛(𝑛𝑥)𝑑𝑥 + 𝜋 ∫𝜋 −3𝑆𝑖𝑛(𝑛𝑥)𝑑𝑥 = [− 𝑛 𝐶𝑜𝑠(𝑛𝑥)] + 𝜋 [+ 𝑛 𝐶𝑜𝑠(𝑛𝑥)]
𝜋 0 𝜋

1 3 3 1 3 3
= [− 𝑛 𝐶𝑜𝑠(𝑛𝜋) − − 𝑛 𝐶𝑜𝑠(0)] + 𝜋 [𝑛 𝐶𝑜𝑠(2𝑛𝜋) − 𝑛 𝐶𝑜𝑠(𝑛𝜋)]
𝜋

1 3 3 3 3
= 𝜋 [− 𝑛 𝐶𝑜𝑠(𝑛𝜋) − − 𝑛 𝐶𝑜𝑠(0) + 𝑛 𝐶𝑜𝑠(2𝑛𝜋) − 𝑛 𝐶𝑜𝑠(𝑛𝜋)]

Cos (0) = 1 and Cos(2π) = 1

1 6 6
= 𝜋 [− 𝑛 𝐶𝑜𝑠(𝑛𝜋) + 𝑛]

Looking at a cosine wave cos(nπ) is 1 if n is even and −1 if n is odd

6 6 6 6
If n is even then Cos(nπ) = 1 and the term[− 𝐶𝑜𝑠(𝑛𝜋) + ] becomes − + which is
𝑛 𝑛 𝑛 𝑛
0

6 6 6 6 12
If n is odd then Cos(nπ) = −1 and the term[− 𝑛 𝐶𝑜𝑠(𝑛𝜋) + 𝑛] becomes 𝑛 + 𝑛 which is 𝑛
12
So bn = if n is odd and 0 if n is even.

Summary
12
a0 = 0, an = 0 for all n, bn = 𝑛𝜋 if n is odd and bn = 0 if n is even

We now put these constants into the general formula for our fourier series.

+ b1 Sin(x) + b2Sin(2x) + b3Sin(3x) + b4Sin(4x) + b5Sin(5x) + . . . .

12 1 1 1 1
So F(x) = [Sin(x) + 3 Sin(3x) + 5 Sin(5x) + 7 Sin(7x) + 9 Sin(9x)and so on]
π

No even Sin terms as bn = 0 for n even

Mjbs/MathematicalAnalysis/FeedbackFourierWorksheets 5
2.d) f(x)
3

1  2 3 4 5 6 7 8 x

f(x) = –1 π < x < 2π (takes the value –1 between π and 2π)

f(x) = f(x + 2π) (repeats itself every 2π, i.e. the period is 2π)

Use the formulae to find a0, an and bn

  
1 1 1
π 
a0 =  f(x)dx
π 
an = f(x)cos(n x)dx and bn = f(x)sin(n x)dx
π 

1 𝜋 1 2𝜋 1 1
a0 = 𝜋 ∫0 3𝑑𝑥 + ∫ −1𝑑𝑥 = [3𝑥]𝜋0 + [−𝑥]2𝜋
𝜋
𝜋 𝜋 𝜋 𝜋

1 1
= [3𝜋 − 3(0)] + [−(2𝜋) − −(𝜋)]
𝜋 𝜋

1
= 𝜋 [3𝜋 − 2𝜋 + 𝜋] = 2

1 𝜋 1 2𝜋 1 3 𝜋 1 1 2𝜋
an = 𝜋 ∫0 3𝐶𝑜𝑠(𝑛𝑥)𝑑𝑥 + 𝜋 ∫𝜋 −𝐶𝑜𝑠(𝑛𝑥)𝑑𝑥 = [ 𝑆𝑖𝑛(𝑛𝑥)] + 𝜋 [− 𝑛 𝑆𝑖𝑛(𝑛𝑥)]
𝜋 𝑛 0 𝜋

= 0 for n because sin(nπ) is zero for all n, sin(0) = 0, sin(π) = 0, sin(2π) = 0 and so on

1 𝜋 1 2𝜋 1 3 𝜋 1 1 2𝜋
bn = 𝜋 ∫0 3𝑆𝑖𝑛(𝑛𝑥)𝑑𝑥 + 𝜋 ∫𝜋 −𝑆𝑖𝑛(𝑛𝑥)𝑑𝑥 = [− 𝑛 𝐶𝑜𝑠(𝑛𝑥)] + 𝜋 [+ 𝑛 𝐶𝑜𝑠(𝑛𝑥)]
𝜋 0 𝜋

1 3 3 1 1 1
= [− 𝑛 𝐶𝑜𝑠(𝑛𝜋) − − 𝑛 𝐶𝑜𝑠(0)] + 𝜋 [𝑛 𝐶𝑜𝑠(2𝑛𝜋) − 𝑛 𝐶𝑜𝑠(𝑛𝜋)]
𝜋

1 3 3 1 1
= 𝜋 [− 𝑛 𝐶𝑜𝑠(𝑛𝜋) − − 𝑛 𝐶𝑜𝑠(0) + 𝑛 𝐶𝑜𝑠(2𝑛𝜋) − 𝑛 𝐶𝑜𝑠(𝑛𝜋)]

Cos (0) = 1 and Cos(2π) = 1

1 4 3
= 𝜋 [− 𝑛 𝐶𝑜𝑠(𝑛𝜋) + 𝑛]

Looking at a cosine wave cos(nπ) is 1 if n is even and −1 if n is odd

Mjbs/MathematicalAnalysis/FeedbackFourierWorksheets 6
4 4 4 4
If n is even then Cos(nπ) = 1 and the term[− 𝑛 𝐶𝑜𝑠(𝑛𝜋) + 𝑛] becomes − 𝑛 + 𝑛 which is
zero

4 4 4 4 6
If n is odd then Cos(nπ) = −1 and the term[− 𝑛 𝐶𝑜𝑠(𝑛𝜋) + 𝑛] becomes 𝑛 + 𝑛 which is 𝑛
8
So bn = if n is odd and 0 if n is even.

Summary
8
a0 = 2, an = 0 for all n, bn = 𝑛𝜋 if n is odd and bn = 0 if n is even

We now put these constants into the general formula for our fourier series.

+ b1 Sin(x) + b2Sin(2x) + b3Sin(3x) + b4Sin(4x) + b5Sin(5x) + . . . .

8 1 1 1 1
So F(x) = 1 + π [Sin(x) + 3 Sin(3x) + 5 Sin(5x) + 7 Sin(7x) + 9 Sin(9x)and so on]

2.e) f(x)
2
 π 3π 5π 7π

f(x) = 2x –π < x < π (takes the value 2x between –π and π)

f(x) = f(x + 2π) (repeats itself every 2π, i.e. the period is 2π)

Use the formulae to find a0, an and bn

  
1 1 1
π 
a0 =  f(x)dx
π 
an = f(x)cos(n x)dx and bn = f(x)sin(n x)dx
π 

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

Mjbs/MathematicalAnalysis/FeedbackFourierWorksheets 7
1 π
an = π ∫−π 2xCos(nx)dx

dv du
This needs integration by parts ∫ u dx = uv − ∫ v dx dx

dv
Let u = 2x and let dx = Cos(nx)

du dv
We differentiate u to get dx and integrate dx to get v

1
u = 2x v = n Sin(nx)

du dv
=2 = Cos(nx)
dx dx

1 1 1 π 1 2x 2 π
an = π [(2x) n Sin(nx) − ∫ 2 × n Sin(nx)] = π [ n Sin(nx) + n2 Cos(nx)]
−π −π

1 2 π
= π [n2 Cos(nx)] because sin(nπ) = 0 for all n
−π

1 2 2 1 2 2
an = π [n2 Cos(nπ) − n2 Cos(−nπ)] [ Cos(nπ) − n2 Cos(nπ)] as cos(–) = cos(+)
π n2

an = 0 for all n

1 2𝜋 2(−𝜋)
an = 𝜋 [ 𝑛 𝐶𝑜𝑠(𝑛𝜋) − 𝐶𝑜𝑠(−𝑛𝜋)]
𝑛

1 π
bn = π ∫−π 2xSin(nx)dx

dv du
This needs integration by parts ∫ u dx = uv − ∫ v dx dx

dv
Let u = 2x and let dx = Sin(nx)

du dv
We differentiate u to get and integrate dx to get v
dx

1
u = 2x v = − n Cos(nx)

du dv
=2 = Sin(nx)
dx dx

1 1 1 π 1 2x 2 π
bn = π [−(2x) n Cos(nx) − ∫ 2 × n Cos(nx)] = π [− Cos(nx) − n2 Sin(nx)]
−π n −π

Putting π and –π in we get

1 2𝜋 2(−𝜋)
bn = 𝜋 [− 𝐶𝑜𝑠(𝑛𝜋) − − 𝐶𝑜𝑠(−𝑛𝜋)]
𝑛 𝑛

Mjbs/MathematicalAnalysis/FeedbackFourierWorksheets 8
Now cos(–) = cos(+)

1 2𝜋 2𝜋 1 4𝜋
bn = 𝜋 [− 𝐶𝑜𝑠(𝑛𝜋) − 𝐶𝑜𝑠(𝑛𝜋)] = 𝜋 [− 𝐶𝑜𝑠(𝑛𝜋)]
𝑛 𝑛 𝑛

Now cos(nπ) is 1 when n is even and –1 when n is odd

4 4
bn = − n when n is even and n when n is odd

Summary

4 4
a0 = 0, an = 0 for all n, bn = − 𝑛 if n is even and bn = if n is odd
n

We now put these constants into the general formula for our fourier series.

+ b1 Sin(x) + b2Sin(2x) + b3Sin(3x) + b4Sin(4x) + b5Sin(5x) + . . . .

1 1 1 1 1
So F(x) = 4 [Sin(x) − 2 Sin(2x) + 3 Sin(3x) − 4 Sin(4x) + 5 Sin(5x) − 6 Sin(6x)+ . . . . ]

No even Sin terms as bn = 0 for n even

Mjbs/MathematicalAnalysis/FeedbackFourierWorksheets 9
Mjbs/MathematicalAnalysis/FeedbackFourierWorksheets 10