Even and odd functions and half-range Fourier series 625
2
f (x)
x
0
22
2
2
3
Figure 68.2
The square wave shown in Fig. 68.2 is an odd function
since it is symmetrical about the origin.
Hence, from para. (b), the Fourier series is given by:
f (x) =
∞
n=1
b n sin nx
The function is defined by:
f (x) =
−2, when −π < x < 0
2, when 0 < x <π
From para. (b), b n =
2
π
π
0
f (x) sin nx dx
=
2
π
π
0
2 sin nx dx
=
4
π
−cos nx
n
π
0
=
4
π
−cos nπ
n
−
−
1
n
=
4
πn
(1 − cos nπ)
When n is even, b n = 0.
When n is odd, b n =
4
πn
(1 − (−1)) =
8
πn
Hence
b 1 =
8
π
, b 3 =
8
3π
, b 5 =
8
5π
,
and so on
Hence the Fourier series is:
f (x)=
8
π
sinx +
1
3
sin 3x +
1
5
sin 5x
+
1
7
sin 7x +· · ·
Problem 4. Determine the Fourier series for the
function f (θ) = θ 2 in the range −π <θ <π. The
function has a period of 2π.
A graph of f (θ) = θ 2 is shown in Fig. 68.3 in the range
−π to π with period 2π. The function is symmetrical
about the f (θ) axis and is thus an even function. Thus
a Fourier cosine series will result of the form:
f (θ) = a 0 +
∞
n=1
a n cos nθ
22
0
f ()
f () 5 2
2
2
2
Figure 68.3
From para. (a),
a 0 =
1
π
π
0
f (θ)dθ =
1
π
π
0
θ
2 dθ
=
1
π
θ
3
3
π
0
=
π
2
3
and a n =
2
π
π
0
f (θ) cos nθ dθ
=
2
π
π
0
θ
2 cosnθ dθ
=
2
π
θ 2 sin nθ
n
+
2θ cos nθ
n 2
−
2 sinnθ
n 3
π
0
by parts
=
2
π
0 +
2π cos nπ
n 2
− 0
− (0)
=
4
n 2 cos nπ
When n is odd, a n =
−4
n 2 . Hence a 1 =
−4
1 2 ,
a 3 =
−4
3 2 , a 5 =
−4
5 2 , and so on.
When n is even, a n =
4
n 2 . Hence a 2 =
4
2 2 , a 4 =
4
4 2 , and
so on.
2
f (x)
x
0
22
2
2
3
Figure 68.2
The square wave shown in Fig. 68.2 is an odd function
since it is symmetrical about the origin.
Hence, from para. (b), the Fourier series is given by:
f (x) =
∞
n=1
b n sin nx
The function is defined by:
f (x) =
−2, when −π < x < 0
2, when 0 < x <π
From para. (b), b n =
2
π
π
0
f (x) sin nx dx
=
2
π
π
0
2 sin nx dx
=
4
π
−cos nx
n
π
0
=
4
π
−cos nπ
n
−
−
1
n
=
4
πn
(1 − cos nπ)
When n is even, b n = 0.
When n is odd, b n =
4
πn
(1 − (−1)) =
8
πn
Hence
b 1 =
8
π
, b 3 =
8
3π
, b 5 =
8
5π
,
and so on
Hence the Fourier series is:
f (x)=
8
π
sinx +
1
3
sin 3x +
1
5
sin 5x
+
1
7
sin 7x +· · ·
Problem 4. Determine the Fourier series for the
function f (θ) = θ 2 in the range −π <θ <π. The
function has a period of 2π.
A graph of f (θ) = θ 2 is shown in Fig. 68.3 in the range
−π to π with period 2π. The function is symmetrical
about the f (θ) axis and is thus an even function. Thus
a Fourier cosine series will result of the form:
f (θ) = a 0 +
∞
n=1
a n cos nθ
22
0
f ()
f () 5 2
2
2
2
Figure 68.3
From para. (a),
a 0 =
1
π
π
0
f (θ)dθ =
1
π
π
0
θ
2 dθ
=
1
π
θ
3
3
π
0
=
π
2
3
and a n =
2
π
π
0
f (θ) cos nθ dθ
=
2
π
π
0
θ
2 cosnθ dθ
=
2
π
θ 2 sin nθ
n
+
2θ cos nθ
n 2
−
2 sinnθ
n 3
π
0
by parts
=
2
π
0 +
2π cos nπ
n 2
− 0
− (0)
=
4
n 2 cos nπ
When n is odd, a n =
−4
n 2 . Hence a 1 =
−4
1 2 ,
a 3 =
−4
3 2 , a 5 =
−4
5 2 , and so on.
When n is even, a n =
4
n 2 . Hence a 2 =
4
2 2 , a 4 =
4
4 2 , and
so on.
