You are on page 1of 5

# 1

c Anthony Peirce.
Introductory lecture notes on Partial Differential Equations -
Not to be copied, used, or revised without explicit written permission from the copyright owner.

functions

## (Compiled 3 March 2014)

In this lecture we consider the Fourier Expansions for Even and Odd functions, which give rise to cosine and sine half
range Fourier Expansions. If we are only given values of a function f (x) over half of the range [0, L], we can define two
different extensions of f to the full range [L, L], which yield distinct Fourier Expansions. The even extension gives rise
to a half range cosine series, while the odd extension gives rise to a half range sine series.

Key Concepts: Even and Odd Functions; Half Range Fourier Expansions; Even and Odd Extensions
14.1 Even and Odd Functions

## Even: f (x) = f (x)

Odd: f (x) = f (x)
14.1.1 Integrals of Even and Odd Functions

ZL

Z0
f (x) dx =

ZL
f (x) dx +

ZL
=

f (x) dx

(14.1)

f (x) + f (x) dx

(14.2)

RL

f (x) dx f even

(14.3)

f odd.

Notes: Let E(x) represent an even function and O(x) an odd function.
(1) If f (x) = E(x) O(x) then f (x) = E(x)O(x) = E(x)O(x) = f (x) f is odd.
(2) E1 (x) E2 (x) even.
(3) O1 (x) O2 (x) even.
(4) Any function can be expressed as a sum of an even part and an odd part:
1

1
f (x) =
f (x) + f (x) + f (x) f (x) .
2|
{z
} 2|
{z
}
even part
odd part

(14.4)

2
Check: Let E(x) =

1
1
f (x) + f (x) . Then E(x) = f (x) + f (x) = E(x) even. Similarly let
2
2

1
f (x) f (x)
2

1
O(x) = f (x) f (x) = O(x) odd.
2
O(x) =

(14.5)
(14.6)

## 14.2 Consequences of the Even/Odd Property for Fourier Series

(I) Let f (x) be Even-Cosine Series:
ZL

1
an =
L

bn =

ZL

1
L

f (x) cos
| {z }
even

nx
L

2
dx =
L

ZL
f (x) cos

nx
L

dx

nx
f (x) sin
dx = 0.
|
{z L }
odd

(14.7)

(14.8)

Therefore
nx
a0 X
f (x) =
+
an cos
;
2
L
n=1

2
an =
L

ZL
f (x) cos

nx
L

dx.

(14.9)

## (II) Let f (x) be Odd-Sine Series:

1
an =
L

ZL
L

1
bn =
L

ZL
L

nx
f (x) cos
dx = 0
|
{z L }
odd
nx

2
dx =
f (x) sin
L
L
|
{z
}
even

(14.10)
ZL
f (x) sin
0

nx
L

dx

Therefore
f (x) =

X
n=1

bn sin

nx
L

2
bn =
L

ZL
f (x) sin
0

nx
L

dx.

(III) Since any function can be written as the sum of an even and odd part, we can interpret the cos and sin series
as even/odd:
even
odd

f (x) = 1
1
f (x) + f (x) + f (x) f (x)
2 ) (
)
(2

nx
X
X
a0
nx
+
an cos
+
=
bn sin
2
L
L
n=1
n=1

(14.11)

Fourier Series

where
2
an =
L
2
bn =
L

ZL
0

ZL
0

ZL

nx

1
1
f (x) + f (x) cos
dx =
2
L
L

f (x) cos

nx
L

dx

nx

1
1
f (x) f (x) sin
dx =
2
L
L

ZL
f (x) sin

nx
L

dx.

## 14.3 Half-Range Expansions

If we are given a function f (x) on an interval [0, L] and we want to represent f by a Fourier Series we have two
choices - a Cosine Series or a Sine Series.
Cosine Series:
nx
a0 X
+
an cos
2
L
n=1

f (x) =

2
an =
L

ZL
f (x) cos

nx
L

(14.12)

dx.

(14.13)

Sine Series:
f (x) =

bn sin

nx

n=1

2
bn =
L

(14.14)

ZL
f (x) sin

nx
L

dx.

(14.15)

Example 14.1 Expand f (x) = x, 0 < x < 2 in a half-range (a) Sine Series, (b) Cosine Series.
(a) Sine Series: (L=2)
2
bn =
L

ZL
f (t) sin
0

Z2
t sin

=
0

n
t dt
`

(14.16)

n
t dt
2

(14.17)

2
Z2
t cos n
t
2
n
2
= n +
cos
t dt

n
2
2
0

4
cos(n) +
n
4
= (1)n
n
=

2
n

2
sin

n 2

t
2
0

(14.18)

(14.19)
(14.20)

Therefore
f (t) =

n
4 X (1)n+1
sin
t .
n=1
n
2

(14.21)

f (1) = 1 =
therefore

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

1 1 1
= 1 + +
4
3 5 7

(14.22)
(14.23)

## (b) Cosine Series: (L=2)

2
a0 =
2

Z2

Z2
an =
0

2
t2
t dt = = 2
2 0

n
t cos
t dt =
2

=+

2
n

(14.24)

2
n

Z2
n 2
2
n
t sin
%
t
sin
t dt
2 0
n
2

2
n
4
cos
t = 2 2 {cos n 1}
2
n

(14.25)

Therefore

f (t) = 1 +
=1

4 X (1)n 1
n
cos
t
2 n=1
n2
2

(14.26)

8 X
(2n + 1)
cos
t/(2n + 1)2 .
2 n=0
2

(14.27)

## The cosine series converges faster than Sine Series.

f (2) = 2 = 1 +

8 X
1
2 n=0 (2n + 1)2

2
1
1
= 1 + 2 + 2 +
8
3
5

Example 14.2 Periodic Extension: Assume that f (x) = x, 0 < x < 2 represents one full period of the function so
that f (x + 2) = f (x). 2L = 2 L = 1.

1
a0 =
L

ZL

Z1
f (x) dx =

Z2
f (x) dx =

2
x2
x dx =
=2
2 0

since f (x + 2) = f (2).

(14.28)
(14.29)

Fourier Series

n 1:
ZL

1
an =
L

f (x) cos

nx
L

Z1
dx =

f (x) cos(nx) dx

L=1

Z2
=

x cos(nx) dx
0

%
Z2
2
x
sin(nx)
1

=
sin(nx) dx

n
n
&
0
0
2

1
1
=
cos(nx) =
cos(2n) 1 = 0
2
2
(n)
(n)
0
L
Z
Z1
nx
1
bn =
f (x) sin
dx = f (x) sin(nx) dx
L
L
L

Z2
=
0

(14.30)

Z2

2
cos(nx)
1
cos(nx) dx
x sin(nx) dx = x
+
n
(n)
&
0

2
2
sin(nx)
2
=
+
=
n
(n)2 &
n
0

(14.31)

Therefore

2
2 X sin(nx)
f (x) =
2 n=1
n

=1

(14.32)

2 X sin(nx)
n=1
n

1
S(x)1

S(x)

(14.33)

1
0
1
4

0
1

0
x

2
4

SN (x) 1 = 2

NP
=20
n=1

NP
=20
n=1

0
x
sin(nx)
n

sin(nx)
n