Semester A, 2015-16 MA2177 Engineering Mathematics and Statistics
Semester A, 2015-16 MA2177 Engineering Mathematics and Statistics
Definition:
A function f (t ) is said to be periodic with period 2T ( 0) if
f (t 2T ) f (t ) ,
for all t . That is, the graph of f (t ) repeats itself at regular intervals of length 2T .
If f (t ) and g (t ) are periodic, both with period 2T , then any linear combination
h(t ) f (t ) g (t ) is also periodic with period 2T , where and are constants.
2
E.g. Since is the fundamental period of sin nt and cos nt , then 2 is the period
n
of sin nt and cos nt for all n 1, 2, 3, ... .
Hence, f (t ) 3 2 cos t 4 cos 2t 3 cos 3t sin 2t 5 sin 7t has period 2 , since
every term in the series has period 2 .
Dr. Emily Chan Page 3
Semester A, 2015-16 MA2177 Engineering Mathematics and Statistics Chapter 4
Fourier series takes a periodic function and decomposes it into a sum of simple oscillating
functions, namely sine and cosine functions. The Fourier series was first introduced for the
purpose of solving the heat equation in metal plate. The Fourier series has many
applications in applied mathematics, especially for the solution of partial differential
equations.
1 T
where a0 f (t ) dt ,
T T
1 T n t
an f (t ) cos dt for n 1, 2, 3, ...,
T T T
1 T n t
and bn f (t ) sin dt for n 1, 2, 3, ....
T T T
(The proofs of the above results for a 0 , a n and bn ( n 1) are given in the Appendix.)
Remarks:
1. If the series converges, it will converge to a periodic function whose period is 2T , since
every term in the series has period 2T .
2. Since f (t ) is periodic with period 2T , we may also calculate the Fourier coefficients
a n ’s and bn ’s by considering the function f (t ) in the interval [0, 2T ] instead of
[T , T ] .
Dr. Emily Chan Page 5
Semester A, 2015-16 MA2177 Engineering Mathematics and Statistics Chapter 4
1 2T
That is, a0 f (t ) dt ,
T 0
1 2T n t
an f (t ) cos dt for n 1 ,2, 3, ,
T 0 T
1 2T n t
and bn f (t ) sin dt for n 1 ,2, 3, .
T 0 T
1
(ii) lim f (t ) lim f (t ) at any points t0 where f is discontinuous.
2 t t0 t t 0
Dr. Emily Chan Page 6
Semester A, 2015-16 MA2177 Engineering Mathematics and Statistics Chapter 4
Example 1
0 if t 0
Find the Fourier series for the square wave function f (t ) with
1 if 0t
period 2 .
Solution
Period 2T 2 T
The Fourier series of f (t ) is
a0 n t n t a 0
a n cos bn sin a n cosnt bn sinnt ,
2 n1 T T 2 n1
1 T 1 1 1 1
where a 0 f ( t ) dt f ( t ) dt 1 dt t 0 1,
T T 0 0
1 T n t 1 1 1 sin(nt )
a n f (t ) cos dt f (t ) cosnt dt 1 cosnt dt
T T T 0 n 0
1
sin( n ) sin 0 1 (0 0) 0 , since sin(n ) 0 for n 1, 2, 3, ...
n n
1 T n t 1 1 1 cos(nt )
bn f (t ) sin dt f (t ) sin nt dt 1 sin nt dt
T T T 0 n 0
1 1 1 (1) n 0 , if n is even
cos(n ) cos 0 1 cos(n ) 2
, if n is odd
n n n n
Notice that we can write the even- and odd- indexed coefficients separately as b 2 n 0
2
for n 1, 2, 3, ... and b2n 1 for n 1, 2, 3, ... .
( 2n 1)
Dr. Emily Chan Page 8
Semester A, 2015-16 MA2177 Engineering Mathematics and Statistics Chapter 4
The series converges to f (t ) everywhere, except at the points of discontinuity. Since the
series does not converge to f everywhere, we cannot say that the function and the series
1 2 1
are equal. In this case, we usually write f (t ) ~ sin(2n 1)t to indicate
2 n1 2n 1
that the series corresponds to f (but is not necessarily equal to f ). In the case of
Fourier series, this says that the series converges to f (t ) at every t where f is
Dr. Emily Chan Page 9
Semester A, 2015-16 MA2177 Engineering Mathematics and Statistics Chapter 4
1
continuous and to the average of the one-sided limits , i.e. lim f (t ) lim f (t ) , at
2 t t0 t t 0
any jump discontinuities t 0 .
Graphical illustration:
We now consider the graphs of the first few partial sums of the series defined by
1 2 n 1
S n (t ) sin( 2k 1)t .
2 k 1 2k 1
1 2
That is, S1 (t ) sin t ,
2
1 2 2
S 2 (t ) sin t sin 3t ,
2 3
1 2 2 2
S 3 (t ) sin t sin 3t sin 5t , etc.
2 3 5
1 2 1 2 2
S1 (t ) sin t S 2 (t ) sin t sin 3t
2 2 3
1 2 2 1 2 2
S 7 (t ) sin t sin 13t S15 (t ) sin t sin 29t
2 13 2 29
Dr. Emily Chan Page 11
Semester A, 2015-16 MA2177 Engineering Mathematics and Statistics Chapter 4
From the graphs, it appears that the series is converging to the square-wave function f ,
except at the points of discontinuity, t 0, , 2 , 3 , . At those points, the Fourier
1
series converges to , which is the average of the two function values on either side of the
2
discontinuity.
Example 2
(a) Find the Fourier series of the periodic function f (t ) t ( 1 t 1), with period 2.
1
(b) Hence, or otherwise, determine the value of .
2
n 1(2n 1)
Solution
t if 0 t 1
(a) f (t ) is periodic with period 2 outside the interval [1, 1].
t if 1 t 0
Period 2T 2 T 1.
T 1 0 1 0 1
1 t 2 t 2
a0 f (t ) dt f (t ) dt (t ) dt t dt
T T 1 1 0 2 1 2 0
1 1
0 0 1
2 2
For n 1,
1 T n t
1 0 1
an f (t ) cos dt f (t ) cosn t dt (t ) cosn t dt t cosn t dt
T T T 1 1 0
0 1
sin n t sin n t
t d t d
1 n 0 n
Dr. Emily Chan Page 13
Semester A, 2015-16 MA2177 Engineering Mathematics and Statistics Chapter 4
t sin n t 0 0
sin n t t sin n t 1 1 sin n t
dt dt (int. by parts)
n 1 1 n n 0 0 n
0 1
sin n t sin n t
(0 0) dt (0 0) dt sin (n ) sin( n ) 0
1
n 0
n
0 1
cosn t cosn t
2 2
(n ) 1 (n ) 0
1 1
2
1 cos( n )
2
cos(n ) 1
( n ) (n )
2
2
1 cos(n ) cos( n ) cos( n )
( n )
0 if n is even
1 if n is even
n
4 if n is odd cos( n ) (1)
n 2 2 1 if n is odd
For n 1,
1 T n t
1
bn f (t ) sin dt f (t ) sin n t dt
T T T 1
0 1
(t ) sin n t dt t sin n t dt
1 0
0 1
cosn t cosn t
t d
t d
1 n 0 n
t cosn t 0 0 1
cosn t t cosn t 1 cosn t
dt dt
n 1 1 n n 0 0 n
(int. by parts)
0 1
(1) cos n sin n t cosn sin n t
0 0
n 2 n 2
(n ) 1
( n ) 0
cosn cosn
(0 0) (0 0) cos( n ) cos( n )
n n
& sin( n ) sin( n ) 0
0
1 4 1
cos(2n 1) t
2 2 n 1(2n 1) 2
Note that in the above example, the series converges to f (t ) everywhere, since f (t ) is
Dr. Emily Chan Page 16
Semester A, 2015-16 MA2177 Engineering Mathematics and Statistics Chapter 4
continuous at all t . Hence, we say that f (t ) is equal to the Fourier series for all t and
1 4 1
we write f (t ) cos(2n 1) t .
2 2 n1(2n 1) 2
Remark of Example 2:
You should get the same result as above if you consider the function f (t ) for t [0, 2]
when calculating the Fourier coefficients a n ’s and bn ’s. That is,
t if 0 t 1
f (t ) is periodic with period 2 outside the interval [0, 2] .
2 t if 1 t 2
2T 2 1 2 1 2
1 t 2 t2
Then a 0 f (t ) dt f (t ) dt t dt 2 t dt 2t 1,
T 0 0 0 1 2 0 2
1
1 2T n t
2 1 2
a n f (t ) cos dt f (t ) cosn t dt t cosn t dt (2 t ) cosn t dt
T 0 T 0 0 1
0 if n is even
4 if n is odd
n 2 2
and
1 2T n t
2 1 2
bn f (t ) sin dt f (t ) sin n t dt t sin n t dt (2 t ) sin n t dt 0
T 0 T 0 0 1
for n 1.
1 4 1
(b) The Fourier series expansion of f (t ) | t | is f (t ) cos(2n 1) t .
2
2 n 1(2n 1) 2
We choose a value of t in [1, 1] such that cos( 2 n 1) t 1 for all n 1, 2, 3, ... ,
i.e. we take t 0 .
Also, f (t ) | t | is continuous at t 0 .
At t 0 , the Fourier series converges to the function f (0) | 0 | 0 .
1 4 1
Setting t 0 , we have f (0) cos 0
2
2 n 1(2n 1) 2
1 4 1
0
2 2 n 1(2n 1) 2
1 2
2
8
n 1(2n 1)
Example 3
Let f be a periodic function with period 2 , where
k if t 0
f (t ) for some positive constant k .
k if 0 t
Period 2T 2 T
(Note that f (t ) is continuous everywhere except at t 0, , 2 , 3 , )
Dr. Emily Chan Page 20
Semester A, 2015-16 MA2177 Engineering Mathematics and Statistics Chapter 4
1 T 1 1 0
where a 0 f (t ) dt f (t ) dt (k ) dt k dt
T
T 0
1
kt 0 kt 0 1 k[0 ( )] k ( 0) 1 0 0 .
For n 1 ,2, 3, ,
1 T n t 1 1 0
an f (t ) cos dt f (t ) cosnt dt ( k ) cosnt dt k cosnt dt
T T T 0
0
1 sin( nt ) sin( nt ) 1 1
k k k ( 0 0) k ( 0 0) 0 0
n n 0
Dr. Emily Chan Page 21
Semester A, 2015-16 MA2177 Engineering Mathematics and Statistics Chapter 4
and
T 0
1 n t 1 1
bn
T f (t ) sin T dt f (t ) sinnt dt (k ) sin nt dt k sinnt dt
T 0
0
1 cos(nt ) cos(nt )
k k
n n 0
1 k k
cos(0) cos( n ) cos( n ) cos(0)
n n
2k
1 cos(n )
n
0 if n is even 1 if n is even
4k since cos(n ) (1) n
n if n is odd 1 if n is odd
Writing the even- and odd-indexed coefficients separately, we have b2n 0 for
4k
n 1, 2, 3, ... and b2n 1 for n 1, 2, 3, ....
(2n 1)
Dr. Emily Chan Page 22
Semester A, 2015-16 MA2177 Engineering Mathematics and Statistics Chapter 4
(Remark: We use ‘’ instead of ‘ ’, since f (t ) is not equal to the Fourier series
everywhere.)
(b) We choose a value of t in [ , ] so that sin(2n 1)t (1) n 1 for n 1, 2, 3, ...,
i.e. we take t .
2
At t , the Fourier series converges to f k , since f (t ) is continuous at t .
2 2 2
Dr. Emily Chan Page 23
Semester A, 2015-16 MA2177 Engineering Mathematics and Statistics Chapter 4
4k 1 (2n 1)
Setting t in the series, we have f sin
2 2 n 1 2n 1 2
4k 1
k sin n
n 1 2n 1 2
4k 1
cos(n ) sin cos
n 1 2 n 1 2
4k
1
n 1 2 n 1
(1) n cos(n ) (1) n
4k (1) n 1
n 1 2 n 1
( 1) n 1
n 1 2n 1 4
Let O be an odd function, and E be an even function. Then we have the following
results: O E O, OO E, EE E
n x n x
Note that cos is an even function, and sin is an odd function.
T T
0 if g ( x) is an odd function
a
Recall that a g ( x ) dx a .
2 0 g ( x) dx if g ( x) is an even function
a0
n t
Therefore, f (t ) ~ a n cos , which is called a Fourier cosine series for f (t ) .
2 n 1 T
Note that a Fourier cosine series consists of cosine terms plus a constant term only.
Example 4
The function f (t ) t ( 1 t 1 with period 2) is an even function (i.e. the graph of
f (t ) is symmetric about the y-axis). Thus, the Fourier cosine series of f (t ) t
a0
( 1 t 1 with period 2) is f (t ) a n cos n t ,
2 n 1
1 1
2
where a0 f (t ) dt 2 t dt 1,
1
0 0
21 1 0 if n is even
a n f (t ) cos n t dt 2 t cos n t dt 4 if n is odd
1 n 2 2
0 0
and bn 0 , for n 1 ,2, 3, .
1 4 1
Hence, f (t ) cos( 2n 1) t is the Fourier cosine series of f (t ) .
2 2 n 1 ( 2n 1) 2
Example 5
k if t 0
The function f (t ) (with period 2 ) in Example 3 is an odd function
k if 0 t
2 2 0 if n is even
and bn f (t ) sin nt dt k sin nt dt 4k .
n if n is odd
0 0
4k 1
Hence, f (t ) ~ sin(2n 1)t is the Fourier sine series of f (t ) .
n 1 2n 1
f (t ) , 0 t T
f1(t ) :
f (t ) , T t 0
and f 1 (t 2T ) f 1 (t ) for all t , is known as the even periodic extension of f (t ) . This
has a Fourier series which converges to f (t ) in (0, T ) .
f (t ) , 0t T
f 2 (t ) :
f (t ) , T t 0
and f 2 (t 2T ) f 2 (t ) for all t , is known as the odd periodic extension of f (t ) . This
has a Fourier series which converges to f (t ) in (0, T ) .
Dr. Emily Chan Page 31
Semester A, 2015-16 MA2177 Engineering Mathematics and Statistics Chapter 4
Example 6
Find (a) the Fourier cosine series and (b) the Fourier sine series for f (t ) t , 0 t .
Solution
(a) Fourier cosine series
The even periodic extension of f (t ) is given by
2T 2 T .
The Fourier cosine series of f (t ) is given by
a0 n t a0
f (t ) ~ an cos an cosnt
2 n 1 T 2 n 1
T
2 2 2 t 2 2 2
where a 0 f (t ) dt t dt 0 ,
T 0 0 2 2
0
2T n t 2 2 sin nt
an f (t ) cos dt t cosnt dt t d
T0 T 0 0 n
2 sin nt sin nt 2 cosnt
t dt (0 0)
n 0 0 n 2
n 0
0 if n is even
2
cosn 1
2
n
(1) 1 4 if n is odd
n 2 n 2 n 2
4
i.e. a 2 n 0 for n 1, 2, 3, ... and a 2n1 for n 1, 2, 3, ... .
2
( 2n 1)
Hence, the Fourier cosine series for f (t ) is
4 4 1
f (t ) ~ cos(2n 1)t cos( 2n 1)t
2 n 1 ( 2n 1) 2 2 n 1 (2n 1) 2
2T 2 T .
The Fourier sine series of f (t ) is given by
n t
f (t ) ~ bn sin bn sin nt
n 1 T n1
2T n t 2 2 cosnt
where bn f (t ) sin dt t sin nt dt t d
T0 T 0
0 n
2 cosnt cosnt 2 cosn sin nt
t dt 0
n n n 2
0 0 n 0
2 cosn
(0 0) , since sin n 0 for all n 1, 2, 3,
n
2 cosn 2( 1) n
, since cos n ( 1) n for n 1, 2, 3,
n n
Hence, the Fourier sine series for f (t ) is
2(1) n
f (t ) ~ sin nt
n 1 n
( 1) n
2 sin nt
n 1 n
To prove the results in Section 4.2, we need the following results from elementary integration:
T
n t
(i) T dt 0
cos for n 1, 2, 3, ...
T
T
n t
(ii) T dt 0
sin for n 1, 2, 3, ...
T
T
m t n t 0 if m n
(iii) sin sin
T T dt
T T if m n
T
m t n t 0 if m n
(iv) cos cos
T T dt
T T if m n
T
m t n t
(v) T cos T dt 0
sin for all m, n 1, 2, 3, ...
T
1
( sin A sin B cos( A B ) cos( A B ))
2
T
(m n) t (m n) t
sin sin
1 T T
2 (m n) (m n)
T T T
T sin[(m n) ] sin[(m n) ] sin[(m n) ] sin[( m n) ]
2 ( m n) (m n) ( m n) ( m n)
T
(0 0) (0 0)
2
0, since sin k 0 for all k Z .
For m n ,
T T T
m t n t 2 n t 1 2n t 2 1
sin
T T
sin dt sin dt 1 cos dt , since sin (1 cos 2 )
T T T 2
T T 2
T
2n t
sin
1 T 1 sin 2n sin 2n
t T ( T )
2 2n 2
2 n 2 n
T T T T
1
T 0 (T ) 0, sin k 0 for all k Z
2
T
1 1
(iv) Similar to (iii) and use cos A cos B cos( A B ) cos( A B) and cos 2 (1 cos 2 ) .
2 2
T
m t n t 1 T ( m n) t (m n) t
(v) sin
T T
cos dt sin
T
sin dt
T
2 T T
1
( sin A cos B sin( A B) sin( A B))
2
T
(m n) t (m n) t
cos cos
1 T T
2 (m n) (m n)
T T T
T cos[(m n) ] cos[(m n) ] cos[( m n) ] cos[(m n) ]
2 ( m n) (m n) ( m n) ( m n)
Dr. Emily Chan Page 39
Semester A, 2015-16 MA2177 Engineering Mathematics and Statistics Chapter 4
a0 n t n t
f (t ) an cos bn sin ------ (*)
2 n 1 T T
1 T
a0 f (t ) dt
T T
m t
Multiplying both sides of (*) by cos and integrating over [ T , T ] :
T
T
m t
f (t ) cos dt
T T
a0 T m t T
m t n t
T
m t n t
cos dt an cos cos dt bn cos sin dt
2 T T n 1 T T T T T T
a m T , using (i), (iv), (v)
1 T m t
am f (t ) cos dt , where m 1, 2, 3, ...
T T T
T
1 n t
Replacing m by n , we have an f (t ) cos dt , for n 1, 2, 3, ...
T T T
m t
Multiplying both sides of (*) by sin and integrating over [ T , T ] :
T
T
m t
f ( t ) sin dt
T T
a0 T m t T
m t n t
T
m t n t
sin dt an sin cos dt bn sin sin dt
2 T T n 1 T T T T T T
bm T , using (ii), (iii), (v)
1 T m t
bm f (t ) sin dt , where m 1, 2, 3, ...
T T T
T
1 n t
Replacing m by n , we have bn f (t ) sin dt , for n 1, 2, 3, ...
T T T