You are on page 1of 10

TEC3301 N.

Magaji

Chapter 4
Fourier series

This short chapter offers a very brief review of Fourier series.

The Fourier series of f (x) on the interval (–L, L) is


a0   n x   n x  
f  x 
2
   an cos 
n 1 L 
  bn sin 
 L 

where
 n x 

L
1
an  f  x  cos   dx ,  n  0, 1, 2, 3, 
L L  L 
and
 n x 

L
1
bn  f  x  sin   dx ,  n  1, 2, 3, 
L L  L 

The {an, bn} are the Fourier coefficients of f (x).

Note that the cosine functions (and the function 1) are even, while the sine functions are
odd.

If f (x) is even (f (–x) = + f (x) for all x), then bn = 0 for all n, leaving a Fourier cosine
series (and perhaps a constant term) only for f (x).

If f (x) is odd (f (–x) = – f (x) for all x), then an = 0 for all n, leaving a Fourier sine
series only for f (x).

1
TEC3301 N. Magaji

Example 4.1 Expand


 0    x  0 
f  x   in a Fourier series.
 x
  0  x   

L = .

 0 

  
1 1 1
a0  f  x  dx  0 dx    x  dx
     0


1    x  
2

 0    
  2  0 2

 
 
1 1
an  f  x  cos nx dx  0    x  cos nx dx
  0

1  n   x  sin nx  cos nx  1   1
n
   
 n 2
0 n 2

 
 
1 1
bn  f  x  sin nx dx  0    x  sin nx dx
  0

1  n   x  cos nx  sin nx  1
   
 n 2
0 n

Therefore the Fourier series for f (x) is



 1   1n 
f  x 

4

n 1


 n2

cos nx 
1
n
sin nx 


   x   

2
TEC3301 N. Magaji

The first few partial sums in the Fourier series

  1   1n 


1
f  x    cos nx  sin nx     x   
4  n 2
n 
n 1  
are

S0 
4
 2
S1   cos x  sin x
4 
 2 1
S2   cos x  sin x 
sin 2 x
4  2
 2 1 2 1
S3   cos x  sin x  sin 2 x  cos3x  sin 3x
4  2 9 3
and so on.

The graphs of successive partial sums approach f (x) more closely, except in the vicinity
of any discontinuities, (where a systematic overshoot occurs).

3
TEC3301 N. Magaji

Example 4.2

Find the Fourier series expansion for the standard square wave,
 1  1  x  0 

f  x  
 1  0  x  1

L = 1.
The function is odd (f (–x) = – f (x) for all x).
Therefore an = 0 for all n. We will have a Fourier sine series only.

   sin n x dx
0 1
1
bn  f  x  sin n x dx   sin n x dx 
1 1 1 0

2 1   1 
n
 cos n x    cos n x 
0 1

      
 n  1  n 0 n
(can use symmetry)

 
 1   1n 
 f  x 

2


n 1 
 n
sin n x  


4
  k 1
 1

 2k  1

sin  2k  1  x 

The graphs of the third and ninth partial sums (containing two and five non-zero terms
respectively) are displayed here, together with the exact form for f (x), with a periodic
extension beyond the interval (–1, +1) that is appropriate for the square wave.

y = S3(x)

Example 4.2 (continued)

4
TEC3301 N. Magaji

y = S9(x)

Half-Range Fourier Series

A Fourier series for f (x), valid on [0, L], may be constructed by extension of the domain
to [–L, L].

An odd extension leads to a Fourier sine series:


f  x 
b sin  nLx 
n 1
n

where
L


2  n x 
bn  f  x  sin   dx ,  n  1, 2, 3, 
L
0
 L 

5
TEC3301 N. Magaji

An even extension leads to a Fourier cosine series:


a
f  x  0 
2  a cos  nLx 
n 1
n

where
L


2  n x 
an  f  x  cos   dx ,  n  0, 1, 2, 3, 
L
0
 L 
And there is automatic continuity of the Fourier cosine series at x = 0 and at x =  L.

Example 4.3
Find the Fourier sine series and the Fourier cosine series for f (x) = x on [0, 1].

f (x) = x happens to be an odd function of x for any domain centred on x = 0. The odd
extension of f (x) to the interval [–1, 1] is f (x) itself.

Evaluating the Fourier sine coefficients,


2 1  n x 
bn 
1 0 x sin 
 1 
 dx ,  n  1, 2, 3, 

1
 x  n x  1  n x  
 bn  2   cos    sin  
 n  n 
2
 1   1   0
2 n1
   1
n
Therefore the Fourier sine series for f (x) = x on [0, 1] (which is also the Fourier series
for f (x) = x on [–1, 1] ) is

n1 sin  n x 
f  x  2

n 1
 1
n
or
2 sin 2 x sin 3 x sin 4 x 
f  x   sin  x     
 2 3 4 
6
TEC3301 N. Magaji

This function happens to be continuous and differentiable at x = 0, but is clearly


discontinuous at the endpoints of the interval (x = 1).

Fifth order partial sum of the Fourier sine series for f (x) = x on [0, 1]

Example 4.3 (continued)

The even extension of f (x) to the interval [–1, 1] is f (x) = | x |.

Evaluating the Fourier cosine coefficients,

 n x 
1


2
an  x cos   dx ,  n  1, 2, 3, 
1 0  1 

 
1
 x  2  1
n
1 1
 an  2  sin  n x   cos  n x   
 n  n 
2
 0  n 
2


2 1
a0  x dx   x 2   1
and 1 0
0

Evaluating the first few terms,


4 4 4
a0  1, a1  2 , a2  0 , a3  , a4  0 , a5  , a6  0 ,
 9 2
25 2

7
TEC3301 N. Magaji


 1  n  0

an   42  n  1,3,5, 
  n 
 0  n  2, 4, 6, 
or 

Therefore the Fourier cosine series for f (x) = x on [0, 1] (which is also the Fourier
series for f (x) = | x | on [–1, 1] ) is

cos   2k  1  x 
f  x 
1
2
 2

4
k 1  2k  1
2

or
1 4  cos3 x cos5 x cos 7 x 
f  x 
 2  cos  x     
2   9 25 49 
Example 4.3 (continued)

Third order partial sum of the Fourier cosine series for f (x) = x on [0, 1]

Note how rapid the convergence is for the cosine series compared to the sine series.

S3(x) for cosine series and S5(x) for sine series for f (x) = x on [0, 1]

8
TEC3301 N. Magaji

12.2.2 Fourier Cosine and Sine Series

If f(x) is defined on [-l,l] we may be able to write its Fourier series. The

coefficients of this series are completely determined by the function and the interval.

We will now show that if f(x) is defined on the half-interval [0,l), then we have a

choice and can write a series containing just cosines or just sines in attempting to

represent f(x) on this half-interval.

The Fourier Cosine Series of a Function

Let f be integrable on [0,l]. We want to expand f(x) in a series of cosine functions.

f ( x ) for 0  x  l
Define fe (x)  
f (  x ) for  l  x  0

fe is an even function,

fe (-x) =f(x),

and agrees with f on [0,l],

fe (x)=f(x) for 0  x  l.

We call fe the even extension of f to [-l,l]. For example if

f(x) =ex for 0  x  2. Then

e x for 0  x  2
fe ( x )  
e  x for  2  x  0

Here we put fe(x)=f(-x) =e-x for –2  x <0.

Because fe is an even function on [-l,l], its Fourier series on [-l,l] is

1   nx 
a 0   a n cos   (12.8)
2 n1  l 

9
TEC3301 N. Magaji

in which

2 l  nx  2 l  nx 
an 
l 0
fe ( x ) cos 
 l 
 dx   f ( x ) cos 
l 0
 l 
 dx, (12.9)

since fe(x) = f(x) for 0  x  l. We call the series (12.8) the Fourier cosine series of on

[0,l,]. The coefficients (12.9) are the Fourier cosine coefficients of f on [0, l,].

The even extension fe was introduced only to be able to make use of earlier work

to derive a series containing just cosines. When we actually write a Fourier cosine series,

we just use equation (12.5) to calculate the coefficients, without defining fe.

The other point to having fe in the background, however, is that we can use the

Fourier convergence theorems to write a convergence theorem for cosine series.

10

You might also like