You are on page 1of 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.

Lecture 14: Half Range Fourier Series: even and odd


functions

(Compiled 4 August 2017)

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

∫L ∫0 ∫L
f (x) dx = f (x) dx + f (x) dx (14.1)
−L −L 0
∫L
[ ]
= f (−x) + f (x) dx (14.2)
0

 ∫L
2 f (x) dx f even
= (14.3)
 0
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

14.2 Consequences of the Even/Odd Property for Fourier Series

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

∫L ( nπx ) ∫L ( nπx )
1 2
an = f (x) cos dx = f (x) cos dx (14.7)
L | {z } L L L
−L even 0
∫L ( nπx )
1
bn = f (x) sin dx = 0. (14.8)
L | {z L }
−L
odd

Therefore

∞ ( nπx ) ∫L ( nπx )
a0 ∑ 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:

∫L ( nπx )
1
an = f (x) cos dx = 0 (14.10)
L | {z L }
−L
odd
∫L ( nπx ) ∫L ( nπx )
1 2
bn = f (x) sin dx = f (x) sin dx
L | {z L } L L
−L 0
even

Therefore


∑ ( nπx ) ∫L ( nπx )
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 ∑∞ ( nπx ) ∑∞ ( nπx )
= + an cos + bn sin
2 n=1
L n=1
L
Fourier Series 3

where
∫L ( nπx ) ∫L ( nπx )
2 1[ ] 1
an = f (x) + f (−x) cos dx = f (x) cos dx
L 2 L L L
0 −L
∫L ( nπx ) ∫L ( nπx )
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 ∑
∞ ( nπx )
f (x) = + an cos (14.12)
2 n=1
L
∫L ( nπx )
2
an = f (x) cos dx. (14.13)
L L
0

Sine Series:

∑ ( nπx )
f (x) = bn sin (14.14)
n=1
L
∫L ( nπx )
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)


∫L
2 nπ
bn = f (t) sin t dt (14.16)
L ℓ
0
∫2

= t sin t dt (14.17)
2
0
2 ∫2
t cos nπ t 2 nπ
= − ( nπ ) +
2
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)

Therefore

4 ∑ (−1)n+1 ( nπ )
f (t) = sin t . (14.21)
π n=1 n 2
4


4 ∑ (−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)

∫2 2
2 t2
a0 = t dt = = 2 (14.24)
2 2 0
0
∫2 ( ) ( ) ∫2
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 ∑ (−1)n − 1 nπ
f (t) = 1 + cos t (14.26)
π 2 n=1 n2 2

8 ∑ (2n + 1)
=1− cos πt/(2n + 1)2 . (14.27)
π 2 n=0 2

The cosine series converges faster than Sine Series.


8 ∑ 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.

∫L ∫1 ∫2 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:
∫L ( nπx ) ∫1
1
an = f (x) cos dx = f (x) cos(nπx) dx L=1
L L
−L −1
∫2
= x cos(nπx) dx
0
 
↗ ( ) ∫2
x sin(nπx) 2 1
= − sin(nπx) dx
nπ nπ

0
0
2
1 1 [ ]
= 2
cos(nπx) = 2
cos(2nπ) − 1 = 0 (14.30)
(nπ) 0 (nπ)
∫ L
( nπx ) ∫1
1
bn = f (x) sin dx = f (x) sin(nπx) dx
L L
−L −1
 
∫2 ∫2
cos(nπx) 2 1
= x sin(nπx) dx = −x + cos(nπx) dx
nπ ↘
0 (nπ)
0 0
↗ ( )
sin(nπx)
2
−2 −2
= + = (14.31)
nπ (nπ)2 ↘ 0 nπ
Therefore

2 2 ∑ sin(nπx)
f (x) = − (14.32)
2 π n=1 n

2 ∑ sin(nπx)
=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

N∑
=20
Figure 1. Left figure: Full Range Expansion SN (x) = 1 − 2
π
sin(nπx)
n
Right figure: An odd function
n=1
N∑
=20
SN (x) − 1 = − π2 sin(nπx)
n
n=1

You might also like