Sei sulla pagina 1di 5

# Introductory lecture notes on Partial Differential Equations - c Anthony Peirce.

1
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

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

Odd: f (x) = f (x)

## 14.1.1 Integrals of Even and Odd Functions

ZL Z0 ZL
f (x) dx = f (x) dx + f (x) dx (14.1)
L L 0
ZL

= f (x) + f (x) dx (14.2)
0

RL
2 f (x) dx f even
= 0 (14.3)

0 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) . (14.4)
2| {z } 2| {z }
even part odd part
2
1 1
Check: Let E(x) = f (x) + f (x) . Then E(x) = f (x) + f (x) = E(x) even. Similarly let
2 2
1
O(x) = f (x) f (x) (14.5)
2
1
O(x) = f (x) f (x) = O(x) odd. (14.6)
2

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

ZL nx ZL nx
1 2
an = f (x) cos dx = f (x) cos dx (14.7)
L | {z } L L L
L even 0
ZL nx
1
bn = f (x) sin dx = 0. (14.8)
L | {z L }
L
odd

Therefore

nx ZL nx
a0 X 2
f (x) = + an cos ; an = f (x) cos dx. (14.9)
2 n=1
L L L
0

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

ZL nx
1
an = f (x) cos dx = 0 (14.10)
L | {z L }
L
odd
ZL nx ZL nx
1 2
bn = f (x) sin dx = f (x) sin dx
L | {z L } L L
L 0
even

Therefore

X nx ZL nx
2
f (x) = bn sin ; bn = f (x) sin dx.
n=1
L L L
0

(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 (14.11)
f (x) + f (x) + f (x) f (x)
(2 2 ) ( )
a0 X nx X nx
= + an cos + bn sin
2 n=1
L n=1
L
Fourier Series 3
where
ZL nx ZL nx
2 1 1
an = f (x) + f (x) cos dx = f (x) cos dx
L 2 L L L
0 L
ZL nx ZL nx
2 1 1
bn = f (x) f (x) sin dx = f (x) sin dx.
L 2 L L L
0 L

## 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:
a0 X
nx
f (x) = + an cos (14.12)
2 n=1
L
ZL nx
2
an = f (x) cos dx. (14.13)
L L
0

Sine Series:

X nx
f (x) = bn sin (14.14)
n=1
L
ZL nx
2
bn = f (x) sin dx. (14.15)
L L
0

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)

ZL
2 n
bn = f (t) sin t dt (14.16)
L `
0
Z2
n
= t sin t dt (14.17)
2
0
2 Z2
t cos n
2 t 2 n
= n + cos t dt (14.18)
2
n 2
0 0
2 n 2
4 2
= cos(n) + sin t (14.19)
n n 2 0
4
= (1)n (14.20)
n
Therefore

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

4 X (1)n+1 n
f (1) = 1 = sin (14.22)
n=1 n 2
1 1 1
therefore = 1 + + (14.23)
4 3 5 7

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

Z2 2
2 t2
a0 = t dt = = 2 (14.24)
2 2 0
0
Z2 Z2
n 2 n 2 2 n
an = t cos t dt = t sin
% t sin t dt
2 n 2 0 n 2
0 0
2 2
2 n 4
=+ cos t = 2 2 {cos n 1} (14.25)
n 2 n
0

Therefore

4 X (1)n 1 n
f (t) = 1 + cos t (14.26)
2 n=1 n2 2

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

## The cosine series converges faster than Sine Series.

8 X 1 2 1 1
f (2) = 2 = 1 + = 1 + 2 + 2 +
2 n=0 (2n + 1)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.

ZL Z1 Z2 2
1 x2
a0 = f (x) dx = f (x) dx = x dx = =2 (14.28)
L 2 0
L 1 0
since f (x + 2) = f (2). (14.29)
Fourier Series 5
n 1:
ZL nx Z1
1
an = f (x) cos dx = f (x) cos(nx) dx L=1
L L
L 1
Z2
= x cos(nx) dx
0

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

Z2 Z2
cos(nx) 2 1
= x sin(nx) dx = x + cos(nx) dx
n &0 (n)
0 0
%2
2 sin(nx) 2
= + = (14.31)
n (n)2 & 0 n
Therefore

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

2 X sin(nx)
=1
n=1 n
(14.33)

3 2

2 1
S(x)1
S(x)

1 0

0 1

1 2
4 2 0 2 4 4 2 0 2 4
x x

NP
=20
2 sin(nx)
Figure 1. Left figure: Full Range Expansion SN (x) = 1 n
Right figure: An odd function
n=1
NP
=20
sin(nx)
SN (x) 1 = 2 n
n=1