You are on page 1of 8

Fourier Series

These summary notes should be used in conjunction with, and should not be a replacement
for, your lecture notes. You should be familiar with the following denitions.
A function f is periodic with period 2L if f (x) = f (x + 2L) for all x. For example sin and
cos are both periodic with period 2.
If f is any function dened in the interval (L, L] or [L, L) then the 2L-periodic extension of f , denoted F , is dened by
{
f (x)
if x (L, L] or x [L, L)
F (x) =
F (x + 2L) otherwise
f is an odd function if f (x) = f (x) for all x.
f is an even function if f (x) = f (x) for all x.

0
f (x) dx =
2
n

if f is odd

f (x) dx

if f is even

1. Full-range Fourier Series


The Full-range Fourier series representation of f on (L, L) is
[
( nx )
( nx )]

f (x) a0 +
an cos
+ bn sin
,
L
L
n=1

where

L
1
a0 =
f (x) dx,
2L L
( nx )
1 L
an =
f (x) cos
dx (n = 1, 2, 3, . . .),
L L
L
( nx )
1 L
dx (n = 1, 2, 3, . . .).
bn =
f (x) sin
L L
L

If f is 2L-periodic then the above series is a representation of f . If f is only dened on (L, L)


then the series is actually a representation of F , the 2L-periodic extension of f .
Calculation of a Fourier series boils down to computing the coecients a0 , an and bn , and a
rm grasp of integration by parts is required to complete these calculations successfully.

Example 1 For the function dened by f (x) = x2 on the interval 2 < x < 2 sketch the
4-period extension of f and determine the Fourier coecients.
Sketch f on the interval (2, 2) and then repeatedly shift this to the right and to the left to
obtain the graph of the 4-period extension F .

Figure 1: The 4-period extension of f


Lets now compute the Fourier coecients. Note that L = 2 in this case.
[
]2

1 2 2
1 1 3
1
4
a0 =
x dx =
x
= (8 (8)) = .
4 2
4 3
12
3
2

an

1
=
2
1
=
2

=
=
=

x2 cos

( nx )

([

2 2
x sin
n

dx
2
( nx )]2
2

n
2

x sin
2

( nx )
2

)
dx

))
([
2
( nx )]2
( nx )
8
8
4
2
2
sin(n)
sin(n)
x cos
+
cos
dx
n
n
n
n
2
n 2
2
2
))
(
(
1
4
4 [ ( nx ) ]2
4
4
cos(n)
cos(n) + 2 2 sin
dx
00

2
n
n
n
n
2
2
))
(
(
1
4
4
4
4
(1)n + 2 2 (sin(n) sin(n))

(1)n
2
n
n
n
n
)
(
2
4
8

(1)n + 2 2 (0 0)
n
n
n
16
(1)n .
2
2
n

1
=
2
=

Note that sin(n) = 0 for all n Z and cos(n) = (1)n for all n Z.

bn

1
=
2

x2 sin
2

( nx )
2

dx

( )
Before we dive into the integration observe that x2 denes an even function while sin nx
2
denes an odd function. Since the product of an even and an odd function is odd, it follows
that bn = 0 for all n. This simple observation saves us from having to perform a rather laborious
integration.
The Fourier series is given by
( nx ) 4 16 (1)n
( nx )
4 16
n
f (x) +
(1)
cos
=
+
cos
.
3 n=1 n2 2
2
3 2 n=1 n2
2

Here are the graphs of the (truncated) series for N = 2, N = 11 and N = 101 terms. Notice
that as N increases the series converges to the extended function.

Figure 2: N = 2

Figure 3: N = 11

Figure 4: N = 101
Example 2 For the function dened by
{
x 2 2 < x < 0
f (x) =
x+2
0<x<2
sketch the 4-period extension of f and determine the Fourier coecients.

Figure 5: The extended function

a0

1 2
f (x) dx
=
4 2
( 0
)
2
1
=
(x 2) dx +
(x + 2) dx
4
2
0
([
]0
[ 2
]2 )
1
x
x2
=
2x
+
+ 2x
4
2
2
2
0
1
([0 6] + [6 0])
4
= 0
=

an =
=
=
=

( nx )
1 2
f (x) cos
dx
2 2
2
( 0
2
( nx )
( nx ) )
1
dx +
dx
(x 2) cos
(x + 2) cos
2
2
2
2
0
( 0
0
2
2
( nx )
( nx )
( nx )
( nx ) )
1
x cos
dx 2
cos
dx +
x cos
dx + 2
cos
dx
2
2
2
2
2
2
2
0
0
(
)
[
[
( nx )
( nx )]0
( nx )]2
2
1
2
2
x cos
+2
dx 2
sin
sin
2
2
n
2
n
2
2
2
0

1
(0 2 0 + 2 0)
2
= 0

Note that
x cos

( nx )

2
denes an odd function so the value of the integral between 2 and 2 is zero.

bn =
=
=
=
=
=
=
=
=
=

( nx )
1 2
f (x) sin
dx
2 2
2
( 0
2
( nx )
( nx ) )
1
dx +
dx
(x 2) sin
(x + 2) sin
2
2
2
2
0
( 0
0
2
2
( nx )
( nx )
( nx )
( nx ) )
1
dx 2
dx +
dx + 2
dx
x sin
sin
x sin
sin
2
2
2
2
2
2
2
0
0
(
)
[
[
( nx )]0
( nx )]2
( nx )
2
1
2
2
dx 2
cos
+2
cos
x sin
2
2
n
2
n
2
2
2
0
(
( 2
)
(
))
)
(
2
1
nx
2
2
2
n
n
dx 2
2
x sin
+
(1) + 2 (1) +
2
2
n n
n
n
0
( ([
)
)
]2
2
)
(
)
(
nx
4
1
2
nx
2
4
4
4
n
n
cos
dx +
2 x cos
+

(1)
(1) +
2
n
2
n 0
2
n n
n
n
0
)
)
( (
[
]
( nx ) 2
1
4
2
2
8
8
n
2 (1) +
sin
+

(1)n
2
n
n n
2
n n
0
)
(
1
8
8
8

(1)n
(1)n +
2
n
n n
4
8

(1)n
n n
4
(1 2(1)n )
n

Note that
x sin
denes an even function so
2
x sin
2

( nx )
2

( nx )
2

dx = 2

x sin
0

( nx )
2

dx.

The Fourier series is given by

( nx )

4
n
(1 2(1) ) sin
.
f (x)
n
2
n=1

Here are the graphs of the series for 5, 50 and 100 terms.

Figure 6: 5 terms

Figure 7: 50 terms

Figure 8: 100 terms

2. Half-range Fourier Series


If a function f is dened on the interval (0, L) then the 2L-periodic extension of f can be dened
to be an odd function or an even function. This then gives rise to the Half-range Fourier sine
series for f and the Half-range Fourier cosine series for f , respectively.
Sine Series: In this case the extended function F is dened to be an odd 2L-periodic extension
of f , i.e.

0<x<L
f (x)
F (x)
F (x) =

F (x + 2L)
The coecients are then a0 = an = 0 for all n = 1, 2, 3, . . . and

( nx )
2 L
bn =
f (x) sin
dx.
L 0
L
Thus
f (x)

bn sin

( nx )

n=1

Cosine Series: In this case the extended function F is dened to be an even 2L-periodic
extension of f , i.e.

0<x<L
f (x)
F (x)
F (x) =

F (x + 2L)
The coecients are then bn = 0 for all n = 1, 2, 3, . . . and

1 L
a0 =
f (x) dx
L 0

( nx )
2 L
an =
f (x) cos
dx.
L 0
L
Thus
f (x) a0 +

n=1

an cos

( nx )
L

Example 3 For the function dened by f (x) = x2 on the interval (0, 2) determine the Fourier
sine and cosine series.
Sine series:
bn =
=
=
=

( nx )
2 2 2
x sin
dx
2 0
2
[
2
( nx )]2
( nx )
4
2 2
+
x cos
x cos
dx
n
2
n 0
2
0
)
([
2
( nx )]2
( nx )
2
8
4
2

cos(n) +
x sin
sin
dx
n
n
n
2
n 0
2
0
)
(
8
4
4 [ ( nx )]2
n
(1) +
cos
n
n n2 2
2
0
7

8
16
(1)n + 3 3 (cos(n) cos(0))
n
n
8
16
16
n
= (1) + 3 3 (1)n 3 3
n
n
n
16
8
n
n
=
((1) 1)
(1) .
n3 3
n
=

Therefore

)
(
( nx )

16
8
n
n
((1)

1)

(1)
sin
.
F (x) =
33
n
n
2
n=1

Cosine series:
a0

an

Hence

1
=
2

[
]2
4
1 1 3
x dx =
x
= .
2 3
3
0
2

( nx )
2 2 2
=
x cos
dx
2 0
2
[
2
( nx )]2
( nx )
2 2
4
=
x sin
dx

x sin
n
2
n 0
2
0
)
([
2
( nx )]2
( nx )
4
2
2
dx
=
x cos
+
cos
n
n
2
n 0
2
0
(
)
4
4
4 [ ( nx )]2
=

cos(n) 2 2 sin
n
n
n
2
0
16
=
(1)n .
n2 2
( nx )
4 16 (1)n
.
F (x) = + 2
cos
3 n=1 n2
2

You might also like