You are on page 1of 110

2.

2 Chapter 2 Fourier Series and Fourier Integral

2.3 FourIer serIes


Representation of a function over a certain interval by a linear combination of mutually
orthogonal functions is called Fourier series representation.

convergence of the Fourier series (dirichlet’s conditions)


A function f (x) can be represented by a complete set of orthogonal functions within the
interval (c, c + 2l). The Fourier series of the function f (x) exists only if the following
conditions are satisfied:
(i) f (x) is periodic, i.e., f (x) = f (x + 2l), where 2l is the period of the function
f (x).
(ii) f (x) and its integrals are finite and single-valued.
(iii) f (x) has a finite number of discontinuities, i.e., f (x) is piecewise continuous in
the interval (c, c + 2l).
(iv) f (x) has a finite number of maxima and minima.
These conditions are known as Dirichlet’s conditions.

2.4 trIgonometrIc FourIer serIes


np x np x
We know that the set of functions sin and cos are orthogonal in the interval
l l
(c, c + 2l) for any value of c, where n = 1, 2, 3, ….
c + 2l mp x np x
i.e., Úc sin
l
sin
l
dx = 0 mπn

=l m=n
c + 2l mp x np x
Úc cos
l
cos
l
dx = 0 mπn

=l m=n
c + 2l mp x np x
Úc sin
l
cos
l
dx = 0 for all m, n

Hence, any function f (x) can be represented in terms of these orthogonal functions in
the interval (c, c + 2l) for any value of c.

np x • np x
f ( x ) = a0 + Â an cos + Â bn sin
n =1 l n =1 l

This series is known as a trigonometric Fourier series or simply, a Fourier series. For
example, a square function can be constructed by adding orthogonal sine components
(Fig. 2.1).
2.5 Fourier Series of Functions of Any Period 2.3

f (x)

x One sine component


O

f (x)

x Addition of two sine


O components
f (x)

x Addition of three sine


O components
..
..
f (x) ..
.
Addition of many sine
x
O components
..
f (x)

x Square function
O

Fig. 2.1 Representation of a function in terms of sine components

2.5 FourIer serIes oF FunctIons oF Any PerIod


Let f (x) be a periodic function with period 2l in the interval (c, c + 2l). Then the Fourier
series of f (x) is given by

np x • np x
f ( x ) = a0 + Â an cos + Â bn sin …(2.1)
n =1 l n =1 l

determination of a0
Integrating both the sides of Eq. (2.1) w.r.t. x in the interval (c, c + 2l),
c + 2l c + 2l c + 2l Ê • np x ˆ c + 2l Ê • np x ˆ
Úc f ( x )dx = a0 Ú dx + Ú Á Â an cos l ˜ dx + Úc Á Â bn sin l ˜ dx
c c Ë n =1 ¯ Ë n =1 ¯
= a0(c + 2l – c) + 0 + 0
= 2la0
1 c + 2l
2l Úc
Hence, a0 = f ( x )dx …(2.2)
2.4 Chapter 2 Fourier Series and Fourier Integral

determination of an
np x
Multiplying both the sides of Eq. (2.1) by cos and integrating w.r.t. x in the
l
interval (c, c + 2l),
c + 2l np x c + 2l np x c + 2l Ê • np x ˆ np x
Úc f ( x ) cos
l
dx = a0 Ú
c
cos
l
dx + Ú
c Á Â
Ë n =1
an cos
l ¯ ˜ cos
l
dx

c + 2l Ê • np x ˆ np x
+Ú Á Â bn sin l ˜ cos l dx
c Ë n =1 ¯
= 0 + lan + 0
= l an
1 c + 2l np x
l Úc
Hence, an = f ( x ) cos dx …(2.3)
l

determination of bn
np x
Multiplying both the sides of Eq. (2.1) by sin and integrating w.r.t. x in the
interval (c, c + 2l ), l

c + 2l np x c + 2l np x c + 2l Ê • np x ˆ np x
Úc f ( x )sin
l
dx = a0 Ú
c
sin
l
dx + Ú
c Á Â
Ë n =1
an cos
l ¯ ˜ sin
l
dx

c + 2l Ê • np x ˆ np x
+Ú Á Â bn sin l ˜ sin l dx
c Ë n =1 ¯
= 0 + 0 + lbn
= l bn
1 c + 2l np x
Hence, bn =
l Úc
f ( x )sin
l
dx …(2.4)

The formulae (2.2), (2.3), and (2.4) are known as Euler’s formulae which give the values
of coefficients a0, an, and bn. These coefficients are known as Fourier coefficients.
Corollary 1 When c = 0 and 2l = 2p
∞ ∞
f ( x) = a0 + ∑ an cos nx + ∑ bn sin nx
n =1 n =1

1 2p

2p Ú0
where a0 = f ( x ) dx

1 2p
an = Ú f ( x ) cos nx dx
p 0
1 2p
bn = Ú f ( x )sin nx dx
p 0
2.5 Fourier Series of Functions of Any Period 2.5

Corollary 2 When c = –p and 2l = 2p


• •
f ( x ) = a0 + Â an cos nx + Â bn sin nx
n =1 n =1

1 p
where a0 =
2p Ú-p f ( x) dx
1 p
an =
p Ú-p f ( x) cos nx dx
1 p
bn =
p Ú-p f ( x)sin nx dx
Corollary 3 When c = 0

np x • np x
f ( x ) = a0 + Â an cos + Â bn sin
n =1 l n =1 l
1 2l
where a0 = Ú f ( x ) dx
2l 0
1 2l np x
an = Ú f ( x ) cos dx
l 0 l
1 2l np x
bn = Ú f ( x )sin dx
l 0 l

Corollary 4 When c = – l

np x • np x
f ( x ) = a0 + Â an cos + Â bn sin
n =1 l n =1 l
1 l
2l Ú - l
where a0 = f ( x )dx

1 l np x
an = Ú f ( x ) cos dx
l - l l
1 l np x
bn = Ú f ( x )sin dx
l - l l

Fourier series expansion with Period 2p

example 1
Find the Fourier series of f (x) = x in the interval (0, 2p).
2.6 Chapter 2 Fourier Series and Fourier Integral

Solution
The Fourier series of f (x) with period 2p is given by
• •
f ( x ) = a0 + Â an cos nx + Â bn sin nx
n =1 n =1

1 2p
a0 =
2p Ú0 f ( x )dx

1 2p
=
2p Ú0 x dx

2p
1 x2
=
2p 2
0

1 Ê 4p 2 ˆ
= Á ˜
2p Ë 2 ¯
=p
1 2p
an =
p Ú0 f ( x ) cos nx dx

1 2p
=
p Ú0 x cos nx dx
2p
1 Ê sin nx ˆ Ê cos nx ˆ
= xÁ ˜ - (1) Á - 2 ˜
p Ë n ¯ Ë n ¯ 0
1 Ê cos 2 np cos 0 ˆ
=
p ÁË n2
- 2 ˜ [Q sin 2np = sin 0 = 0]
n ¯
=0 [Q cos 2np = cos 0 = 1]
1 2p
p Ú0
bn = f ( x )sin nx dx

1 2p
= Ú x sin nx dx
p 0
2p
1 Ê cos nx ˆ Ê sin nx ˆ
= xÁ- ˜ - (1) Á - 2 ˜
p Ë n ¯ Ë n ¯ 0

1È Ê cos 2 np ˆ ˘
= Í -2p Á
pÎ Ë n ˜¯ ˚
˙ [Q sin 2np = sin 0 = 0]
2
=-
n
[Q cos 2np = 1]

1
Hence, f ( x ) = p - 2Â sin nx
n =1 n
2.5 Fourier Series of Functions of Any Period 2.7

Ê 1 1 ˆ
x = p - 2 Á sin x + sin 2 x + sin 3 x + L˜
Ë 2 3 ¯

example 2
Find the Fourier series of f (x) = x2 in the interval (0, 2p) and, hence,
p2 1 1 1
deduce that = 2 - 2 + 2 -L
12 1 2 3
Solution
The Fourier series of f (x) with period 2p is given by
• •
f ( x ) = a0 + Â an cos nx + Â bn sin nx
n =1 n =1

1 2p
a0 =
2p Ú0 f ( x )dx

1 2p
=
2p Ú0 x 2 dx
2p
1 x3
=
2p 3
0

1 Ê 8p 3 ˆ
= Á ˜
2p Ë 3 ¯
4p 2
=
3
1 2p
p Ú0
an = f ( x ) cos nx dx

1 2p
= Ú x 2 cos nx dx
p 0
2p
1 2 Ê sin nx ˆ Ê cos nx ˆ Ê sin nx ˆ
= x Á - 2x Á - 2 ˜ + 2 Á - 3 ˜
p Ë n ˜¯ Ë n ¯ Ë n ¯ 0

1 È Ê cos 2 np ˆ ˘
= Í 4p
p Î ÁË n2 ˜¯ ˚
˙ [Q sin 2np = sin 0 = 0]
1 Ê 4p ˆ
= Á 2˜
pËn ¯
[Q cos 2np = 1]
4
= 2
n
2.8 Chapter 2 Fourier Series and Fourier Integral

1 2p
bn =
p Ú0 f ( x )sin nx dx

1 2p
=
p Ú0 x 2 sin nx dx
2p
1 Ê cos nx ˆ Ê sin nx ˆ Ê cos nx ˆ
= x2 Á - ˜ - 2x Á - 2 ˜ + 2 Á 3 ˜
p Ë n ¯ Ë n ¯ Ë n ¯ 0

1È 2 Ê cos 2 np ˆ Ê cos 2 np ˆ Ê cos 0 ˆ ˘


= Í4p ÁË - ˜¯ + 2 Á ˜ - 2Á 3 ˜˙
pÎ n Ë n 3 ¯ Ë n ¯˚
1 Ê 4p 2 ˆ
= Á-
pË n ¯
˜ [Q cos 2np = cos 0 = 1]
4p
=-
n
• •
4p 2 1 1
Hence, f ( x) = + 4  2 cos nx - 4p  sin nx
3 n =1 n n =1 n

4p 2 Ê1 1 1 ˆ
x2 = + 4 Á 2 cos x + 2 cos 2 x + 2 cos3 x + L˜
3 Ë 1 2 3 ¯
Ê1 1 1 ˆ
- 4p Á sin x + sin x + sin 3 x + L˜ ... (1)
Ë1 2 3 ¯
Putting x = p in Eq. (1),
4p 2 Ê1 1 1 ˆ
p2 = + 4 Á 2 cos p + 2 cos 2p + 2 cos 3p + L˜ + 0
3 Ë1 2 3 ¯
4p 2 Ê 1 1 1 ˆ
= + 4 Á - 2 + 2 - 2 + K˜
3 Ë 1 2 3 ¯
p2 1 1 1
= - + -K
12 12 22 32

example 3
1
(p - x ) in the interval (0, 2p).
Find the Fourier series of f ( x ) =
2
p 1 1 1
Hence, deduce that = 1 - + - +K [Winter 2013]
4 3 5 7
Solution
The Fourier series of f (x) with period 2p is given by
• •
f ( x ) = a0 + Â an cos nx + Â bn sin nx
n =1 n =1
2.5 Fourier Series of Functions of Any Period 2.9

1 2p
a0 =
2p Ú0 f ( x )dx

1 2p 1
=
2p Ú0 2
(p - x )dx
2p
1 x2
= px-
4p 2
0
1
= (2p 2 - 2p 2 )
4p
=0
1 2p
an =
p Ú0 f ( x ) cos nx dx

1 2p 1
=
p Ú0 2
(p - x ) cos nx dx
2p
1 Ê sin nx ˆ Ê cos nx ˆ
= (p - x ) Á ˜ - (-1) Á - 2 ˜
2p Ë n ¯ Ë n ¯ 0
1È cos 2 np cos 0 ˘
= Í- + 2 ˙
2pÎ n2 n ˚
= 0 [Q cos 2 np = cos 0 = 1]

1 2p 1
bn =
p Ú0 2
(p - x )sin nx dx
2p
1 Ê cos nx ˆ Ê sin nx ˆ
= (p - x ) Á - - (-1) Á - 2 ˜
2p Ë n ˜¯ Ë n ¯ 0

1 È Ê cos 2 np ˆ Ê cos 0 ˆ ˘
= Í(-p ) ÁË - ˜¯ - p ÁË - ˜ ˙ [Q sin 2 np = sin 0 = 0 ]
2p Î n n ¯˚
1 Êp pˆ
= Á + ˜
2p Ë n n ¯
[Q cos 2np = cos 0 = 1]
1
=
n

1
Hence, f ( x ) = Â sin nx
n =1 n
1 1 1 1 1
(p - x ) = sin x + sin 2 x + sin 3 x + sin 4 x + sin 5 x
2 2 3 4 5
1 1
+ sin 6 x + sin 7 x +L ...(1)
6 7
2.10 Chapter 2 Fourier Series and Fourier Integral

p
Putting x = in Eq. (1),
2
1Êpˆ p 1 1 3p 1 1 5p
Á ˜ = sin + sin p + sin + sin 2p + sin
Ë
2 2¯ 2 2 3 2 4 5 2
1 1 7p
+ sin 3p + sin +L
6 7 2
p 1 1 1
= 1 - + - +º
4 3 5 7

example 4 2
Ê p - xˆ
Obtain the Fourier series of f ( x ) = ÁË ˜ in the interval 0 £ x £ 2p.
2 ¯
p2 1 1 1
Hence, deduce that = - + -L [Winter 2014]
12 12 22 32

Solution
The Fourier series of f(x) with period 2p is given by
• •
f ( x ) = a0 + Â an cos nx + Â bn sin nx
n =1 n =1

1 2p
a0 =
2p Ú0 f ( x ) dx
2
1 2p Ê p - xˆ
=
2p Ú0 ÁË
2 ¯
˜ dx
2p
1 (p - x )3
=
8p -3 0
1
=- (-p 3 - p 3 )
24 p
p2
=
12
1 2p
an = Ú f ( x ) cos nx dx
p 0
2
1 2p Ê p - xˆ
=
p Ú0 ÁË
2 ¯
˜ cos nx dx
2p
1 Ê sin nx ˆ Ê cos nx ˆ Ê sin nx ˆ
= (p - x )2 Á ˜ - 2(p - x )(-1) Á - 2 ˜ + 2(-1)(-1) Á - 3 ˜
4p Ë n ¯ Ë n ¯ Ë n ¯ 0
2.5 Fourier Series of Functions of Any Period 2.11

1È Ê cos 2 np ˆ Ï Ê cos 0 ˆ ¸˘
= Í2p Á ˜ - Ì-2p Á 2 ˜ ˝˙ [Q sin 2 np = sin 0 = 0 ]
ÍÎ Ë n ¯ Ó Ë n ¯ ˛˙˚
4p 2

1 Ê 2p 2p ˆ
= +
4p ÁË n2 n2 ˜¯
[Q cos 2np = cos 0 = 1]
1
=
n2
1 2p
bn = Ú f ( x ) sin nx dx
p 0
2
1 2p Ê p - xˆ
=
p Ú0 ÁË
2 ¯
˜ sin nx dx
2p
1 Ê cos nx ˆ Ê sin nx ˆ Ê cos nx ˆ
= (p - x )2 Á - - 2(p - x )(-1) Á - 2 ˜ + 2(-1)(-1) Á 3 ˜
4p Ë n ˜¯ Ë n ¯ Ë n ¯ 0

1 ÈÏ 2 Ê cos 2np ˆ 2 cos 2np ¸ Ï 2 Ê cos 0 ˆ Ê cos 0 ˆ ¸˘


= ÍÌp Á - ˜ + ˝ - Ìp Á - ˜ + 2 Á 3 ˜ ˝˙
ÍÎÓ Ë n ¯ ˛ Ó Ë n ¯ Ë n ¯ ˛˙˚
4p 3
n
[Q sin 2 np = sin 0 = 0]
1 Ê p2 2 p2 2ˆ
= Á - + 3 + - 3˜ [Q cos 2 np = cos 0 = 1]
4p Ë n n n n ¯
=0

p2 1
Hence, f ( x ) = + Â 2 cos nx
12 n = 1 n
2
Ê p - xˆ p2 1 1 1
ÁË 2 ˜¯ = 12 + 2 cos x + 2 cos 2 x + 2 cos 3 x + L ....(1)
1 2 3
Putting x = p in Eq. (1),
p2 1 1 1
0= - 2 + 2 - 2 +L
12 1 2 3
p2 1 1 1
= - + -L
12 12 22 32

example 5
Find the Fourier series for f(x) = eax in (0, 2p), a > 0. [Summer 2018]
Solution
The Fourier series of f(x) with period 2p is given by
• •
f ( x ) = a0 + Â an cos nx + Â bn sin nx
n =1 n =1
2.12 Chapter 2 Fourier Series and Fourier Integral

1 2p
a0 =
2p Ú0 f ( x )dx

1 2p ax
=
2p Ú0 e dx
2p
1 e ax
=
2p a
0
1
= (e2 ap - 1)
2 ap
1 2p
an =
p Ú0 f ( x ) cos nx dx

1 2p ax
=
p Ú0 e cos nx dx
2p
1 e ax
= (a cos nx + n sin nx )
p a 2 + n2
0

1 È e2 ap a ˘ ÈQ sin 2 np = sin 0 = 0 ˘
= Í 2 (a cos 2 np ) - 2 ˙ Í ˙
Î cos 0 = 1
2
p ÍÎ a + n a + n2 ˙˚ ˚
a
= 2 2
(e2 ap - 1) [Q cos 2np = 1]
p (a + n )
1 2p
bn =
p Ú0 f ( x )sin nx dx

1 2p
=
p Ú0 a ax sin nx dx
2p
1 e ax
= (a sin nx - n cos nx )
p a 2 + n2
0

1È e2 ap n ˘ ÈQ sin 2 np = sin 0 = 0 ˘
= Í 2 (- n cos 2 np ) + 2 ˙ Í ˙
pÍÎ a + n
2
a + n2 ˙˚ Î cos 0 = 1 ˚
n
= 2 2
(1 - e2 ap ) [Q cos 2np = 1]
p (a + n )

1 a(e2 ap - 1) • 1
Hence, f ( x) = (e2 ap - 1) + Â a2 + n2 cos nx
2 ap p n =1

1 - e2 ap n
+
p
 a2 + n2 sin nx
n =1
2.5 Fourier Series of Functions of Any Period 2.13

example 6
3 x 2 - 6 xp + 2p 2
Find the Fourier series of f ( x ) = in the interval (0, 2p)
12
p2 1 1
Hence, deduce that = 1 + 2 + 2 +K
6 2 3
Solution
The Fourier series of f (x) with period 2p is given by
• •
f ( x ) = a0 + Â an cos nx + Â bn sin nx
n =1 n =1

1 2p
a0 =
2p Ú0 f ( x )dx

1 2p 3 x 2 - 6 xp + 2p 2
=
2p Ú0 12
dx
2p
1 Ê x3 ˆ Ê x2 ˆ
= 3 Á ˜ - 6p Á ˜ + 2p 2 x
24p Ë 3 ¯ Ë 2¯ 0

1 È Ê 8p 3 ˆ Ê 4p 2 ˆ ˘
= Í3 Á ˜ - 6p Á ˜ + 4p 3 ˙
24p Î Ë 3 ¯ Ë 2 ¯ ˚
=0
1 2p
an =
p Ú0 f ( x ) cos nx dx

1 2p Ê 3 x 2 - 6 xp + 2p 2 ˆ
=
p Ú0 Á
Ë 12 ˜ cos nx dx
¯
2p
1 Ê sin nx ˆ Ê cos nx ˆ Ê sin nx ˆ
= (3 x 2 - 6 xp + 2p 2 ) Á - (6 x - 6p ) Á - 2 ˜ + 6 Á - 3 ˜
12p Ë n ˜¯ Ë n ¯ Ë n ¯ 0

1 È Ê cos 2np ˆ Ê cos 0 ˆ ˘


= Í(6p ) ÁË ˜ - (-6p ) Á 2 ˜ ˙ [Q sin 2 np = sin 0 = 0 ]
12p Î n 2 ¯ Ë n ¯˚
1 Ê 6p 6p ˆ
= +
12p ÁË n2 n2 ˜¯
[Q cos 2np = cos 0 = 1]
1
=
n2
1 2p
bn = Ú f ( x )sin nx dx
p 0
2.14 Chapter 2 Fourier Series and Fourier Integral

1 2p Ê 3 x 2 - 6 xp + 2p 2 ˆ
p Ú0 ÁË
= ˜ sin nx dx
12 ¯
2p
1 Ê cos nx ˆ Ê sin nx ˆ Ê cos nx ˆ
= (3 x 2 - 6 xp + 2p 2 ) Á - ˜ - (6 x - 6p ) Á - 2 ˜ + 6 Á 3 ˜
12p Ë n ¯ Ë n ¯ Ë n ¯ 0

1 È 2 2 2 Ê cos 2 np ˆ Ê cos 2 np ˆ 2 Ê cos 0 ˆ


= Í(12p - 12p + 2p ) ÁË - ˜¯ + 6 Á
Ë 3 ˜¯ - (2p ) ÁË - n ˜¯
12p Î n n
Ê cos 0 ˆ ˘
- 6 Á 3 ˜ ˙ [Q sin 2 np = sin 0 = 0 ]
Ë n ¯˚
=0 [Q cos 2np = cos 0 = 1]

1
Hence, f ( x) = ∑ 2
cos nx
n =1 n
3 x 2 - 6 xp + 2p 2 1 1
= cos x + 2 cos 2 x + 2 cos 3 x + L … (1)
12 2 3
Putting x = 0 in Eq. (1),
p2 1 1
= cos 0 + 2 cos 0 + 2 cos 0 + L
6 2 3
1 1
= 1+ 2 + 2 + L
2 3

example 7
Find the Fourier series of f(x) = e–x in the interval (0, 2p).
p 1 • ( -1)n
Hence, deduce that = Â 2 . [Summer 2014]
2 sinh p n = 2 n + 1
Solution
The Fourier series of f (x) with period 2p is given by
• •
f ( x ) = a0 + Â an cos nx + Â bn sin nx
n =1 n =1

1 2p

2p Ú0
a0 = f ( x )dx

1 2p - x
2p Ú0
= e dx

1 2p
= -e- x
2p 0
2.5 Fourier Series of Functions of Any Period 2.15

-e -2p + e0
=
2p
1 - e -2p
=
2p
1 2p
an = Ú f ( x ) cos nx dx
p 0
1 2p
= Ú e - x cos nx dx
p 0
2p
1 e- x
= (- cos nx + n sin nx )
p n2 + 1
0

1 È e -2p 1 ˘
= Í 2
p Î n +1
(- cos 2 np ) - 2 (- cos 0)˙ [Q sin 2np = sin 0 = 0]
n +1 ˚
1
= (1 - e -2p ) [Q cos 2 np = cos 0 = 1]
p (n + 1)
2

1 2p
bn =
p Ú0 f ( x )sin nx dx

1 2p - x
=
p Ú0 e sin nx dx
2p
1 e- x
= (- sin nx - n cos nx )
p n2 + 1
0

Èe
1 -2p
1 ˘
= Í 2 (- n cos 2 np ) - 2 (- n cos 0)˙ [Q sin 2 np = sin 0 = 0 ]
ÍÎ n + 1
p n +1 ˙˚
n
= 2
(1 - e -2p ) [Q cos 2 np = cos 0 = 1]
p (n + 1)
1 - e -2p 1 - e -2p •
1 1 - e -2p •
n
Hence, f ( x ) =
2p
+
p
 n2 + 1 cos nx + p
 n2 + 1 sin nx … (1)
n =1 n =1

Putting x = p in Eq. (1),


1 - e -2p 1 - e -2p •
( -1)n
f (p ) =
2p
+
p
 n2 + 1 ÈÎQ cos np = ( -1)n , sin np = 0 ˘˚
n =1

1- e -2p
1- e -2p È 1 • ( -1)n ˘
e -p = + Í- + Â 2 ˙
2p p ÍÎ 2 n = 2 n + 1 ˙˚
1 - e -2p •
( -1)n
=
p
 n2 + 1
n=2
2.16 Chapter 2 Fourier Series and Fourier Integral


p (-1)n
p
e (1 - e -2p
)
= Â n2 + 1
n=2

p (-1)n
e -ep -p
= Â n2 + 1
n=2

p 1 (-1)n
Hence, =Â 2
2 sinh p n = 2 n + 1

example 8
Find the Fourier series of f ( x ) = 1 - cos x in the interval (0, 2p). Hence,
1 • 1
deduce that = Â 2
.
2 n= 1 4 n -1
Solution
The Fourier series of f (x) with period 2p is given by
• •
f ( x ) = a0 + Â an cos nx + Â bn sin nx
n =1 n =1

x
f ( x ) = 1 - cos x = 2 sin
2
1 2p
a0 =
2p Ú0 f ( x )dx

1 2p x
=
2p Ú0 2 sin dx
2
2p
2 x
= -2 cos
2p 2 0

2
= ( -2 cos p + 2 cos 0)
2p
2 2
= [Q cos p = -1, cos 0 = 1]
p
1 2p
an =
p Ú0 f ( x ) cos nx dx

1 2p x
=
p Ú0
2 sin cos nx dx
2
2 2p È Ê 2 n + 1 ˆ Ê 2n - 1ˆ ˘
2p Ú0 Î ÁË 2 ˜¯
= Ísin x - sin Á
Ë 2 ˜¯ ˙˚
x dx
2.5 Fourier Series of Functions of Any Period 2.17

2p
2 2 Ê 2n + 1ˆ 2 Ê 2n - 1ˆ
= - cos Á ˜ x+ cos Á
Ë 2 ˜¯ 0
x
2p 2 n + 1 Ë 2 ¯ 2n - 1
2 È 2 2 cos 0 2 2 cos 0 ˘
= Í - 2n + 1 cos(2 np + p ) + 2 n + 1 + 2 n - 1 cos(2 np - p ) - 2 n - 1 ˙
2p Î ˚
2È 4 4 ˘
= Í -
2p Î 2 n + 1 2 n - 1 ˙˚
[Q cos(2n + 1)p = cos(2n - 1)p = -1,cos 0 = 1]
4 2 1
=-
p 4n - 1
2

1 2p
bn =
p Ú0 f ( x )sin nx dx

1 2p x
=
p Ú02 sin sin nx dx
2
2 2p È Ê 2 n - 1 ˆ Ê 2n + 1ˆ ˘
2p Ú0 Î ÁË 2 ˜¯
= Ícos x - cos Á
Ë 2 ˜¯ ˙˚
x dx

2p
2 2 Ê 2n - 1ˆ 2 Ê 2n + 1ˆ
= sin x- sin x
2p 2 n - 1 ÁË 2 ˜¯ 2 n + 1 ÁË 2 ˜¯ 0
= 0 [Q sin(2 n - 1)p = sin(2 n + 1)p = sin 0 = 0 ]

2 2 4 2 1
Hence, f ( x) =
p
-
p
 4n2 - 1 cos nx … (1)
n =1

Putting x = 0 in Eq. (1),



2 2 4 2 1
f (0 ) = 0 =
p
-
p
 4n2 - 1
n =1

1 • 1
=Â 2
2 n =1 4 n - 1

example 9
Find the Fourier series of f ( x ) = -1 0< x<p
=2 p < x < 2p
Solution
The Fourier series of f (x) with period 2p is given by
• •
f ( x ) = a0 + Â an cos nx + Â bn sin nx
n =1 n =1
2.18 Chapter 2 Fourier Series and Fourier Integral

1 2p
2p Ú0
a0 = f ( x )dx

1 È p
(-1)dx + Ú 2dx ˘˙
2p

2p ÎÍ Ú0
=
p ˚
1 È p
- x 0 + 2 x p ˘˙
2p
=
2p ÎÍ ˚
1
=
2p
[(-p ) + (4p - 2p )]
1
=
2
1 2p
p Ú0
an = f ( x ) cos nx dx

= ÈÍ Ú (-1) cos nx dx + Ú 2 cos nx dx ˘˙


1 p 2p

pÎ 0 p ˚
1 È sin nx
p
sin nx
2p ˘
= Í- +2 ˙
pÍ n 0 n p ˙
Î ˚
= 0 [Q sin 2 np = sin np = sin 0 = 0 ]
1 2p
p Ú0
bn = f ( x )sin nx dx

= ÈÍ Ú ( -1)sin nx dx + Ú 2 sin nx dx ˘˙
1 p 2p

pÎ 0 p ˚
1 È cos nx 2 cos nx ˘
p 2p
= Í +- ˙
pÍ n 0 n p ˙
Î ˚
1 È cos np cos 0 2 cos 2 np 2 cos np ˘
= Í - - +
pÎ n n n n ˙˚
3 ÈÎQ cos 2 np = cos 0 = 1, cos np = ( -1)n ˘˚
= [( -1)n - 1]
np

• È ˘
Hence, f ( x ) = 1 + 3 Â Í (-1) - 1 ˙ sin nx
n

2 p n =1 ÍÎ n ˙˚
1 3Ê 2 2 ˆ
= + Á -2 sin x - sin 3 x - sin 5 x - L˜
2 pË 3 5 ¯
1 6Ê 1 1 ˆ
= - Á sin x + sin 3 x + sin 5 x + L˜
2 p Ë 3 5 ¯
2.5 Fourier Series of Functions of Any Period 2.19

example 10
2
Find the Fourier series of f ( x ) = x 0< x<p [Winter 2012]
=0 p < x < 2p
Solution
The Fourier series of f(x) with period 2p is given by
• •
f ( x ) = a0 + Â an cos nx + Â bn sin nx
n =1 n =1

1 2p
2p Ú0
a0 = f ( x ) dx

1 È p 2
0 ◊ dx ˘˙
2p

2p ÍÎ Ú0 Úp
= x dx +
˚
p
1 x3
=
2p 3 0

1 Êp 3ˆ
=
2p ÁË 3 ˜¯
p2
=
6
1 2p
an = Ú f ( x ) cos nx dx
p 0
= ÈÍ Ú x 2 cos nx dx + Ú 0 ◊ cos nx dx ˘˙
1 p 2p

pÎ 0 p ˚
p
1 2 Ê sin nx ˆ Ê cos nx ˆ Ê sin nx ˆ
= x Á - 2x Á - 2 ˜ + 2 Á - 3 ˜
p Ë n ˜¯ Ë n ¯ Ë n ¯ 0
1 Ê cos np ˆ
= 2p ˜ [Q sin np = sin 0 = 0]
p ÁË n2 ¯
2 ÈÎQ cos np = (-1)n ˘˚
= 2 (-1)n
n
1 2p
bn = Ú f ( x )sin nx dx
p 0
= ÈÍ Ú x 2 sin nx dx + Ú 0 ◊ sin nx dx ˘˙
1 p 2p

pÎ 0 p ˚
p
1 2 Ê cos nx ˆ Ê sin nx ˆ Ê cos nx ˆ
= x Á- ˜ - 2x Á - 2 ˜ + 2 Á 3 ˜
p Ë n ¯ Ë n ¯ Ë n ¯ 0

1 È 2 Ê cos np ˆ Ê cos np ˆ 2 cos 0 ˘


= Í-p ÁË ˜ + 2 ÁË ˜- ˙ [Q sin np = sin 0 = 0]
pÎ n ¯ n3 ¯ n3 ˚
2.20 Chapter 2 Fourier Series and Fourier Integral

1 È 2 (-1)n (-1)n 2 ˘ ÈÎQ cos np = (-1)n , cos 0 = 1˘˚


= Í-p +2 3 - 3 ˙
pÎ n n n ˚

p2 •
(-1)n 1 • È -p 2 (-1)n 2(-1)n 2 ˘
Hence, f ( x ) = + 2 Â 2 cos nx + Â ÍÎ n + n3 - n3 ˙˚ sin nx
6 n =1 n p n =1

example 11
Expand f(x) in Fourier series in the interval (0, 2p) if
Ï -p 0< x<p
f ( x) = Ì
Óx - p p < x < 2p
• 1 p2
and hence, show that  = . [Winter 2016; Summer 2018]
n = 0 (2 n + 1)2 8
Solution
The Fourier series of f(x) with period 2p is given by
• •
f ( x ) = a0 +  an cos nx  bn sin nx
n =1 n =1
2p
1
a0 =
2p Ú f ( x ) dx
0

1 Èp 2p ˘
= Í Ú (- p )dx + Ú ( x - p ) dx ˙
2p ÍÎ 0 p ˙˚
È 2 p˘
1 Í p x2 ˙
= (- p ) x 0 + - px
2p ÍÎ 2 p ˙ ˚
1 È 2 p2 ˘
= Í-p + 2p - 2p -
2 2
+ p2˙
2p Î 2 ˚
p
=-
4
2p
1
an =
p Ú f ( x ) cos nx dx
0

1 Èp 2p ˘
p ÎÍ Ú0 Ú ( x - p ) cos nx dx ˙˙
= Í (-p ) cos nx dx +
p ˚
1 È sin nx
p
Ê sin nx ˆ Ê cos nx ˆ
2p ˘
= Í(-p ) + (x - p ) Á - (1) Á - 2 ˜ ˙
p ÍÎ n 0
Ë n ˜¯ Ë n ¯ p ˙˚
2.5 Fourier Series of Functions of Any Period 2.21

È cos nx ˆ ˘
2p
Í0 + ( x - p ) ÁÊ sin nx ˜ˆ + ÁÊ
1
= ˙ [Q sin np = sin 0 = 0]
ÍÎ
p Ë n ¯ Ë n2 ˜¯ ˙
p ˚

1 È 1 (-1)n ˘ [Q sin 2np = sin np = 0]


= Í 2 - 2 ˙
p În n ˚ [cos 2 np = 1, cos np = (-1)n ]
1 È 1 - (-1)n ˘
= Í ˙
p Î n2 ˚
2p
1
bn =
p Ú f ( x ) sin nx dx
0

1 È ˘
p 2p
= Í Ú (-p ) sin nx dx + Ú ( x - p )sin nx dx ˙
p ÎÍ 0 p ˚˙

1È cos nx
p
Ê cos nx ˆ Ê sin nx ˆ ˘˙
2p
= Í(-p ) - + (x - p ) Á - ˜ - (1) Á - 2 ˜
pÍ n Ë n ¯ Ë n ¯ p ˙˚
Î 0

1 È ÏÔ (-1)n 1 ¸Ô
2p ˘
Ê cos nx ˆ Ê sin nx ˆ ˙
= Íp Ì - ˝ + -( x - p ) Á + [Q cos np = (-1)n ]
p Í ÓÔ n n ˛Ô Ë n ˜¯ ÁË n2 ˜¯ ˙
Î p ˚

(-1)n 1 1
= - - [Q cos 2 np = 1, cos np = ( -1)n , sin 2 np = sin np = 0]
n n n
(-1)n 2
= -
n n
1
= [(-1)n - 2]
n
• •
p 1 È 1 - (-1)n ˘ 1
Hence, f ( x) = - +
4 p
ÂÍ 2 ˙ cos nx + Â [(-1)n - 2] sin nx
n =1Î n ˚ n =1 n

p 2È1 1 1 ˘
=- + cos x + 2 cos3 x + 2 cos 5 x + L˙
4 p ÍÎ 12 3 5 ˚
1
- 3sin x - sin 2 x - sin 3 x - L
2
• •
cos(2 n + 1) x È ˘
Â Í 2 - (n-1)
p 2 n
=- + Â (2 n + 1) 2
- ˙ sin nx ...(1)
4 p n=0 n =1Î ˚
Putting x = p in Eq. (1),

p 2 (-1)
f (p ) = - +
4 p
 (2 n + 1)2
-0
n=0
2.22 Chapter 2 Fourier Series and Fourier Integral


1 p 2 1
È lim f ( x ) + lim f ( x )˘ = - -
2 ÎÍ x Æ p -
 (2n + 1)2
xÆp +
˚˙ 4 p n=0

1 2 1
 (2n + 1)2
p
[ -p + 0] + = -
2 4 p n=0


2 1 p
p
 (2 n + 1) 2
=
4
n=0

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

example 12
Find the Fourier series of f (x) = x + x2 in the interval (–p, p), and
hence, deduce that
p2 1 1 1
(i) = 2 - 2 + 2 -L
12 1 2 3
p2 1 1 1
(ii) = 2 + 2 + 2 +L [Winter 2017, 2012]
6 1 2 3
Solution
The Fourier series of f (x) with period 2p is given by
• •
f ( x ) = a0 + Â an cos nx + Â bn sin nx
n =1 n =1

1 p
a0 =
2p Ú-p f ( x)dx
1 p
Ú- p ( x + x
2
= )dx
2p
p
1 x2 x3
= +
2p 2 3
-p

1 Êp p p2 p3 ˆ
2 3
= ÁË + - + ˜
2p 2 3 2 3¯
1 Ê 2p 3 ˆ
= Á ˜
2p Ë 3 ¯
p2
=
3
2.5 Fourier Series of Functions of Any Period 2.23

1 p
an =
p Ú-p f ( x) cos nx dx
1 p
Ú- p ( x + x
2
= ) cos nx dx
p
p
1 Ê sin nx ˆ Ê cos nx ˆ Ê sin nx ˆ
= ( x + x2 ) Á - (1 + 2 x ) Á - 2 ˜ + 2 Á - 3 ˜
p Ë n ˜¯ Ë n ¯ Ë n ¯ -p

1È Ê cos np ˆ Ï cos( - np ) ¸˘
= Í(1 + 2p ) ÁË 2 ˜
- (1 - 2p ) Ì ˝˙
pÎ n ¯ Ó n
2
˛˚
1 È Ê cos np ˆ ˘
= Í4p Á
p Î Ë n2 ˜¯ ˚
˙ [Q cos(- np ) = cos(np )]
4(-1)n ÈÎQ cos np = (-1)n ˘˚
=
n2
1 p
bn =
p Ú-p f ( x)sin nx dx
1 p
= Ú- p ( x + x
2
)sin nx dx
p
p
1 Ê cos nx ˆ Ê sin nx ˆ Ê cos nx ˆ
= ( x + x2 ) Á - - (1 + 2 x ) Á - 2 ˜ + 2 Á 3 ˜
p Ë n ˜¯ Ë n ¯ Ë n ¯ -p

1È 2 Ê cos np ˆ Ê cos np ˆ Ï cos( - np ) ¸ Ï cos(- np ) ¸˘


= Í(p + p ) ÁË - ˜¯ + 2 Á ˜ +(-p + p 2 ) Ì ˝-2Ì ˝˙
pÎ n Ë n ¯3
Ó n ˛ Ó n
3
˛˚
1 È 2p ˘
= Í- cos np ˙ [Q cos(- np ) = cos np ]
pÎ n ˚
-2(-1)n ÈÎQ cos np = (-1)n ˘˚
=
n
• •
p2 ( -1)n ( -1)n
Hence, f ( x) = + 4Â 2 cos nx - 2Â sin nx
3 n =1 n n =1 n

p2 Ê 1 1 1 ˆ
x + x2 = + 4 Á - 2 cos x + 2 cos 2 x - 2 cos3 x + L˜
3 Ë 1 2 3 ¯
Ê 1 1 1 ˆ
- 2 Á - sin x + sin 2 x - sin 3 x + L˜ ...(1)
Ë 1 2 3 ¯
(i) Putting x = 0 in Eq. (1),
p2 Ê 1 1 1 ˆ
0= + 4 Á - 2 cos 0 + 2 cos 0 - 2 cos 0 + L˜
3 Ë 1 2 3 ¯
2
p 1 1 1
= 2 - 2 + 2 -K
12 1 2 3
2.24 Chapter 2 Fourier Series and Fourier Integral

(ii) Putting x = p in Eq. (1),


p2 È 1 1 1 ˘
p +p2 = + 4 Í- 2 cos p + 2 cos 2p - 2 cos 3p + L˙
3 Î 1 2 3 ˚
p2 Ê1 1 1 ˆ
= + 4 Á 2 + 2 + 2 + K˜ … (2)
3 Ë1 2 3 ¯
Putting x = –p in Eq. (1),
p2 È 1 1 1 ˘
-p + p 2 = + 4 Í- 2 cos( -p ) + 2 cos(-2p ) - 2 cos( -3p ) + L˙
3 Î 1 2 3 ˚
p2 Ê1 1 1 ˆ
= + 4 Á 2 + 2 + 2 + K˜ … (3)
3 Ë 1 2 3 ¯
Adding Eqs (2) and (3),
p2 1 1 1
= 2 + 2 + 2 +K
6 1 2 3

example 13
Find the Fourier series expansion of the periodic function f(x) = x – x2
in the interval –p £ x £ p and show that
1 1 1 p2
- + -L=
12 22 32 12 [Summer 2017]
Solution
The Fourier series of f(x) with period 2p is given by
• •
f ( x ) = a0 + Â an cos nx + Â bn sin nx
n =1 n =1
p
1
a0 =
2p Ú f ( x ) dx
-p
p
1
Ú (x - x
2
= ) dx
2p -p
p
1 x2 x3
= -
2p 2 3 -p

1 Èp 2 p 3 p 2 p 3 ˘
= Í - - - ˙
2p Î 2 3 2 3 ˚
1 Ê 2p 3 ˆ
= Á- ˜
2p Ë 3 ¯
p2
=-
3
2.5 Fourier Series of Functions of Any Period 2.25

p
1
an =
p Ú f ( x ) cos nx dx
-p
p
1
Ú (x - x
2
= ) cos nx dx
p -p
p
1 Ê sin nx ˆ Ê cos nx ˆ Ê sin nx ˆ
= ( x - x2 ) Á ˜¯ - (1 - 2 x ) Á - 2 ˜ + (-2) Á - 3 ˜
p Ë n Ë n ¯ Ë n ¯ -p
p
1 Ê sin nx ˆ Ê cos nx ˆ 2 sin nx
= ( x - x2 ) Á + (1 - 2 x ) Á 2 ˜ +
p Ë n ˜¯ Ë n ¯ n3 -p

1È (-1)n (-1)n ˘ Èsin np = sin(- np ) = 0 ˘


= Í(1 - 2p ) 2 - (1 + 2p ) 2 ˙ Í ˙
pÎ n n ˚ Îcos np = 0 ˚
1 È (-1)n 2p (-1)n (-1)n 2p (-1)n ˘
= Í 2 - - 2 - ˙
p Î n n2 n n2 ˚
1 È 4p (-1)n ˘
= Í- ˙
p Î n2 ˚
4(-1)n
=-
n2
p
1
bn =
p Ú f ( x ) sin nx dx
-p
p
1
Ú (x - x
2
= ) sin nx dx
p -p
p
1 Ê cos nx ˆ Ê sin nx ˆ Ê cos nx ˆ
= ( x - x2 ) Á - ˜ - (1 - 2 x ) Á - 2 ˜ + (-2) Á 3 ˜
p Ë n ¯ Ë n ¯ Ë n ¯ -p
p
1 Ê cos nx ˆ Ê sin x ˆ Ê cos nx ˆ
= - ( x - x2 ) Á ˜¯ + (1 - 2 x ) ÁË 2 ˜¯ - 2 ÁË 3 ˜¯
p Ë n n n -p

1 È 2 (-1) (-1) n
(-1)
n
(-1)n ˘ n
= Í(p - p ) - 2 3 + (-p - p 2 ) +2 3 ˙
p Î n n n n ˚
[Q cos np = (-1)n , sin np = sin( - np ) = 0]
1 È p 2 (-1)n p (-1)n p (-1)n p 2 (-1)n ˘
= Í - - - ˙
p Î n n n n ˚
1 È 2p (-1)n ˘
= Í- ˙
p Î n ˚
2.26 Chapter 2 Fourier Series and Fourier Integral

2(-1)n
=-
n
• •
p2 (-1)n (-1)n
Hence, f ( x) = - - 4 Â 2 cos nx - 2 Â sin nx
3 n =1 n n =1 n

p2 Ê 1 1 1 ˆ
x - x2 = - - 4 Á - 2 cos x + 2 cos 2 x - 2 cos 3 x + L˜
3 Ë 1 2 3 ¯
Ê 1 1 1 ˆ
-2 Á - sin nx + sin 2 x - sin 3 x + L˜ ...(1)
Ë 1 2 3 ¯
Putting x = 0 in Eq. (1),
p2 Ê 1 1 1 ˆ
0=- - 4 Á - 2 + 2 - 2 + L˜
3 Ë 1 2 3 ¯
p2 Ê1 1 1 ˆ
= 4 Á 2 - 2 + 2 - L˜
3 Ë1 2 3 ¯

1 1 1 p2
- + -L=
12 22 32 12

example 14
Find the Fourier series of f (x) = x + |x| in the interval –p < x < p.
[Winter 2015, 2014]
Solution
The Fourier series of f (x) with period 2p is given by
• •
f ( x ) = a0 + Â an cos nx + Â bn sin nx
n =1 n =1

1 p
2p Ú-p
a0 = f ( x ) dx

1 p
2p Ú-p
= ( x + | x |) dx

1 È p
| x | dx ˘˙
p
= Ú
2p ÎÍ -p
x d x + Ú -p ˚
ÈQ a f ( x ) dx = 2 a f ( x ) dx, if f ( x ) is even function ˘
1 È ˘ Í Ú- a Ú0 ˙
p
= 0 + 2 Ú | x | dx ˙
2p ÎÍ 0 ˚ Í = 0, if f ( x ) is odd function ˙˚
Î
1 p
= Ú x dx
p 0
2.5 Fourier Series of Functions of Any Period 2.27

p
1 x2
=
p 2 0

1 Ê p2 ˆ
= Á ˜
pË 2 ¯
p
=
2
1 p
an =
p Ú-p f ( x) cos nx dx
1 p
=
p Ú-p ( x + | x |) cos nx dx
1 È p x cos nx dx + p | x | cos nx dx ˘
ÎÍ Ú-p Ú- p
=
p ˚˙
1 È0 + 2 p | x | cos nx dx ˘ ÈQ x cos nx is odd function ˘
=
p ÎÍ Ú0 ˚˙ Í ˙
Î and | x | cos nx is even function ˚
2 p
=
p Ú0 x cos nx dx
p
2 sin nx Ê cos nx ˆ
= x - (1) Á - 2 ˜
p n Ë n ¯ 0
2 È cos np cos 0 ˘
= - 2 ˙ [Q sin np = sin 0 = 0]
p ÍÎ n2 n ˚
2 È
= Î(-1) - 1˚˘ ÈÎQ cos np = (-1)n , cos 0 = 1˚˘
n
p n2
1 p
p Ú- p
bn = f ( x ) sin nx dx

1 p
= Ú ( x + | x |)sin nx dx
p -p
= ÈÍ Ú x sin nx dx + Ú | x | sin nx dx ˘˙
1 p p

p Î -p -p ˚
1È p ÈQ x sin nx is an even function ˘
2 x sin nx dx + 0 ˘˙
p ÎÍ Ú0
= Í| x | sin x is an odd function ˙
˚ Î ˚
p
2 Ê cos nx ˆ Ê sin nx ˆ
= xÁ- ˜ - (1) Á - 2 ˜
p Ë n ¯ Ë n ¯ 0

È p cos np ˘
2
= ÍÎ - ˙˚ [Q sin np = sin 0 = 0]
p n
2
= - ( -1)n ÈÎQ cos np = ( -1)n ˘˚
n
2.28 Chapter 2 Fourier Series and Fourier Integral

p 2 •È (-1)n - 1 ˘ •
(-1)n
Hence, f ( x ) = +
2 p
 ÍÎ n2 ˚
˙ cos nx - 2 Â sin nx
n =1 n =1 n

p 2 È 2 2 2 ˘
x + |x| = + Í - 2 cos x - 2 cos3 x - 2 cos 5 x - L˙
2 p Î 1 3 5 ˚
È 1 1 1 ˘
- 2 Í - sin x + sin 2 x - sin 3 x + L˙
Î 1 2 3 ˚

p 4Ê 1 1 1 ˆ
= - Á 2 cos x + 2 cos3 x + 2 cos 5 x + L˜
Ë
2 p 1 3 5 ¯
Ê 1 1 ˆ
+ 2 Á sin x - sin 2 x + sin 3 x - L˜
Ë 2 3 ¯

example 15
Find the Fourier series of f(x) = eax in the interval (–p, p).
[Winter 2013]
Solution
The Fourier series of f (x) with period 2p is given by
• •
f ( x ) = a0 + Â an cos nx + Â bn sin nx
n =1 n =1

1 p
a0 =
2p Ú-p f ( x) dx
1 p
= Ú- p e
ax
dx
2p
p
1 e ax
=
2p a
-p
1
= (e ap - e - ap )
2p a
sinh ap
=
pa
1 p
an = Ú f ( x ) cos nx dx
p -p
1 p
= Ú e ax cos nx dx
p -p
2.5 Fourier Series of Functions of Any Period 2.29

p
1 e ax
= (a cos nx + n sin nx )
p a 2 + n2
-p

1 È e ap e - ap ˘
= Í 2 2
( a cos np ) - 2 2
{a cos(- np )}˙ [Q sin np = sin(- np ) = 0 ]
p Îa + n a +n ˚
a cos np
= (e ap - e - ap ) [Q cos(- np ) = cos np ]
p (a 2 + n2 )
(-1)n 2 a sinh ap ÈÎQ cos np = (-1)n ˘˚
=
p (a 2 + n2 )
1 p
p Ú- p
bn = f ( x )sin nx dx

1 p
= Ú e ax sin nx dx
p -p
p
1 e ax
= (a sin nx - n cos nx )
p a 2 + n2
-p

1È e ap
e - ap ˘
= Í 2 2
( - n cos np ) + 2 2
{n cos( - np )}˙
p Îa + n a +n ˚
n cos np
=- 2 2
(e ap - e - ap ) [Q cos( - np ) = cos np ]
p (a + n )
2 n( -1)n sinh ap ÈÎQ cos np = ( -1)n ˘˚
=- 2 2
p (a + n )

sinh ap 2 a sinh ap (-1)n 2 sinh ap • n(-1)n
Hence, f ( x) =
ap
+
p
 a 2 + n2 cos nx -
p
 a2 + n2 sin nx
n =1 n =1

sinh ap 2 sinh ap (-1)n
=
ap
+
p
 a2 + n2 (a cos nx - n sin nx)
n =1

example 16
Find the Fourier series of f ( x ) = 0 -p < x < 0
=x 0< x<p [Summer 2013]

Solution
The Fourier series of f(x) with period 2p is given by
• •
f ( x ) = a0 + Â an cos nx + Â bn sin nx
n =1 n =1
2.30 Chapter 2 Fourier Series and Fourier Integral

1 p
2p Ú-p
a0 = f ( x ) dx

1 È 0
0 dx + Ú x dx ˘˙
p
=
2p Í
Î Ú - p 0 ˚
p
1 x2
=
2p 2 0

1 Êp ˆ2
= ÁË - 0˜
2p 2 ¯
p
=
4
1 p
an = Ú f ( x ) cos nx dx
p -p
1 p
= Ú x cos nx dx
p 0
p
1 sin nx Ê cos nx ˆ
= x - (1) Á - 2 ˜
p n Ë n ¯ 0
1 È cos np cos 0 ˘
= Í 2 - 2 ˙ [Q sin np = sin 0 = 0]
pÎ n n ˚
1 È ( -1)n 1 ˘ ÈÎQ cos np = ( -1)n , cos 0 = 1˘˚
= Í - 2˙
p Î n2 n ˚
1 p
p Ú- p
bn = f ( x )sin nx dx

1 p
= Ú x sin nx dx
p 0
p
1 Ê cos nx ˆ Ê sin nx ˆ
= xÁ- ˜¯ - (1) Á - 2 ˜
p Ë n Ë n ¯ 0
1 È p cos np ˘
= ÍÎ - ˙˚ [Q sin np = sin 0 = 0]
p n
1 È ( -1)n ˘ ÈÎQ cos np = ( -1)n ˘˚
= Í -p ˙
pÎ n ˚
( -1)n
=-
n
• È (-1)n 1 ˘ •
(-1)n
Hence, f ( x ) = p + 1 Â Î n2 n2 ˚
Í - ˙ cos nx - Â n sin nx
4 p n =1 n =1
2.5 Fourier Series of Functions of Any Period 2.31

p 1Ê 2 2 2 ˆ
= + - cos x - 2 cos3 x - 2 cos 5 x - L˜
4 p ÁË 12 3 5 ¯
Ê 1 1 1 ˆ
- Á - sin x + sin 2 x - sin 3 x + L˜
Ë 1 2 3 ¯
p 2Ê 1 1 1 ˆ
= - cos x + 2 cos3 x + 2 cos 5 x + L˜
4 p ÁË 12 3 5 ¯
Ê 1 1 ˆ
+ Á sin x - sin 2 x + sin 3 x - L˜
Ë 2 3 ¯

example 17
Find the Fourier series of f ( x ) = -p -p < x < 0
=x 0< x<p

p2 1 1 1
Hence, deduce that = + + +º . [Summer 2016, 2014]
8 12 32 52
Solution
The Fourier series of f (x) with period 2p is given by
• •
f ( x ) = a0 + Â an cos nx + Â bn sin nx
n =1 n =1

1 p
2p Ú-p
a0 = f ( x )dx

1 È 0
(-p )dx + Ú x dx ˘˙
p
= Í
2p Î Ú - p 0 ˚
È p˘
1 Í 0 x2 ˙
= -p x -p +
2p Í 2 ˙
Î 0˚

1 È 2 p2 ˘
= Í-p + ˙
2p Î 2 ˚
p
=-
4
1 p
p Ú- p
an = f ( x ) cos nx dx

= ÈÍ Ú (-p ) cos nx dx + Ú x cos nx dx ˘˙


1 0 p

p Î -p 0 ˚
2.32 Chapter 2 Fourier Series and Fourier Integral

1 È sin nx
0
Ê sin nx ˆ Ê cos nx ˆ ˘
p
= Í -p + xÁ - - 2 ˜ ˙
p Í n -p Ë n ˜¯ ÁË n ¯ 0˙
Î ˚
1 È cos np cos 0 ˘
= Í 2 - 2 ˙ [Q sin np = sin 0 = 0 ]
pÎ n n ˚
1 È
= 2 Î
( -1)n - 1˘˚ ÈÎQ cos np = ( -1)n , cos 0 = 1˚˘
pn
1 p
p Ú- p
bn = f ( x )sin nx dx

= ÈÍ Ú ( -p )sin nx dx + Ú x sin nx dx ˘˙
1 0 p

pÎ - p 0 ˚
1È Ê cos nx ˆ Ê sin nx ˆ ˘
0 p
cos nx
= Í -p - + xÁ- - - ˜ ˙
pÍ n -p Ë n ˜¯ ÁË n2 ¯ 0 ˙
Î ˚
1 È Ï cos 0 cos( - np ) ¸ Ê cos np ˆ ˘
= Íp Ì - ˝ + p ÁË - ˜ ˙ [Q sin np = sin 0 = 0 ]
pÎ Ó n n ˛ n ¯˚
1
= [1 - 2 cos np ] [Q cos 0 = 1, cos( - np ) = cos np ]
n
1
= [1 - 2( -1)n ] ÈÎQ cos np = ( -1)n ˘˚
n
p 1 • È (-1)n - 1 ˘ • È
1 - 2(-1)n ˘
Hence, f ( x) = - + ÂÍ 2 ˙ cos nx + Â Í ˙ sin nx ... (1)
4 p n =1 Í
Î n ˙˚ n =1 Í
Î n ˙˚
At x = 0,
1 -p + 0 p
f (0 ) = È lim f ( x ) + lim f ( x )˘ = =-
2 ÎÍ x Æ 0 -
xÆ0 +
˚˙ 2 2

Putting x = 0 in Eq. (1),


p 1 • È ( -1)n - 1 ˘
 ÍÍ n2 ˙˙
p
f (0 ) = - =- +
2 4 p n =1 Î ˚
p2 1 1 1
= + + +K
8 12 32 52

example 18
Find the Fourier series of f ( x ) = - x - p -p < x < 0
= x +p 0< x<p
2.5 Fourier Series of Functions of Any Period 2.33

Solution
The Fourier series of f (x) with period 2p is given by
• •
f ( x ) = a0 + Â an cos nx + Â bn sin nx
n =1 n =1

1 p
2p Ú-p
a0 = f ( x ) dx

1 È 0
(- x - p )dx + Ú ( x + p ) dx ˘˙
p

2p ÍÎ Ú-p
=
0 ˚
È 0 p˘
1 Í x2 x2
= - -px + +px ˙
2p Í 2 2 ˙
Î -p 0˚

1 ÈÊ p 2 ˆ Ê p2 ˆ˘
= ÍÁ -p2˜ +Á +p2˜˙
2p ÎË 2 ¯ Ë 2 ¯˚
p
=
2
1 p
p Ú- p
an = f ( x ) cos nx dx

= ÍÈ Ú (- x - p ) cos nx dx + Ú ( x + p ) cos nx dx ˘˙
1 0 p

pÎ - p 0 ˚

0
Í (- x - p ) ÊÁ
sin nx ˆ Ê cos nx ˆ
= - (-1) Á - 2 ˜
pÍ Ë n ˜¯ Ë n ¯
Î -p

Ê sin nx ˆ Ê cos nx ˆ

+ (x + p )Á ˜ - (1) Á - 2 ˜ ˙
Ë n ¯ Ë n ¯ ˙

ÈÏ cos 0 cos(- np ) ¸ Ê cos np cos 0 ˆ ˘ ÈQ sin np = sin(- np )˘


1
= ÍÌ- 2 + ˝+Á - 2 ˜˙ Í ˙
n2 ˛ Ë n n ¯˚ Î = sin 0 = 0 ˚
2
ÎÓ n
p
2
= 2
[(-1)n - 1] ÈÎQ cos( - np ) = cos np = (-1)n , cos 0 = 1˘˚
pn
1 p
p Ú- p
bn = f ( x )sin nx dx

= ÍÈ Ú (- x - p )sin nx dx + Ú ( x + p )sin nx dx ˘˙
1 0 p

pÎ - p 0 ˚
2.34 Chapter 2 Fourier Series and Fourier Integral


0
Í (- x - p ) ÊÁ -
cos nx ˆ Ê sin nx ˆ
= - (-1) Á - 2 ˜
pÍ Ë n ˜¯ Ë n ¯
Î -p

Ê cos nx ˆ Ê sin nx ˆ
p ˘
+ (x + p )Á - - (1) Á - 2 ˜ ˙
Ë n ˜¯ Ë n ¯ ˙
0 ˚
1 ÈÏ Ê cos 0 ˆ ¸ Ï Ê cos np ˆ Ê cos 0 ˆ ¸˘
= ÍÌ(-p ) ÁË - ˜¯ ˝ + Ì(2p ) ÁË - ˜¯ + p ÁË ˜ ˝˙
p ÍÎÓ n ˛ Ó n n ¯ ˛˙˚
ÈQ sin np = sin(- np )˘
Í ˙
Î = sin 0 = 0 ˚
2 ÈÎQ cos 0 = 1,cos( np ) = (-1)n ˘˚
= [1 - (-1)n ]
n

p 2 È (-1)n - 1 ˘
• • È
1 - (-1)n ˘
Hence, f ( x ) = + ÂÍ ˙ cos nx + 2 Â Í ˙ sin nx
˚
n =1 Î
2
n =1 Í
2 p Î n ˙˚ n
p 4Ê 1 1 1 ˆ
= - Á 2 cos x + 2 cos 3 x + 2 cos 5 x + L˜
2 p Ë1 3 5 ¯
Ê1 1 1 ˆ
+ 4 Á sin x + sin 3 x + sin 5 x + L˜
Ë1 3 5 ¯

example 19
Find the Fourier series of f ( x ) = 0 -p < x < 0
= sin x 0< x<p
1 1 1 1
Hence, deduce that = + + +K
2 1◊ 3 3 ◊ 5 5 ◊ 7
Solution
The Fourier series of f (x) with period 2p is given by
• •
f ( x ) = a0 + Â an cos nx + Â bn sin nx
n =1 n =1

1 p
a0 =
2p Ú - p f ( x ) dx
1 È 0 0 dx + p sin x dx ˘
=
2p ÍÎ Ú-p Ú0 ˙˚
1 p
= - cos x 0
2p
2.5 Fourier Series of Functions of Any Period 2.35

1
= ( - cos p + cos 0)
2p
1
= [Q cos p = -1, cos 0 = 1]
p
1 p
p Ú- p
an = f ( x ) cos nxdx

= ÈÍ Ú 0 ◊ cos nx dx + Ú sin x cos nx dx ˘˙


1 0 p

pÎ - p 0 ˚
1 p
2p Ú0
= [sin(n + 1) x - sin(n - 1) x ]dx
p
1 cos(n + 1) x cos(n - 1) x
= - + , n π1
2p n +1 n -1 0
1È cos(n + 1)p cos 0 cos(n - 1)p cos 0 ˘
= ÍÎ - + + -
2p n +1 n +1 n -1 n - 1 ˙˚
ÈQ cos(n + 1)p = ( -1)n +1 ˘
1 È ( -1) n +1
1 ( -1) n -1
1 ˘ Í n -1
˙
= Í- + + - ˙ , n π 1 Í cos(n - 1)p = ( -1) ˙
2p ÎÍ n + 1 n +1 n -1 n - 1 ˚˙ Í ˙
Î cos 0 = 1 ˚
1
=- [1 + ( -1)n ], n π 1
p (n2 - 1)
For n = 1,
1 p
p Ú0
a1 = sin x cos x dx

1 p
2p Ú0
= sin 2 x dx
p
1 cos 2 x
= -
2p 2 0
1 È cos 2p cos 0 ˘
= ÍÎ- 2 + 2 ˙˚
2p
=0 [Q cos 2p = cos 0 = 1]
1 p
p Ú- p
bn = f ( x )sin nx dx

= ÈÍ Ú 0 ◊ sin nx dx + Ú sin x sin nx dx ˘˙


1 0 p

p Î -p 0 ˚
1 p
2p Ú0
= [cos(n - 1) x - cos( n + 1) x ] dx
2.36 Chapter 2 Fourier Series and Fourier Integral

p
1 sin(n - 1) x sin(n + 1) x
= - , n π1
2p n -1 n +1 0
= 0, n π 1 [Q sin(n - 1)p = sin(n + 1)p = sin 0 = 0 ]
For n = 1,
1 p
p Ú0
b1 = sin x sin x dx

1 p
2p Ú0
= (1 - cos 2 x ) dx
p
1 sin 2 x
= x-
2p 2 0
1
= (p ) [Q sin 2p = sin 0 = 0]
2p
1
=
2

1 1 • È 1 + (-1)n ˘ 1
Hence, f ( x) = - ÂÍ 2 ˙ cos nx + sin x
p p Í n - 1 ˚˙
n=2 Î 2
1 2 Ê1 1 1 ˆ 1
= - Á cos 2 x + cos 4 x + cos6 x + L˜ + sin x ... (1)
p p Ë3 15 35 ¯ 2
At x = 0,
1È ˘
f (0 ) = Í lim- f ( x ) + lim+ f ( x )˙ = 0
2 ÎxÆ0 xÆ0 ˚
Putting x = 0 in Eq. (1),
1 2 Ê1 1 1 ˆ
f (0 ) = 0 = - + + + K˜
p p ÁË 3 15 35 ¯
1 1 1 1
= + + +K
2 1◊ 3 3 ◊ 5 5 ◊ 7

example 20
Ï-p -p < x < 0
Find the Fourier series of f ( x ) = Ì
Óx - p 0< x<p
[Summer 2015]
Solution
The Fourier series of f(x) with period 2p is given by
• •
f ( x ) = a0 + Â an cos nx + Â bn sin nx
n =1 n =1
2.5 Fourier Series of Functions of Any Period 2.37

1 p
a0 =
2p Ú-p f ( x) dx
1 È 0
( -p ) dx + Ú ( x - p ) dx ˘˙
p
=
2p Í
Î Ú - p 0 ˚

È p˘
1 Í x2
-px ˙
0
= ( -p ) x -p +
2p Í 2 ˙
Î 0˚

1 È Ê p2 ˆ˘
= Í( -p )[ -( -p )] + Á -p2˜˙
2p Î Ë 2 ¯˚

È 2 p2 ˘
1
= Í -p - ˙
Î
2p 2 ˚
1 Ê 3p 2 ˆ
= Á- ˜
2p Ë 2 ¯
3p
=-
4
1 p
an =
p Ú-p f ( x) cos nx dx
1È 0
(-p ) cos nx dx + Ú ( x - p ) cos nx dx ˘˙
p

p ÎÍ Ú-p
=
0 ˚

1 È sin nx
0
Ê sin nx ˆ Ê cos nx ˆ ˘
p
= Í( -p ) + (x - p ) Á - - ˜ ˙
Ë n ˜¯
(1) ÁË
p ÍÎ n -p n2 ¯ 0 ˙˚

È p˘
Í(-p )(0) + ( x - p ) ÊÁ
1 sin nx ˆ cos nx
= ˜+ ˙ [Q sin(- np ) = sin 0 = 0]
ÍÎ Ë n ¯ n2 0˙
p ˚

1 È cos np 1 ˘
= - 2˙ [Q sin np = sin 0 = 0, cos 0 = 1]
p ÍÎ n2 n ˚

1 È ( -1)n 1 ˘
= Í - 2˙ [Q cos np = (-1)n ]
p Î n2 n ˚

1
= [( -1)n - 1]
n2p
2.38 Chapter 2 Fourier Series and Fourier Integral

1 p
bn =
p Ú-p f ( x)sin nx dx
1È 0
( -p )sin nx dx + Ú ( x - p ) sin nx dx ˘˙
p
=
p Í
Î Ú - p 0 ˚

1 È cos nx
0
Ê cos nx ˆ Ê sin nx ˆ ˘
p
= Í( -p ) - + (x - p ) Á - ˜ - (1) ÁË - ˜ ˙
p ÍÎ n -p
Ë n ¯ n2 ¯ 0 ˙˚

1 È Ï 1 cos np ¸ Ê cos nx ˆ sin nx ˘˙


p
= Íp Ì - ˝ + - ( x - p ) ÁË ˜ + [∵ cos 0 = 1]
p ÎÍ Ó n n ˛ n ¯ n2 0 ˙˚

1 È Ê 1 cos np ˆ Ê 1ˆ˘ ÈQ sin np = sin 0 = 0 ˘


= Íp ÁË - ˜¯ + (-p ) ÁË ˜¯ ˙
p Î n n n ˚ ÎÍ cos 0 = 1 ˚˙

1 È p p (-1)n p ˘
= Í - - ˙ [Q cos np = (-1)n ]
p În n n˚

1 È (-1)n ˘
= Í-p ˙
pÎ n ˚
(-1)n
=-
n
(-1)n +1
=
n

3p 1 •
1 •
(-1)n +1
Hence, f ( x ) = - + Ân 2
[(-1)n - 1] cos nx + Â sin nx
4 p n =1 n =1 n

3p 2 Ê 1 1 ˆ Ê1 1 1 ˆ
=- - Á 2 cos x + 2 cos3 x + L˜ + Á sin x - sin 2 x + sin 3 x - L˜
4 p Ë1 3 ¯ Ë 1 2 3 ¯

example 21
p p
Find the Fourier series of f ( x ) = x - <x<
2 2
p 3p
=p -x <x<
2 2
2.5 Fourier Series of Functions of Any Period 2.39

Solution
The Fourier series of f (x) with period 2p is given by
• •
f ( x ) = a0 + Â an cos nx + Â bn sin nx
n =1 n =1

3p
1
a0 =
2p Ú -
2
p f ( x )dx
2

1 È 2 ˘
p 3p
= Í Ú p x dx + Ú p2 (p - x )dx ˙
2p Í - ˙˚
Î 2 2

È p 3p ˘
1 Í x2 2 x2 2 ˙
= + px -
2p ÍÍ 2 p 2 p ˙˙
-
Î 2 2 ˚

1 ÈÊ p 2 p 2 ˆ Ê 3p 2 9p 2 ˆ Ê p 2 p 2 ˆ ˘
= ÍÁ - ˜ +Á - ˜ -Á - ˜˙
2p ÎË 8 8 ¯ Ë 2 8 ¯ Ë 2 8 ¯˚
=0
3p
1 2
p Ú- p
an = f ( x ) cos nx dx
2

1È 2 ˘
p 3p
= Í Ú p x cos nx dx + Ú p2 (p - x ) cos nx dx ˙
pÍ - ˙˚
Î 2 2

È p 3p ˘
1 Í Ê sin nx ˆ Ê cos nx ˆ 2 Ê sin nx ˆ Ê cos nx ˆ 2 ˙
= Í xÁ - (1) Á - 2 ˜ + (p - x ) Á - ( -1) Á - 2 ˜
p Ë n ˜¯ Ë n ¯ p Ë n ˜¯ Ë n ¯ p ˙
ÍÎ -
2 2
˙˚
È p Ê
1 3np np ˆ 1 Ê 3np np ˆ ˘
= Í - ÁË sin + sin ˜ - 2 Á cos - cos ˜ ˙
Î 2n
p 2 2 ¯ n Ë 2 2 ¯˚
1È p np 2 np ˘
= Í - sin np cos + 2 sin np sin
pÎ n 2 n 2 ˙˚
È A+ B A-B ˘
ÍQ sin A + sin B = 2 sin 2 cos 2 ˙
Í ˙
Í cos A - cos B = 2 sin A + B sin B - A ˙
ÍÎ 2 2 ˙˚
=0 [Q sin np = 0]
2.40 Chapter 2 Fourier Series and Fourier Integral

3p
1
bn =
p Ú -
2
p f ( x )sin nx dx
2

1È 2 ˘
p 3p
= Í Ú p x sin nx dx + Ú p2 (p - x )sin nx dx ˙
pÍ - ˙˚
Î 2 2

È p 3p ˘
1 Í Ê cos nx ˆ Ê sin nx ˆ 2 Ê coos nx ˆ Ê sin nx ˆ 2 ˙
= Í xÁ- ˜ - (1) Á - 2 ˜ + (p - x ) Á - ˜ - (-1) Á - 2 ˜ ˙
p Ë n ¯ Ë n ¯ -p Ë n ¯ Ë n ¯ p
Í ˙
Î 2 2 ˚
1È p np 3 np p 3np 1 3np ˘
= Í- cos + 2 sin + cos - 2 sin
p Î 2n 2 n 2 2n 2 n 2 ˙˚
1Èp Ê 3np np ˆ 3 np 1 3np ˘
= Í ÁË cos - cos ˜ + 2 sin - 2 sin ˙
p Î 2n 2 2 ¯ n 2 n 2 ˚
1È p np 3 np 1 3np ˘
= Í- sin np sin + 2 siin - 2 sin
pÎ n 2 n 2 n 2 ˙˚
1 È np 3np ˘
= 2 Í
3 sin - sin
2 ˙˚
[Q sin np = 0]
pn Î 2

1 1 È np 3np ˘
Hence, f ( x ) =
p
 n2 ÍÎ3 sin 2
- sin
2 ˙˚
sin nx
n =1

Fourier series expansion with Period 2l

example 22
Find the Fourier series of f (x) = x2 in the interval (0, 4). Hence, deduce
p2 1 1 1
that = 2 + 2 + 2 +K
6 1 2 3
Solution
The Fourier series of f (x) with period 2l = 4 is given by

np x • np x
f ( x ) = a0 + Â an cos + Â bn sin
n =1 l n =1 l

np x • np x
= a0 + Â an cos + Â bn sin
n =1 2 n =1 2
2.5 Fourier Series of Functions of Any Period 2.41

1 2l
2l Ú0
a0 = f ( x )dx

1 4
= Ú x 2 dx
4 0
4
1 x3
=
4 3
0
1 Ê 64 ˆ
= Á ˜
4Ë 3 ¯
16
=
3
1 2l np x
l Ú0
an = f ( x ) cos dx
l
1 4 np x
= Ú x 2 cos dx
2 0 2
4
1 2Ê 2 np x ˆ Ê 4 np x ˆ Ê 8 np x ˆ
= x Á sin - (2 x ) Á - 2 2 cos + 2 Á - 3 3 sin
2 Ë np 2 ˜¯ Ë n p 2 ˜¯ Ë np 2 ˜¯ 0

1È Ê 4 ˆ˘
= Í8 ÁË 2 2 cos 2 np ˜¯ ˙
2Î n p
[Q sin 2np = sin 0 = 0]
˚
1 È Ê 4 ˆ˘
= Í8 ˙ [Q cos 2 np = 1]
2 Î ÁË n2p 2 ˜¯ ˚
16
=
n2p 2
1 2l np x
bn = Ú
l 0
f ( x )sin
l
dx

1 4 np x
= Ú x 2 sin dx
2 0 2
4
1 2Ê 2 np x ˆ Ê 4 np x ˆ Ê 8 np x ˆ
= x Á- cos ˜ - 2 x Á - 2 2 sin ˜ + 2 Á 3 3 cos
2 Ë np 2 ¯ Ë n p 2 ¯ Ën p 2 ˜¯ 0

1È Ê 2 ˆ Ê 8 ˆ Ê 8 ˆ˘
= Í16 ÁË - coos 2 np ˜ + 2 Á 3 3 cos 2 np ˜ - 2 Á 3 3 cos 0˜ ˙
2Î np ¯ Ë np ¯ Ë np ¯˚
1 Ê 32 ˆ
= Á - ˜ [Q cos 2 np = cos 0 = 1]
2 Ë np ¯
16
=-
np
2.42 Chapter 2 Fourier Series and Fourier Integral


16 16 1 np x 16 • 1 np x
Hence, f ( x) = +
3 p2
 n2 cos 2
- Â sin
p n =1 n 2
n =1

16 16 Ê 1 px 1 1 3p x ˆ
x2 = + 2 Á 2 cos + 2 cos p x + 2 cos + L˜
3 p Ë1 2 2 3 2 ¯
16 Ê 1 px 1 1 3p x ˆ
- Á sin + sin p x + sin + L˜ ...(1)
p Ë1 2 2 3 2 ¯
Putting x = 0 in Eq. (1),
16 16 Ê 1 1 1 ˆ
0= + 2 Á 2 + 2 + 2 + K˜
3 p Ë1 2 3 ¯
1 1 Ê1 1 1 ˆ
- = 2 Á 2 + 2 + 2 + K˜ … (2)
3 p Ë1 2 3 ¯

Putting x = 4 in Eq. (1),


Ê1
16 16 1 1 ˆ
16 = + ÁË 2 + 2 + 2 + K˜¯
3 p2 1 2 3
2 1 Ê1 1 1 ˆ
= + + + K˜
3 p 2 ÁË 12 22 32
… (3)
¯

Adding Eqs (2) and (3),


1 2 Ê1 1 1 ˆ
= 2 Á 2 + 2 + 2 + K˜
3 p Ë1 2 3 ¯
p2 1 1 1
= 2 + 2 + 2 +K
6 1 2 3

example 23
Find the Fourier series of f (x) = 4 – x2 in the interval (0, 2). Hence,
p2 1 1 1
deduce that = 2 + 2 + 2 +K
6 1 2 3
Solution
The Fourier series of f (x) with period 2l = 2 is given by

np x • np x
f ( x ) = a0 + Â an cos + Â bn sin
n =1 l n =1 l
• •
= a0 + Â an cos np x + Â bn sin np x
n =1 n =1
2.5 Fourier Series of Functions of Any Period 2.43

1 2l
2l Ú0
a0 = f ( x )dx

1 2
= Ú (4 - x 2 )dx
2 0
2
1 x3
= 4x -
2 3
0
1Ê 8ˆ
= 8- ˜
2 ÁË 3¯
8
=
3
1 2l np x
an = Ú
l 0
f ( x ) cos
l
dx
2
= Ú (4 - x 2 ) cos np x dx
0
2
Ê sin np x ˆ Ê cos np x ˆ Ê sin np x ˆ
= (4 - x 2 ) Á - (-2 x ) Á - 2 2 ˜ + (-2) Á - 3 3 ˜
Ë np ˜¯ Ë n p ¯ Ë np ¯ 0

Ê cos 2 np ˆ
= -4 Á 2 2 ˜ [Q sin np = sin 0 = 0]
Ë n p ¯
4
=- [Q cos 2 np = 1]
n p2
2

1 2l np x
bn = Ú
l 0
f ( x )sin
l
dx
2
= Ú (4 - x 2 )sin np x dx
0
2
Ê cos np x ˆ Ê sin np x ˆ Ê cos np x ˆ
= (4 - x 2 ) Á - - (-2 x ) Á - 2 2 ˜ + (-2) Á 3 3 ˜
Ë np ˜¯ Ë n p ¯ Ë np ¯ 0

Ê cos 2 np ˆ Ê cos 0 ˆ Ê cos 0 ˆ


= -2 Á 3 3 ˜ + 4 Á + 2Á 3 3 ˜ [Q sin np = sin 0 = 0]
Ë np ¯ Ë np ˜¯ Ën p ¯
4
= [Q cos 2 np = cos 0 = 1]
np
• •
8 4 1 4 1
Hence, f ( x) = -
3 p2
 n2 cos np x + p  n sin np x
n =1 n =1
8 4 Ê1 1 1 ˆ
4 - x2 = - 2 ÁË 2 cos p x + 2 cos 2p x + 2 cos3p x + L˜¯
3 p 1 2 3
4 Ê1 1 1 ˆ
+ Á sin p x + sin 2p x + sin 2p x + L˜¯ ...(1)
p Ë1 2 3
2.44 Chapter 2 Fourier Series and Fourier Integral

Putting x = 0 in Eq. (1),


8 4 Ê1 1 1 ˆ
4= - 2 Á 2 + 2 + 2 + K˜
3 p Ë1 2 3 ¯
1 1 Ê1 1 1 ˆ
= - 2 Á 2 + 2 + 2 + K˜ … (2)
3 p 1Ë 2 3 ¯
Putting x = 2 in Eq. (1),
Ê1
8 4 1 1 ˆ
0= -
ÁË 2 + 2 + 2 + K˜¯
3 p2
1 2 3
2 1 Ê1 1 1 ˆ
- = - 2 Á 2 + 2 + 2 + K˜ … (3)
3 p Ë1 2 3 ¯
Adding Eqs (2) and (3),
1 2 Ê1 1 1 ˆ
- = - 2 Á 2 + 2 + 2 + K˜
3 p Ë1 2 3 ¯
p2 1 1 1
= 2 + 2 + 2 +K
6 1 2 3

example 24
Find the Fourier series of f (x) = 2x – x2 in the interval (0, 3). Hence,
p2 1 1 1
deduce that = 2 + 2 + 2 +º [Summer 2016]
6 1 2 3
Solution
The Fourier series of f (x) with period 2l = 3 is given by

np x • np x
f ( x ) = a0 + Â an cos + Â bn sin
n =1 l n =1 l

2 np x • 2 np x
= a0 + Â an cos + Â bn sin
n =1 3 n =1 3
1 2l
2l Ú0
a0 = f ( x )dx

1 3
= Ú (2 x - x 2 )dx
3 0
3
1 x3
= x2 -
3 3
0
1Ê 27 ˆ
= Á9 - ˜
3Ë 3¯
=0
2.5 Fourier Series of Functions of Any Period 2.45

1 2l np x
l Ú0
an = f ( x ) cos dx
l
2 3 2 np x
= Ú (2 x - x 2 ) cos dx
3 0 3
2 Ê 3 2 np x ˆ Ê 9 2 np x ˆ
= (2 x - x 2 ) Á sin ˜ - (2 - 2 x ) Á - 2 2 cos
3 Ë 2 np 3 ¯ Ë 4n p 3 ˜¯
3
Ê 27 2 np x ˆ
+ (-2) Á - 3 3 sin
Ë 8n p 3 ˜¯ 0

2È Ê 9 ˆ Ê 9 ˆ˘
= Í4 ÁË - 2 2 cos 2 np ˜¯ + 2 ÁË - 2 2 cos 0˜¯ ˙ [Q sin 2 np = sin 0 = 0]
3Î 4n p 4n p ˚
2È 9 ˘
= (-4 - 2)˙ [Q cos 2 np = cos 0 = 1]
3 ÍÎ 4 n2p 2 ˚
9
=-
n p2
2

1 2l np x
bn = Ú
l 0
f ( x )sin
l
dx

2 3 2 np x
= Ú (2 x - x 2 )sin dx
3 0 3
2 Ê 3 2 np x ˆ Ê 9 2 np x ˆ
= (2 x - x 2 ) Á - cos - (2 - 2 x ) Á - 2 2 sin
3 Ë 2 np 3 ˜¯ Ë 4n p 3 ˜¯
3
Ê 27 2 np x ˆ
+(-2) Á 3 3 cos
Ë 8n p 3 ˜¯ 0

2È Ê 3 ˆ Ê 27 ˆ
= Í(-3) ÁË - cos 2 np ˜ - (2) Á 3 3 cos 2 np ˜
3Î 2 np ¯ Ë 8n p ¯
Ê 27 ˆ˘
+ 2 Á 3 3 cos 0˜ ˙
Ë 8n p ¯˚
[Q sin 2np = sin 0 = 0]
2Ê 9 ˆ
= Á ˜ [Q cos 2 np = cos 0 = 1]
3 Ë 2 np ¯
3
=
np

9 1 2 np x 3 • 1 2 np x
Hence, f ( x) = -
p2
 n2 cos
3
+ Â sin
p n =1 n 3
n =1
2.46 Chapter 2 Fourier Series and Fourier Integral

9 Ê1 2p x 1 4p x 1 6p x ˆ
2 x - x2 = - 2 Á
cos + 2 cos + 2 cos + L˜
p Ë1 2 3 2 3 3 3 ¯
3 Ê1 2p x 1 4p x 1 6p x ˆ
+ Á sin + sin + sin + L˜ … (1)
p Ë1 3 2 3 3 3 ¯
Putting x = 0 in Eq. (1),
9 Ê1 1 1 ˆ
0=- 2 Á
+ 2 + 2 + K˜
p 1 Ë 2
2 3 ¯
1 1 1
0 = 2 + 2 + 2 +K … (2)
1 2 3
Putting x = 3 in Eq. (1),
9 Ê1 1 1 ˆ
-3 = - 2 Á
+ 2 + 2 + K˜
p 1 Ë 2
2 3 ¯
p2 1 1 1
= 2 + 2 + 2 +K … (3)
3 1 2 3
Adding Eqs (2) and (3),
p2 Ê1 1 1 ˆ
= 2 Á 2 + 2 + 2 + K˜
3 Ë 1 2 3 ¯
p2 1 1 1
= + + +K
6 12 22 32

example 25
Ï x 0£ x£2
For the function f(x) = Ì , find its Fourier series.
Ó4 - x 2 £ x £ 4
1 1 1 p2
Hence, show that + + +L = . [Winter 2015]
12 32 52 8

Solution
The Fourier series of f(x) with period 2l = 4 is given by

np x • np x
f(x) = a0 + Â an cos + Â bn sin
n =1 l n =1 l

np x • np x
= a0 + Â an cos + Â bn sin
n =1 2 n =1 2
c + 2l
1
a0 =
2l Ú f ( x ) dx
c
2.5 Fourier Series of Functions of Any Period 2.47

4
1
4 Ú0
= f ( x ) dx

1È ˘
2 4
= Í Ú x dx + Ú (- x + 4) dx ˙
4 ÍÎ 0 2 ˙˚

È 2 4˘
1 Í x2 - x2
= + + 4x ˙
4Í 2 2 ˙
Î 0 2˚

1
= È(2 - 0) + {( -8 + 16) - ( -2 + 8)}˘˚

1
=
4
[2 + (8 - 6)]
=1
c + 2l
1 np x
an =
l Ú f ( x ) cos
l
dx
c
4
1 np x
2 Ú0
= f ( x ) cos dx
2

1È np x ˘
2 4
np x
= Í Ú x cos dx + Ú (4 - x ) cos dx ˙
2 ÍÎ 0 2 2
2 ˙˚

È Ê
2
Í Ê sin np x ˆ np x ˆ
Á cos
1Í Á ˜
2 - (1) - 2 ˜
= Í ( x) Á ˜ Á ˜
2
Í ÁË
np
˜ Á n p2 ˜
2

2 ¯ ÁË ˜
ÍÎ 4 ¯ 0


Ê np x ˆ Ê np x ˆ ˙
sin cos
Á 2 ˜ Á ˜ ˙
+ (4 - x ) Á - (-1) Á - 2 22 ˜
np ˜ ˙
Á ˜ Á n p ˜ ˙
Ë 2 ¯ Ë 4 ¯ 2˙
˚

1 È 2x
2
Ê np x ˆ 4 Ê np x ˆ
= Í sin Á + cos Á
2 Í np Ë 2 ˜¯ n2p 2 Ë 2 ˜¯
Î 0


2(4 - x ) Ê np x ˆ 4 Ê np x ˆ
+ sin Á - cos Á ˙
np Ë 2 ˜¯ n2p 2 Ë 2 ˜¯ 2˙
˚
2.48 Chapter 2 Fourier Series and Fourier Integral

1È 4 4 4 4 ˘
= cos( np ) - 2 2 - 2 2 cos(2 np ) + 2 2 cos( np )˙
2 ÍÎ n2p 2 n p n p n p ˚
1È 8 8 ˘
= Í 2 2
cos np - 2 2 ˙ [Q cos 2 np = 1]
2 În p n p ˚
4 È
= (-1)n - 1˘˚ [Q cos np = (-1)n ]
n2p 2 Î
c + 2l
1 np x
bn =
l Ú f ( x ) sin
l
dx
c
4
1 np x
=
20Ú f ( x ) sin
2
dx

1È np x ˘
2 4
np x
= Í Ú x sin dx + Ú (4 - x )sin dx ˙
2 ÍÎ 0 2 2
2 ˙˚
È Ê
2
Í Ê cos np x ˆ np x ˆ
Á sin
1Í Á
= Í ( x) Á -
˜
2 - (1) - 2 ˜
˜ Á 2 2 ˜
2 np Á n p ˜
Í ÁË ˜
¯ ÁË ˜
ÍÎ 2 4 ¯ 0


Ê np x ˆ Ê np x ˆ ˙
cos Á sin
Á
+ (4 - x ) Á -
˜
2 - (-1) - 2 ˜ ˙
˜ Á 2 2 ˜ ˙
Á
np
˜ Á n p ˜ ˙
Ë ¯ ÁË ˜
2 4 ¯ 2˙
˚

1 È -2 x
2
Í Ê np x ˆ 4 Ê np x ˆ
cos Á +
Ë 2 ˜¯ n2p 2
sin Á
Ë 2 ˜¯
=
2 Í np
Î 0


-2(4 - x ) Ê np x ˆ 4 Ê np x ˆ
+ cos Á - ˙
Ë 2 ˜¯ n2p 2
sin Á
np Ë 2 ˜¯ 2˙
˚
1È 4 4 ˘
= Í - cos np + cos np ˙
2 Î np np ˚
=0

4 {
È (-1)n - 1
• } ˘˙ cos np x
Hence, f(x) = 1 + Â Í n2
p 2 n =1 Í ˙ 2
Î ˚
2.5 Fourier Series of Functions of Any Period 2.49

8 È1 px 1 3p x 1 5p x ˘
= 1- cos + 2 cos + 2 cos + L˙
2 Í 2
p Î1 2 3 2 5 2 ˚

8 1 (2 n + 1)p x
= 1-
p2
 (2 n + 1) 2
cos
2
...(1)
n=0

Putting x = 2 in Eq. (1),


• È ˘
8 1
2 = 1- 2 Â Í (2n + 1)2 ˙ cos (2n + 1)p
p n=0 Î ˚

8 1
2 = 1+
p 2 Â (2n + 1)2
n=0


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


p2 1
8
= Â (2n + 1)2
n=0

1 1 1 p2
+ + +L =
12 32 52 8

example 26
Find the Fourier series of f ( x ) = p x 0 < x <1
=0 1< x < 2
Solution
The Fourier series of f (x) with period 2l = 2 is given by

np x • np x
f ( x ) = a0 + Â an cos + Â bn sin
n =1 l n =1 l
• •
= a0 + Â an cos np x + Â bn sin np x
n =1 n =1

1 2l
2l Ú0
a0 = f ( x ) dx

1 1
( 2
= Ú p x dx + Ú 0 ◊ dx
2 0 1
)
2.50 Chapter 2 Fourier Series and Fourier Integral

1
1 p x2
=
2 2
0
1Êpˆ
=
2 ÁË 2 ˜¯
p
=
4
1 2l np x
l Ú0
an = f ( x ) cos dx
l
1 2
= Ú p x cos np x dx + Ú 0 ◊ cos np x dx
0 1
1
Ê sin np x ˆ Ê cos np x ˆ
= pxÁ -p Á- 2 2 ˜
Ë np ˜¯ Ë n p ¯ 0

È Ê cos np ˆ Ê cos 0 ˆ ˘
= Íp Á 2 2 ˜ - p Á 2 2 ˜ ˙ [Q sin np = sin 0 = 0]
Î Ë n p ¯ Ë n p ¯˚
1 ÈÎQ cos np = (-1)n , cos 0 = 1˘˚
= 2 [(-1)n - 1]
n p
1 2l np x
bn = Ú f ( x )sin dx
l 0 l
1 2
= Ú p x sin np x dx + Ú 0 ◊ sin np x dx
0 1
1
Ê cos np x ˆ Ê sin np x ˆ
= pxÁ- ˜ -p Á- 2 2 ˜
Ë np ¯ Ë n p ¯ 0
p cos np
=- [Q sin np = sin 0 = 0]
np
(-1)n ÈÎQ cos np = (-1)n ˘˚
=-
n

p 1 • È (-1)n - 1 ˘ •
(-1)n
Hence, f ( x) = + Â n2 Í ˙ cos np x - Â n sin np x
4 p Í
n =1 Î ˚˙ n =1

p 1Ê 2 2 ˆ
= + - cos p x - 2 cos3p x - L˜
4 p ÁË 12 3 ¯
Ê 1 1 1 ˆ
- Á - sin p x + sin 2p x - sin 3p x + L˜
Ë 1 2 3 ¯
2.5 Fourier Series of Functions of Any Period 2.51

example 27
Find the Fourier series of the periodic function with a period 2 of
f ( x) = p 0 £ x £1
= p (2 - x ) 1£ x £ 2 [Summer 2013]
Solution
The Fourier series of f(x) with period 2l = 2 is given by

np x • np x
f ( x ) = a0 + Â an cos + Â bn sin
n =1 l n =1 l
• •
= a0 + Â an cos np x + Â bn sin np x
n =1 n =1

1 2l
2l Ú0
a0 = f ( x ) dx

= ÈÍ Ú p dx + Ú p (2 - x ) dx ˘˙
1 1 2

2 Î 0 1 ˚
È 2 ˘
x2 ˙
= Í| x |10 + 2 x -
p
2 ÍÎ 2 1 ˙˚
pÈ Ê 1ˆ ˘
= Í(1) + ÁË 4 - 2 - 2 + ˜¯ ˙
2Î 2 ˚
3p
=
4
1 2l
an = Ú f ( x ) cos np x dx
l 0
1 2
= Ú p cos np x dx + Ú p (2 - x ) cos np x dx
0 1
1 2
Ê sin np x ˆ Ê sin np x ˆ Ê cos np x ˆ
= pÁ + p (2 - x ) Á - (-p ) Á - 2 2 ˜
Ë np ˜¯ 0 Ë np ˜¯ Ë n p ¯ 1

Ê cos 2 np cos np ˆ
= Á- + 2 ˜ [Q sin np = sin 0 = 0]
Ë n2p n p ¯
1
= 2 ÈÎ(-1)n - 1˘˚ ÈÎQ cos np = (-1)n , cos 2 np = 1˘˚
n p
1 2l
bn = Ú f ( x ) sin np x dx
l 0
1 2
= Ú p sin np x dx + Ú p (2 - x )sin np x dx
0 1
2.52 Chapter 2 Fourier Series and Fourier Integral

1 2
Ê cos np x ˆ Ê cos np x ˆ Ê sin np x ˆ
= p Á- ˜ + p (2 - x ) Á - ˜ - (-p ) Á - 2 2 ˜
Ë np ¯ 0 Ë np ¯ Ë n p ¯ 1

È Ê cos np ˆ Ê cos 0 ˆ Ê cos np ˆ ˘


= Íp Á - ˜¯ + p ÁË ˜¯ + p ÁË - ˜˙ [Q sin np = sin 0 = 0]
Î Ë np np np ¯ ˚
Ê 2 cos np ˆ Ê cos 0 ˆ
= Á- ˜ +Á ˜
Ë n ¯ Ë n ¯
1 - 2(-1)n ÈÎQ cos np = (-1)n , cos 0 = 1˘˚
=
n
3p 1 • È ( -1)n - 1 ˘ • È
1 - 2( -1)n ˘
Hence, f ( x ) = + ÂÍ ˙ cos np x + Â Í ˙ sin np x
4 p n =1 ÎÍ n2 ˚˙ Í
n =1 Î n ˚˙
3p 2 Ê cos p x cos3p x cos 5p x ˆ
= - Á 2 + + + L˜
4 pË 1 32
5 2 ¯
Ê3 1 3 ˆ
+ Á sin p x - sin 2p x + sin 3p x - L˜
Ë1 2 3 ¯

example 28
Find the Fourier series of f ( x ) = p x 0 £ x <1
=0 x =1
= p ( x - 2) 1< x £ 2
p 1 1 1
Hence, deduce that = - + -K
4 1 3 5
Solution
The Fourier series of f (x) with period 2l = 2 is given by

np x • np x
f ( x ) = a0 + Â an cos + Â bn sin
n =1 l n =1 l
• •
= a0 + Â an cos np x + Â bn sin np x
n =1 n =1

1 2l
2l Ú0
a0 = f ( x ) dx

= ÈÍ Ú p x dx + Ú p ( x - 2) dx ˘˙
1 1 2

2Î 0 1 ˚
2.5 Fourier Series of Functions of Any Period 2.53

È 1 2˘
1 Í x2 x2
= p +p - 2x ˙
2Í 2 2 ˙
Î 0 1˚

=0
1 2l np x
an = Ú
l 0
f ( x ) cos
l
dx
1 2
= Ú p x cos np x dx + Ú p ( x - 2) cos np x dx
0 1

È Ê sin np x ˆ Ê cos np x ˆ
1
Ê sin np x ˆ Ê cos np x ˆ ˘˙
2
Í
= p xÁ ˜ - (1) ÁË - 2 2 ˜¯ + ( x - 2) ÁË np ˜¯ - (1) ÁË - 2 2 ˜¯
Í Ë np ¯ n p n p ˙
Î 0 1˚

È cos np cos 0 cos 2 np cos np ˘


= p Í 2 2 - 2 2 + 2 2 - 2 2 ˙ [Q sin np = sin 0 = 0]
În p n p n p n p ˚
= 0 [Q cos 0 = cos 2 np = 1]
1 2l np x
l Ú0
bn = f ( x )sin dx
l
1 2
= Ú p x sin np x dx + Ú p ( x - 2)sin np x dx
0 1

È Ê cos np x ˆ Ê sin np x ˆ
1
Ê cos np x ˆ Ê sin np x ˆ ˘
2
= p Í xÁ- - (1) - + ( x - 2) - - (1) - ˜ ˙
Í Ë np ˜¯ ÁË ˜
n2p 2 ¯ 0
ÁË np ˜¯ ÁË
n2p 2 ¯ 1 ˙
Î ˚
È cos np cos np ˘
= p Í- - [Q sin 2 np = sin np = sin 0 = 0]
Î np np ˙˚
2(-1)n ÈÎQ cos np = (-1)n ˘˚
=-
n
• È
( -1)n ˘
Hence, f ( x ) = 2Â Í - ˙ sin np x
n =1 Í
Î n ˙˚
Ê1 1 1 1 1 ˆ
= 2 Á sin p x - sin 2p x + sin 3p x - sin 4p x + sin 5p x - L˜ … (1)
Ë1 2 3 4 5 ¯
1
Putting x = in Eq. (1),
2
Ê 1ˆ Ê1 p 1 1 3p ˆ
f Á ˜ = 2 Á sin - sin p + sin - L˜
Ë 2¯ Ë1 2 2 3 2 ¯
p Ê1 1 1 ˆ
= 2 Á - + - K˜
2 Ë 1 3 5 ¯
p 1 1 1
= - + -K
4 1 3 5
2.54 Chapter 2 Fourier Series and Fourier Integral

example 29
Find the Fourier series of f ( x ) = x -1 < x < 0
=2 0 < x <1 [Winter 2012]
Solution
The Fourier series of f(x) with period 2l = 2 is given by

np x • np x
f ( x ) = a0 + Â an cos + Â bn sin
n =1 l n =1 l
• •
= a0 + Â an cos np x + Â bn sin np x
n =1 n =1

l
1
2l -Úl
a0 = f ( x ) dx

1Ê ˆ
0 1
= Á Ú x dx + Ú 2 dx ˜
2 Ë -1 0 ¯
È ˘0
1 x2
= Í + 2x 0 ˙
1
2 ÍÎ 2-1 ˙˚
1È 1 ˘
= Í- + 2 ˙
2Î 2 ˚
3
=
4
1 l np x
l Ú- l
an = f ( x ) cos dx
l
= ÈÍ Ú x cos np x dx + Ú 2 cos np x dx ˘˙
1 0 1

1 Î -1 0 ˚
0 1
Ê sin np x ˆ Ê cos np x ˆ sin np x
= xÁ - (1) Á - 2 2 ˜ +2
Ë np ˜¯ Ë n p ¯ np 0
-1

cos 0 cos np
= 2 2
- [Q sin np = sin 0 = 0]
n p n2p 2
1
= 2 2 ÈÎ1 - (-1)n ˘˚ ÈÎQ cos 0 = 1, cos np = (-1)n ˘˚
n p
2.5 Fourier Series of Functions of Any Period 2.55

1 l np x
bn =
l Ú - l
f ( x )sin
l
dx

1È 0 ˘
1
= Í Ú x sin np x dx + Ú 2 sin np x dx ˙
1 ÍÎ -1 0 ˙˚
0 1
Ê cos np x ˆ Ê sin np x ˆ cos np x
= xÁ- ˜¯ - (1) Á - 2 2 ˜ +2 -
Ë np Ë n p ¯ np 0
-1
cos np 2 cos np 2 cos 0
=- - + [Q sin np = sin 0 = 0]
np np np
1 È
Î -3( -1) + 2 ˘˚ ÈÎQ cos np = ( -1) , cos 0 = 1˘˚
n n
=
np
1 È
Î2 - 3( -1) ˘˚
n
=
np
3 1 È 1 - ( -1)n ˘

1 • È 2 - 3( -1)n ˘
Hence, f ( x) = +
4 p2
 ÍÍn2 ˙˚
˙ cos np x + Â Í n ˙˙ sin np x
p n =1 ÍÎ
n =1 Î ˚
3 1 Ê2 2 2 ˆ
= + 2 Á 2 cos p x + 2 cos 3p x + 2 cos 5p x + L˜
4 p 1Ë 3 5 ¯
1Ê5 1 5 1 ˆ
+ Á sin p x - sin 2p x + sin 3p x - sin 4p x + L˜
p Ë1 2 3 4 ¯
3 2 Ê1 1 1 ˆ
= + ÁË 2 cos p x + 2 cos 3p x + 2 cos 5nx + L˜¯
4 p2 1 3 5
5Ê 1 ˆ 1Ê1 1 ˆ
+ Á sin p x + sin 3p x + L˜¯ - ÁË sin 2p x + sin 4p x + L˜¯
pË 3 p 2 4

example 30
Find the Fourier series of f ( x ) = 4 - x 3< x< 4
= x-4 4< x<5
Solution
The Fourier series of f (x) with period 2l = 5 – 3 = 2 is given by

np x • np x
f ( x ) = a0 + Â an cos + Â bn sin
n =1 l n =1 l
• •
= a0 + Â an cos np x + Â bn sin np x
n =1 n =1
2.56 Chapter 2 Fourier Series and Fourier Integral

1 c + 2l
2l Úc
a0 = f ( x )dx

1 5
= Ú f ( x )dx
2 3
= ÈÍ Ú (4 - x )dx + Ú ( x - 4)dx ˘˙
1 4 5

2Î 3 4 ˚
È 4 5 ˘
1 x2 x2
= Í 4x - + - 4x ˙
2Í 2 2 ˙
Î 3 4˚

1 ÈÏÊ 16 ˆ Ê 9 ˆ ¸ ÏÊ 25 ˆ Ê 16 ˆ ¸˘
= ÍÌÁË 16 - ˜¯ - ÁË 12 - ˜¯ ˝ + ÌÁË - 20˜¯ - ÁË - 16˜¯ ˝˙
2 ÎÍÓ 2 2 ˛ Ó 2 2 ˛˚˙
1
=
2
1 c + 2l np x
an = Ú f ( x ) cos dx
l c l
4 5
= Ú (4 - x ) cos np x dx + Ú ( x - 4) cos np x dx
3 4
4 5
Ê sin np x ˆ Ê cos np x ˆ Ê sin np x ˆ Ê cos np x ˆ
= (4 - x ) Á - ( -1) Á - 2 2 ˜ + ( x - 4) Á - (1) Á - 2 2 ˜
Ë np ˜¯ Ë n p ¯3 Ë np ˜¯ Ë n p ¯ 4
1 1
=- (cos 4 np - cos3np ) + (cos 5np - cos 4 np ) [Q sin 3np = sin 5np = 0]
n2p 2 n2p 2
1
=- [( -1)4 n - ( -1)3n - ( -1)5n + ( -1)4 n ]
n2p 2
2
= 2 2 [( -1)n - 1]
n p
1 c + 2l np x
bn = Ú f ( x )sin dx
l c l
4 5
= Ú (4 - x )sin np x dx + Ú ( x - 4)sin np x dx
3 4
4
Ê cos np x ˆ Ê sin np x ˆ
= (4 - x ) Á - - ( -1) Á - 2 2 ˜
Ë np ˜¯ Ë n p ¯ 3
5
Ê cos np x ˆ Ê sin np x ˆ
+ ( x - 4) Á - ˜ - ( -1) Á - 2 2 ˜
Ë np ¯ Ë n p ¯ 4
1 1
= cos 3np - cos 5np [Q sin 4 np = sin 3np = sin 5np = 0]
np np
= 0 ÈÎQ cos 3np = cos 5np = ( -1)n ˘˚
2.5 Fourier Series of Functions of Any Period 2.57

1 2 • È (-1)n - 1 ˘
Hence, f ( x ) = +
2 p2
 ÍÎ n2 ˙˚ cos np x
n =1

1 2 Ê 2 2 2 ˆ
= + ÁË - 2 cos p x - 2 cos 3p x - 2 cos 5p x - L˜¯
2 p2 1 3 5
1 4 Ê1 1 1 ˆ
= - 2 Á 2 cos p x + 2 cos 3p x + 2 cos 5p x + L˜
2 p Ë1 3 5 ¯

example 31
Find the Fourier series of f ( x ) = 0 -5< x < 0
=3 0< x<5
Solution
The Fourier series of f (x) with period 2l = 10 is given by

np x • np x
f ( x ) = a0 + Â an cos + Â bn sin
n =1 l n =1 l

np x • np x
= a0 + Â an cos + Â bn sin
n =1 5 n =1 5
1 l
2l Ú - l
a0 = f ( x )dx

=
1 0
10 -5
(
Ú
5
0 dx + Ú 3dx
0
)
1 5
= 3x 0
10
1
= (15)
10
3
=
2
1 l np x
an = Ú f ( x ) cos dx
l -l l
1Ê 0 np x 5 np x ˆ
= Á Ú 0 ◊ cos dx + Ú 3cos dx ˜
5 Ë -5 5 0 5 ¯
5
3 5 np x
= sin
5 np 5 0
=0 [Q sin np = sin 0 = 0]
2.58 Chapter 2 Fourier Series and Fourier Integral

1 l np x
bn =
l Ú - l
f ( x )sin
l
dx

1Ê 0 np x 5 np x ˆ
= Á Ú 0 ◊ sin dx + Ú 3 sin dx ˜
5 Ë -5 5 0 5 ¯
5
3 5 Ê np x ˆ
= - cos
5 np ÁË 5 ˜¯ 0
3
= [ - cos np + cos 0]
np
3
= [1 - (-1)n ] ÈÎQ cos np = (-1)n ,cos 0 = 1˘˚
np
3 3 • È 1 - (-1)n ˘ np x
Hence, f ( x) = + ÂÍ ˙ sin
2 p Í
n =1 Î n ˚˙ 5
3 3Ê2 px 2 3p x ˆ
= + Á sin + sin + L˜
2 p Ë1 5 3 5 ¯

example 32
Find the Fourier series of f ( x ) = x -1 < x < 0
Solution = x+2 0 < x <1
The Fourier series of f (x) with period 2l = 2 is given by

np x • np x
f ( x ) = a0 + Â an cos + Â bn sin
n =1 l n =1 l
• •
= a0 + Â an cos np x + Â bn sin np x
n =1 n =1

1 l
a0 = Ú f ( x ) dx
2l - l
= ÈÍ Ú xdx + Ú ( x + 2)dx ˘˙
1 0 1

2Î -1 0 ˚
È 2 0 1˘
1 x x2
= Í + + 2x ˙
2Í 2 2 ˙
Î -1 0˚

1È 1 Ê1 ˆ˘
= Í - + Á + 2˜ ˙
2Î 2 Ë 2 ¯˚
=1
2.5 Fourier Series of Functions of Any Period 2.59

1 l np x
an =
l Ú - l
f ( x ) cos
l
dx

= ÈÍ Ú x cos np x dx + Ú ( x + 2) cos np x dx ˙˘
0 1

Î - 1 0 ˚
0 1
Ê sin np x ˆ Ê cos np x ˆ Ê sin np x ˆ Ê cos np x ˆ
= xÁ ˜ - (1) Á - 2 2 ˜ + ( x + 2) Á ˜ - (1) Á - 2 2 ˜
Ë np ¯ Ë n p ¯ -1
Ë np ¯ Ë n p ¯ 0

È Ï cos 0 cos( - np ) ¸ Ï cos np cos 0 ¸ ˘


= ÍÌ 2 2 - ˝+Ì - 2 2 ˝˙ [Q sin np = sin(- np ) = sin 0 = 0]
ÎÓ n p n2p 2 ˛ Ó n2p 2 n p ˛˚
=0 [Q cos(- np ) = cos np ]
1 l np x
bn =
l Ú - l
f ( x )sin
l
dx

= ÈÍ Ú x sin np x dx + Ú ( x + 2)sin np x dx ˘˙
0 1

Î - 1 0 ˚
0 1
Ê cos np x ˆ Ê sin np x ˆ Ê cos np x ˆ Ê sin np x ˆ
= xÁ- ˜ - (1) Á - 2 2 ˜ + ( x + 2) Á - ˜ - (1) Á - 2 2 ˜
Ë np ¯ Ë n p ¯ -1
Ë np ¯ Ë n p ¯ 0

È Ï cos( - np ) ¸ Ï Ê cos np ˆ Ê cos 0 ˆ ¸ ˘ ÈQ sin np = sin( - np )˘


= ÍÌ- ˝ + Ì3 ÁË - ˜¯ - 2 ÁË - ˜ ˝˙
ÍÎ Ó np ˛ Ó np np ¯ ˛ ˙˚ ÍÎ = sin 0 = 0 ˙˚
È -( -1)n 3( -1)n 2 ˘
=Í - + ˙ ÈÎQ cos( - np ) = cos np = ( -1)n , cos 0 = 1˘˚
ÍÎ np np np ˚˙
2
= [1 - 2( -1)n ]
np
2 • È 1 - 2(-1)n ˘
Hence, f ( x) = 1 + ÂÍ ˙ sin np x
p Í
n =1 Î n ˚˙
2 Ê3 1 3 ˆ
= 1+ ÁË sin p x - sin 2p x + sin 3p x - L˜¯
p 1 2 3

exercIse 2.1
Find the Fourier series of the following functions:
1. f (x) = ex 0 < x < 2p
È e 2p - 1 È 1 • cos nx - n sin nx ˘ ˘
Í Ans. : Í +Â ˙˙
Î p Î 2 n =1 n2 + 1 ˚˚
2.6 Fourier Series of Even and Odd Functions 2.63

l l
case I When f (x) is an even function, Ú-l f ( x) dx = 2 Ú0 f ( x) dx
1 l
l Ú0
a0 = f ( x ) dx

Since the product of two even functions is even,


2 l np x
an =
l Ú0
f ( x )cos
l
dx

Since the product of an even function and an odd function is odd,


bn = 0
Corollary The Fourier series of an even function f (x) in the interval (–p, p) is given
by

f ( x ) = a0 + Â an cos nx
n =1
1 p
where a0 = Ú f ( x ) dx
p 0
2 p
an = Ú f ( x ) cos nx dx
p 0

case II When f (x) is an odd function,


a0 = 0 and an = 0
2 l np x
bn =
l Ú0
f ( x )sin
l
dx

Corollary The Fourier series of an odd function f (x) in the interval (–p, p) is given
by

f ( x ) = Â bn sin nx
n =1

where a0 = 0 and an = 0
2 p
p Ú0
bn = f ( x )sin nx dx

Thus, the Fourier series of an even function consists entirely of cosine terms while the
Fourier series of an odd function consists entirely of sine terms.

example 1
Find the Fourier series of f(x) = x in –p < x < p. [Summer 2014]
2.64 Chapter 2 Fourier Series and Fourier Integral

Solution
f (- x ) = - x -p < - x < p
f (- x ) = - f ( x ) p > x > -p or -p < x < p
f(x) = x is an odd function.
Hence, a0 = 0 and an = 0
The Fourier series of an odd function with period 2p is given by

f ( x ) = Â bn sin nx
n =1

2 p
bn =
p Ú0 f ( x )sin nx dx

2 p
=
p Ú0 x sin nx dx
p
2 Ê cos nx ˆ Ê sin nx ˆ
= xÁ- ˜¯ - (1) Á - 2 ˜
p Ë n Ë n ¯ 0
2È cos np ˘
=
pÍÎ-p n ˙˚ [Q sin np = sin 0 = 0 ]
2
= - (-1)n ÈÎQ cos np = (-1)n ˘˚
n

2
Hence, f ( x ) = Â - (-1)n sin nx
n =1 n

Ê sin 2 x sin 3 x ˆ
x = 2 Á sin x - + - L˜
Ë 2 3 ¯

example 2
Find the Fourier series of f (x) = x2 in the interval (–p, p). Hence, deduce
p2 1 1 1
that = 2 - 2 + 2 -K [Summer 2016]
12 1 2 3
Solution
f (x) = x2 is an even function.
Hence, bn = 0
The Fourier series of an even function with period 2p is given by

f ( x ) = a0 + Â an cos nx
n =1
2.6 Fourier Series of Even and Odd Functions 2.65

1 p
a0 =
p Ú0 f ( x )dx

1 p
Ú0 x
2
= dx
p
p
1 x3
=
p 3
0

1 Êp 3ˆ
= Á ˜
pË 3¯
p2
=
3
2 p
an = Ú f ( x ) cos nx dx
p 0
2 p
= Ú x 2 cos nx dx
p 0
p
2 2 Ê sin nx ˆ Ê cos nx ˆ Ê sin nx ˆ
= x Á - 2x Á - 2 ˜ + 2 Á - 3 ˜
p Ë n ˜¯ Ë n ¯ Ë n ¯0
4
= cos np [Q sin np = sin 0 = 0]
n2
4 ÈÎQ cos np = (-1)n ˘˚
= (-1)n
n2

p2 (-1)n
Hence, f ( x) = + 4 Â 2 cos nx
3 n =1 n

p2 Ê 1 1 1 ˆ
x2 = + 4 Á - 2 cos x + 2 cos 2 x - 2 cos3 x + L˜ … (1)
3 Ë 1 2 3 ¯
Putting x = 0 in Eq. (1),
p2 Ê 1 1 1 ˆ
0= + 4 Á - 2 + 2 - 2 + K˜
3 Ë 1 2 3 ¯
p2 1 1 1
= 2 - 2 + 2 -K
12 1 2 3

example 3
Find the Fourier series of f (x) = x3 in the interval (–p, p).
Solution
f (x) = x3 is an odd function.
2.66 Chapter 2 Fourier Series and Fourier Integral

Hence, a0 = 0 and an = 0
The Fourier series of an odd function with period 2p is given by

f ( x ) = Â bn sin nx
n =1

2 p
bn =
p Ú0 f ( x )sin nx dx

2 p
Ú0 x
3
= sin nx dx
p
p
2 Ê cos nx ˆ Ê sin nx ˆ Ê cos nx ˆ Ê sin nx ˆ
= x3 Á - ˜ - 3x2 Á - 2 ˜ + 6 x Á 3 ˜ - 6 Á 4 ˜
p Ë n ¯ Ë n ¯ Ë n ¯ Ë n ¯0
2 Ê 3 cos np cos np ˆ
= -p + 6p [Q sin np = sin 0 = 0]
p ÁË n n3 ¯
˜

Ê p2 6 ˆ
= 2(-1)n Á - + 3˜ ÈÎQ cos np = (-1)n ˘˚
Ë n n ¯
• Ê p2 6 ˆ
Hence, f ( x ) = 2 Â (-1)n Á - + sin nx
n =1
Ë n n3 ˜¯
• •
(-1)n (-1)n
= -2p 2 Â sin nx + 6 Â 3 sin nx
n =1 n n =1 n

Ê 1 1 ˆ
x 3 = 2p 2 Á sin x - sin 2 x + sin 3 x - L˜
Ë 2 3 ¯
Ê 1 1 ˆ
- 6 Á sin x - 3 sin 2 x + 3 sin 3 x - L˜
Ë 2 3 ¯

example 4
p 2 x2
Find the Fourier series of f ( x ) = - in the interval ( –p, p ) and
12 4
p2 1 1 1
deduce that = 2 - 2 + 2 -K .
12 1 2 3
Solution
p 2 x2
f ( x) = - is an even function.
12 4
Hence, bn = 0
2.6 Fourier Series of Even and Odd Functions 2.67

The Fourier series of an even function with period 2p is given by



f ( x ) = a0 + Â an cos nx
n =1

1 p
a0 =
p Ú0 f ( x ) dx

pÊp x2 ˆ
2
1
=
p Ú0 ÁË 12 - 4 ˜¯
dx

p
1 p 2 x x3
= -
p 12 12
0

1 Êp p 3 3ˆ
= ÁË - ˜
p 12 12 ¯
=0
2 p
an =
p Ú0 f ( x ) cos nx dx

pÊp x2 ˆ
2
2
=
p Ú0 ÁË 12 - 4 ˜¯
cos nx dx

p
2 Ê p 2 x 2 ˆ Ê sin nx ˆ Ê x ˆ Ê cos nx ˆ Ê 1 ˆ Ê sin nx ˆ
= Á - - - - 2 ˜ +Á- ˜ Á- 3 ˜
p Ë 12 4 ˜¯ ÁË n ˜¯ ÁË 2 ˜¯ ÁË n ¯ Ë 2¯ Ë n ¯
0
2Ê p ˆ
= Á - 2 cos np ˜ [Q sin np = sin 0 = 0]
p Ë 2n ¯
-(-1)n ÈÎQ cos np = (-1)n ˘˚
=
n2

-(-1)n
Hence, f ( x ) = Â n2
cos nx
n =1

p 2 x2 1 1 1
- = 2 cos x - 2 cos 2 x + 2 cos3 x -K … (1)
12 4 1 2 3
Putting x = 0 in Eq. (1),

p2 1 1 1
= 2 - 2 + 2 -K
12 1 2 3

example 5
Find the Fourier series of f (x) = sin ax in the interval (–p, p).
2.68 Chapter 2 Fourier Series and Fourier Integral

Solution
f (–x) = sin a (–x) = – sin ax
f (–x) = –f (x)
f (x) = sin ax is an odd function.
Hence, a0 = 0 and an = 0
The Fourier series of an odd function with period 2p is given by

f ( x ) = Â bn sin nx
n =1
2 p
bn =
p Ú0 f ( x )sin nx dx

2 p
=
p Ú0 sin ax sin nx dx
1 p
=
p Ú0 [cos(n - a) x - cos(n + a) x]dx
p
1 sin(n - a ) x sin(n + a ) x
= -
p n-a n+a 0
1 È sin( n - a) p sin(n + a)p ˘
= - [Q sin 0 = 0]
p ÍÎ n - a n + a ˙˚
1 Ê sin np cos ap - sin ap cos np sin np cos ap + sin ap cos np ˆ
= Á - ˜¯
pË n-a n+a
1 È -(-1)n sin ap (-1)n sin ap ˘
= Í - ˙ ÈÎQ sin np = 0, cos np = (-1)n ˘˚
p ÍÎ n-a n+a ˙˚
-(-1)n sin ap Ê 1 1 ˆ
= ÁË + ˜
p n - a n + a¯
2 n(-1)n sin ap
=
p (a 2 - n2 )

2 sin ap (-1)n n
Hence, f ( x ) =
p
 a2 - n2 sin nx
n =1
2 sin ap È 1 2 3 ˘
sin ax = - Í 2 2 sin x - 2 2
sin 2 x + 2 2
sin 3 x - L˙
p Î a -1 a -2 a -3 ˚

example 6
Find the Fourier series of f (x) = x sin x in the interval (–p, p). Hence,
p -1 1 1 1
deduce that = - + -K
4 1◊ 3 3 ◊ 5 5 ◊ 7
2.6 Fourier Series of Even and Odd Functions 2.69

Solution
f (–x) = –x sin (–x)
= x sin x
= f (x)
f (x) = x sin x is an even function.
Hence, bn = 0
The Fourier series of an even function with period 2p is given by

f ( x ) = a0 + Â an cos nx
n =1

1 p
p Ú0
a0 = f ( x )dx

1 p
= Ú x sin x dx
p 0
1 p
= x(- cos x ) - (- sin x ) 0
p
1
=
p
[p (- cos p )] [Q sin p = sin 0 = 0]
= 1 [Q cos p = -1]
2 p
an =
p Ú0 f ( x ) cos nx dx

2 p
=
p Ú0 x sin x cos nx dx
1 p
=
p Ú0 x[sin(n + 1) x - sin(n - 1) x] dx
p
1 È cos( n + 1) x cos(n - 1) x ˘ È sin(n + 1) x sin(n - 1) x ˘
= x Í- + ˙ - Í- 2
+ ˙ ,n π 1
p Î n +1 n -1 ˚ Î (n + 1) (n - 1)2 ˚
0

1 È cos( n + 1)p cos(n - 1)p ˘


= Í-p +
+p
n - 1 ˙˚
,n π 1 [Q sin(n + 1)p = sin(n - 1)p = 0]
p Î n 1
(-1)n (-1)n ÈÎQ cos( n + 1)p = cos(n - 1)p = -(-1)n ˘˚
= -
n +1 n -1
-2(-1)n
=
n2 - 1
2(-1)n +1
= , n π1
n2 - 1
For n = 1,
2.70 Chapter 2 Fourier Series and Fourier Integral

2 p
a1 =
p Ú0 x sin x cos x dx
1 p
=
p Ú0 x sin 2 x dx
p
1 cos 2 x sin 2 x
= -x +
p 2 4 0
1Ê cos 2p ˆ
= Á -p ˜ [Q sin 2p = sin 0 = 0]
pË 2 ¯
1
=- [Q cos 2p = 1]
2
1 •
(-1)n +1
Hence, f ( x) = 1 - + 2Â 2 cos nx
2 n=2 n - 1

1 •
(-1)n +1
x sin x = + 2Â 2 cos nx
2 n=2 n - 1
1 Ê1 1 1 ˆ
= - 2 Á cos 2 x - cos3 x + cos 4 x - L˜ … (1)
2 Ë3 8 15 ¯
p
Putting x = in Eq. (1),
2
p p 1 Ê 1 1 3p 1 ˆ
sin = + 2 Á - cos p + cos - cos 2p + L˜
2 2 2 Ë 3 8 2 15 ¯
p 1 2 2
= - cos p - cos 2p - K
2 2 3 15
p -1 1 1
= - +K
4 1◊ 3 3 ◊ 5

example 7
Find the Fourier series of f (x) = cosh ax in the interval (–p, p).
Solution
f (–x) = cosh a(–x)
= cosh ax
= f (x)
f (x) = cosh ax is an even function.
Hence, bn = 0
The Fourier series of an even function with period 2p is given by

f ( x ) = a0 + Â an cos nx
n =1
2.6 Fourier Series of Even and Odd Functions 2.71

1 p
a0 =
p Ú0 f ( x ) dx

1 p
=
p Ú0 cosh ax dx
1 pÊ e ax + e - ax ˆ
=
p Ú0 ÁË 2 ˜ dx
¯
p
1 e ax e - ax
= +
2p a -a
0

=
1
2p a
(
e ap - e - ap )
sinh ap
=
pa
2 p
an =
p Ú0 f ( x ) cos nx dx

2 p
=
p Ú0 cosh ax cos nx dx
2 pÊ eax + e - ax ˆ
=
p Ú0 ÁË 2 ˜ cos nx dx
¯
1
cos nx + e - ax cos nx )dx
p
= Ú0 (e
ax
p
p
1 e ax e - ax
= ( a cos nx + n s i n nx ) + (- a cos nx + n sin nx )
p a 2 + n2 a 2 + n2 0
a cos np
= (e ap - e - ap ) [Q sin np = sin 0 = 0]
p (a 2 + n2 )
a cos np
= 2 sinh ap
p (a 2 + n2 )
(-1)n 2 a sinh ap
=
p (a 2 + n2 )

sinh ap 2 a (-1)n
Hence, f ( x ) = + sinh ap  2 2
cos nx
pa p n =1 a + n

example 8
Find the Fourier series of f(x) = e–|x| in the interval (–p, p).
2.72 Chapter 2 Fourier Series and Fourier Integral

Solution
f (x) = e–|x|
f (–x) = e –|–x|
= e–|x| = f (x)
–|x|
f (x) = e is an even function.
Hence, bn = 0
f (x) = e x –p < x < 0
= e– x 0<x<p
The Fourier series of an even function with period 2p is given by

f ( x ) = a0 + Â an cos nx
n =1
1 p
p Ú0
a0 = f ( x ) dx

1 p -x
p Ú0
= e dx

1 p
= -e- x
p 0

1
= (1 - e -p )
p
2 p
an =
p Ú0 f ( x ) cos nx dx

2 p -x
=
p Ú0 e cos nx dx
p
2 e- x
= (- cos nx + n sin nx )
p n2 + 1
0
2 Èe -p (- cos np ) + cos 0 ˘ [Q sin np = sin 0 = 0, cos 0 = 1]
=
p (n + 1) Î
2 ˚
2
= [1 - (-1)n e -p ]
p (n2 + 1)
1 2 • È 1 - (-1)n e -p ˘
Hence, f ( x ) = (1 - e -p ) + ÂÍ ˙ cos nx
Í n + 1 ˚˙
2
p p n =1 Î

example 9
Find the Fourier series of f (x) = |cos x| in the interval (–p, p).
Solution
f (x) = |cos x| is an even function.
2.6 Fourier Series of Even and Odd Functions 2.73

Hence, bn = 0
p
f (x) = cos x 0< x<
2
p
= –cos x < x<p
2
The Fourier series of an even function with period 2p is given by

f ( x ) = a0 + Â an cos nx
n =1

1 p
a0 =
p Ú0 f ( x ) dx

1 È p p ˘
= Í Ú 2 cos x dx + Ú p (- cos x )dx ˙
p ÍÎ 0 2 ˙˚

1 È p ˘
Í sin x 2 - sin x p ˙
p
=
p ÍÎ 0

˙

1 È p Ê p ˆ˘
= Ísin - ÁË sin p - sin ˜¯ ˙
p Î 2 2 ˚
2 È p ˘
= ÍÎQ sin 2 = 1, sin p = 0 ˙˚
p
2 p
an =
p Ú0 f ( x ) cos nx dx

2È 2 ˘
p
p
= Í Ú cos x cos nx dx + Ú p (- cos x ) cos nx dx ˙
p ÍÎ 0 2 ˙˚
È p
1 ˘
Í Ú 2 {cos( n + 1) x + cos(n - 1) x} dx - Ú p {cos(n + 1) x + cos( n - 1) x}dx ˙
p
=
-
ÍÎ
p 0
2 ˙˚
È p
p ˘
1 Í sin( n + 1) x sin(n - 1) x 2 sin(n + 1) x sin(n - 1) x ˙
= Í + - + , n π1
p n +1 n -1 0 n +1 n -1 p ˙
ÍÎ ˙

È ˘ È Ê np p ˆ np ˘
cos
np
cos
np
ÍQ sin ÁË + ˜ = cos ˙
2Í 2 - 2 ˙ Í 2 2¯ 2 ˙
= Í ˙, n π 1
p Î n +1 n -1 ˚ Í Ê np p ˆ np ˙
Í sin Á - ˜ = - cos ˙
ÍÎ Ë 2 2¯ 2 ˙˚
4 np
=- 2
cos , n π1
p (n - 1) 2
2.74 Chapter 2 Fourier Series and Fourier Integral

For n = 1,
2 È p p ˘
a1 = Í Ú 2 cos2 x dx + Ú p (- cos2 x )dx ˙
p ÍÎ 0 2 ˙˚

2 È p Ê 1 + cos 2 x ˆ p Ê 1 + cos 2 x ˆ ˘
= ÍÚ 2 Á ˜ dx - Ú p Á ˜¯ dx ˙
p ÍÎ 0 Ë 2 ¯ Ë 2 ˙˚
2

È p
p ˘
=
1 Í x + sin 2 x 2 - x + sin 2 x ˙
p Í 2 0 2 p˙
ÍÎ 2˙
˚
1 Èp Ê p ˆ˘
= Í - ÁË p - ˜¯ ˙ [Q sin p = sin 2p = 0]
p Î2 2 ˚
=0
2 4 • 1 np
Hence, f ( x) = - Â 2 cos cos nx
p p n=2 n - 1 2
2 4Ê 1 1 1 ˆ
| cos x | = - - cos 2 x + cos 4 x - cos 6 x + K˜
p p ÁË 3 15 35 ¯
2 4 Ê1 1 1 ˆ
= + Á cos 2 x - cos 4 x + cos 6 x - K˜
p p Ë3 15 35 ¯

example 10
Find the Fourier series of f (x) = |x| in the interval [–p, p].
p2 1 1 1
Hence, deduce that = 2 + 2 + 2 +K [Winter 2016]
8 1 3 5
Solution
f (x) = |x| –p < x < p
i.e., f ( x) = - x -p < x £ 0
=x 0£ x<p
f (x) = |x| is an even function.
Hence, bn = 0
The Fourier series of an even function with period 2p is given by

f ( x ) = a0 + Â an cos nx
n =1
2.6 Fourier Series of Even and Odd Functions 2.75

1 p
a0 =
p Ú0 f ( x )dx

1 p
=
p Ú0 x dx
p
1 x2
=
p 2
0

1 Êp ˆ 2
= Á ˜
pË 2 ¯
p
=
2
2 p
an = Ú f ( x ) cos nx dx
p 0
2 p
= Ú x cos nx dx
p 0
p
2 Ê sin nx ˆ cos nx
= xÁ +
p Ë n ˜¯ n2 0
2 Ê cos np cos 0 ˆ
= Á - 2 ˜ [Q sin np = sin 0 = 0]
p Ë n2 n ¯
2 ÈÎQ cos np = ( -1)n , cos 0 = 1˘˚
= [(-1)n - 1]
p n2

p 2 (-1)n - 1
Hence, f ( x) = +
2 p
 n2
cos nx
n =1

p 4Ê 1 1 1 ˆ
|x| = - cos x + 2 cos3 x + 2 cos 5 x + K˜
2 p ÁË 12 ¯ … (1)
3 5
Putting x = 0 in Eq. (1),
p 4Ê 1 1 1 ˆ
0= - + + + K˜
2 p ÁË 12 32 52 ¯
p2 1 1 1
= 2 + 2 + 2 +K
8 1 3 5

example 11
Find the Fourier series of f ( x ) = - k -p < x < 0
=k 0< x<p [Winter 2014]
2.76 Chapter 2 Fourier Series and Fourier Integral

Solution
f (- x ) = - k -p < - x < 0 or 0< x<p
=k 0 < - x < p or -p < x < 0
f (- x ) = - f ( x )

f(x) is an odd function.


Hence, a0 = 0 and an = 0
The Fourier series of an odd function with period 2p is given by

f ( x ) = Â bn sin nx
n =1

2 p
bn =
p Ú0 f ( x )sin nx dx

2 p
=
p Ú0 k sin nx dx
p
2 k cos nx
= -
p n 0

2k
= (- cos np + cos 0)
np
2k È
Î-(-1) + 1˘˚ ÈÎQ cos np = (-1)n ,cos 0 = 1˘˚
n
=
np
2k È
Î1 - (-1) ˘˚
n
=
np

2k • 1 È
Hence, f ( x) = Â Î1 - (-1)n ˘˚ sin nx
p n =1 n
4k Ê 1 1 ˆ
= ÁË sin x + sin 3 x + sin 5 x + L˜¯
p 3 5

example 12
Ïp + x -p < x < 0
Find the Fourier series of f ( x ) = Ì
Óp - x 0< x<p
[Summer 2015]
Solution
f (x) = p – x 0<x<p
f (–x) = p + x –p < x < 0
2.6 Fourier Series of Even and Odd Functions 2.77

f(–x) = f(x)
f (x) is an even function.
Hence, bn = 0
The Fourier series of an even function with period 2p is given by

f ( x ) = a0 + Â an cos nx
n =1

1 p
p Ú0
a0 = f ( x ) dx

1 p
p Ú0
= (p - x ) dx

p
1 x2
= px -
p 2
0

1 Ê 2 p2 ˆ
= p -
p ÁË ˜
2 ¯
1 Ê p2 ˆ
= Á ˜
pË 2 ¯
p
=
2
2 p
an =
p Ú0 f ( x ) cos nx dx

2 p
=
p Ú0 (p - x)cos nx dx
n
2 Ê sin nx ˆ Ê cos nx ˆ
= (p - x ) Á ˜¯ - ( -1) Á - 2 ˜
p Ë n Ë n ¯ 0
p
2 Ê sin nx ˆ cos nx
= (p - x ) Á -
p Ë n ˜¯ n2 0

2 È cos np cos 0 ˘
= Í- + 2 ˙ [Q sin np = sin 0 = 0]
p Î n2 n ˚
2 È 1 (-1)n ˘
= Í - 2 ˙ [Q cos np = (-1)n , cos0 = 1]
p Î n2 n ˚
2 È 1 - (-1)n ˘
= Í ˙
p Î n2 ˚
2.78 Chapter 2 Fourier Series and Fourier Integral

p 2 • È 1 - (-1)n ˘
Hence, f ( x) = +
2 p
 ÍÎ n2
˙ cos nx
˚
n =1

p 4Ê1 1 1 ˆ
= + cos x + 2 cos3 x + 2 cos 5 x + L˜
2 p ÁË 12 3 5 ¯

example 13
Find the Fourier series of the function f(x) given by
Ï 2x
ÔÔ1 + p
-p £ x£0
f ( x) = Ì
Ô1 - 2x
0£ x£p
ÔÓ p
2
Hence, deduce that 1 + 1 + 1 + L = p [Winter 2016]
12 32 52 8
Solution
2(- x )
f (- x ) = 1 + -p £ - x £ 0
p
2x
=1- 0£ x£p
p

2
f (- x ) = 1 -(- x ) 0 £ x £ p
p
2x
=1+ -p £ x £ 0
p
f (- x ) = f ( x )

f(x) is an even function.


Hence, bn = 0
The Fourier series of an even function with period 2p is given by

f ( x ) = a0 + Â an cos nx
n =1
2.6 Fourier Series of Even and Odd Functions 2.79

p
1
a0 =
p Ú f ( x ) dx
0
p
1 Ê 2x ˆ
=
p Ú ÁË1 - p ¯
˜ dx
0
p
1 2 x2
= x- ◊
p p 2 0
p
2
1 x
= x-
p p 0

=0

p
2
an =
p Ú f ( x ) cos nx dx
0

p
2 Ê 2x ˆ
p Ú0 Ë
= Á1 - ˜ cos nx dx
p ¯
p
2 Ê 2 x ˆ Ê sin nx ˆ Ê 2 ˆ Ê cos nx ˆ
= Á1 - ˜Á ˜ - Á- ˜ ÁË - 2 ˜¯
p Ë p ¯ Ë n ¯ Ë p¯ n 0
p
2 ÈÊ 2 x ˆ Ê sin nx ˆ 2 ˘
= ÍÁË 1 - ˜¯ ÁË ˜¯ - 2
cos nx ˙
p Î p n pn ˚0
2 È 2 2 ˘
= - cos np + ˙ [Q sinn p = sin 0 = 0]
p ÍÎ p n2 p n2 ˚
4
= 2 2 [1 - cos np ]
n p
4
= 2 2 [1 - (-1)n ] [Q cos np = (-1)]
n p

4 1
Hence, f ( x) = 0 + 2 Â [1 - (-1)n ] cos nx
p n =1 n2

4 • È 1 - (-1)n ˘
=
p2
 Í
Î n2 ˚
˙ cos nx
n =1

4◊2 Ê 1 1 1 ˆ
= Á cos x + 2 cos3 x + 2 cos5 x +L˜¯ ...(1)
p 2 Ë 12 3 5
2.80 Chapter 2 Fourier Series and Fourier Integral

At x = 0,
1
f (0) = È lim f ( x ) + lim+ f ( x )˘
2 ÍÎ x Æ 0- xÆ0 ˙˚
1 2
f (0) = [1 + 1] = = 1
2 2
Putting x = 0 in Eq. (1),
8 È1 1 1 ˘
f (0) = 2 Í 2
cos(0) + 2 cos(0) + 2 cos(0) + L˙
p Î1 3 5 ˚
8 È1 1 1 ˘
1 = 2 Í 2 + 2 + 2 + L˙
p Î1 3 5 ˚
1 1 1 p2
+ + +L=
12 32 52 8

example 14
Find the Fourier series of f ( x ) = cos x -p < x < 0
= - cos x 0< x<p
Solution
f (–x) = cos (–x) –p < –x < 0
= – cos (–x) 0 < –x < p
f (–x) = cos x 0<x<p
= – cos x –p < x < 0
f (–x) = – f (x)
f (x) is an odd function.
Hence, a0 = 0 and an = 0
The Fourier series of an odd function with period 2p is given by

f ( x ) = Â bn sin nx
n =1

2 p
bn =
p Ú0 f ( x )sin nx dx

2 p
=
p Ú0 (- cos x)sin nx dx
1 p
=-
p Ú0 [sin(n + 1) x + sin(n - 1) x]dx
p
1 cos( n + 1) x cos(n - 1) x
=- - - , n π1
p n +1 n -1 0
2.6 Fourier Series of Even and Odd Functions 2.81

1 È cos( n + 1)p cos(n - 1)p 1 1 ˘


= + - - , n π1
p ÍÎ n + 1 n -1 n + 1 n - 1 ˙˚
p 1 + cos np ˆ
1 Ê 1 + cos np
=- Á + , n π 1 [Q cos( np + p ) = cos(np - p ) = - cos np ]
p Ë n +1 n - 1 ˜¯
2n
=- (1 + cos np ), n π 1
p (n2 - 1)
2n
=- [1 + (-1)n ], n π 1 ÈÎQ cos np = (-1)n ˘˚
p (n2 - 1)
For n = 1,
2 p
b1 =
p Ú0 (- cos x)sin x dx
1 p
=-
p Ú0 sin 2 x dx
p
1 cos 2 x
=- -
p 2 0
1
= (cos 2p - cos 0)
2p
= 0 [Q cos 2p = cos 0 = 1]

2 n
Hence, f ( x) = -
p
 n2 - 1 [1 + (-1)n ]sin nx
n=2
2Ê2 4 6 ˆ
=- ÁË 2 sin 2 x + 2 sin 4 x + 2 sin 6 x + L˜¯
p 3 15 35
8 Ê1 2 3 ˆ
= - Á sin 2 x + sin 4 x + sin 6 x + L˜
p 3Ë 15 35 ¯

example 15
Obtain the Fourier series of periodic function f (x) = 2x, where
–1 < x< 1. [Winter 2016]
Solution
f(x) = 2x
f(–x) = – 2x = –f(x)
f(–x) = –f(x)
f(x) is an odd function.
Hence, a0 = 0 and an = 0
2.82 Chapter 2 Fourier Series and Fourier Integral

The Fourier series of an odd function f (x) with period 2l = 2 is given by



np x
f ( x) = Â bn sin l
n =1


= Â bn sin np x
n =1
l
2 np x
bn = Ú
l 0
f ( x ) sin
l
dx

l
= 2 Ú 2 x sin np x dx
0
1
Ê cos np x ˆ Ê sin np x ˆ
= 2 2x Á - ˜¯ - (2) Á - 2 2 ˜
Ë np Ë n p ¯ 0
1
2x 2
=2- cos np x + 2 2 sin np x
np n p 0

Ê 2 ˆ
= 2Á- cos np ˜ [Q sin np = sin 0 = 0]
Ë np ¯
4
=- (-1)n ÈÎQ cos np = (-1)n ˘˚
np
4
= (-1)n +1
np

4
Hence, f ( x) = Â (-1)n +1 sin np x
n =1 np

example 16
Find the Fourier series of f (x) = 1 – x2 in the interval (–1, 1).
Solution
f (–x) = 1 – (– x)2 = 1 – x2 = f (x)
2
f (x) = 1 – x is an even function.
Hence, bn = 0
The Fourier series of an even function with period 2l = 2 is given by

np x
f ( x ) = a0 + Â an cos
n =1 l

= a0 + Â an cos np x
n =1
2.6 Fourier Series of Even and Odd Functions 2.83

1 l
l Ú0
a0 = f ( x ) dx
1
= Ú (1 - x 2 ) dx
0
1
x3
= x-
3
0
1
= 1-
3
2
=
3
2 l np x
l Ú0
an = f ( x ) cos dx
l
l
= 2 Ú (1 - x 2 ) cos np x dx
0
1
Ê sin np x ˆ
2 Ê cos np x ˆ Ê sin np x ˆ
= 2 (1 - x ) Á - (-2 x ) Á - 2 2 ˜ + (-2) Á - 3 3 ˜
Ë np ˜¯ Ë n p ¯ Ë np ¯ 0

Ê cos np ˆ
= 2 Á -2 2 2 ˜ [Q sin np = sin 0 = 0]
Ë n p ¯
-4(-1)n ÈÎQ cos np = (-1)n ˘˚
=
n2p 2

2 4 (-1)n
Hence, f ( x) = -
3 p2
 n2
cos np x
n =1
2 4 Ê 1 1 1 ˆ
1 - x2 = - ÁË - 2 cos p x + 2 cos 2p x - 2 cos3p x + L˜¯
3 p2 1 2 3

example 17
Find the Fourier series of f (x) = x2 – 2 in –2 £ x £ 2. [Winter 2014]
Solution
f (x) = x2 – 2 is an even function.
Hence, bn = 0
The Fourier series of an even function with period 2l = 4 is given by

np x
f ( x ) = a0 + Â an cos
n =1 l

np x
= a0 + Â an cos
n =1 2
2.84 Chapter 2 Fourier Series and Fourier Integral

1 l
l Ú0
a0 = f ( x ) dx

1 2
= Ú ( x 2 - 2) dx
2 0
2
1 x3
= - 2x
2 3 0
1Ê8 ˆ
= - 4˜
2 ÁË 3 ¯
2
=-
3
2 l np x
an =
l Ú0
f ( x ) cos
l
dx

2 2 np x
= Ú ( x 2 - 2) cos dx
2 0 2
2
2 Ê 2 np x ˆ Ê 4 np x ˆ Ê 8 np x ˆ
= ( x - 2) Á sin ˜¯ - (2 x ) Á - 2 2 cos ˜ + (2) Á - 3 3 sin
Ë np 2 Ë n p 2 ¯ Ë np 2 ˜¯ 0

Ê 4 ˆ
= - (4) Á - 2 2 cos np ˜
Ë n p ¯
16
= cos np [Q sin np = sin 0 = 0]
n2p 2
16 ÈÎQ cos np = ( -1)n ˘˚
= ( -1)n
n2p 2

2 16 1 np x
Hence, f ( x) = - +
3 p2
 n2 (-1)n cos 2
n =1
2 16 Ê px 1 1 3p x ˆ
x 2 - 2 = - - 2 Á cos - cos p x + cos - L˜
3 p Ë 2 4 9 2 ¯

example 18
Find the Fourier series of f (x) = x|x| in the interval (–1, 1).
Solution
f (x) = x|x|
f (–x) = –x |–x|
= – x |x| = – f (x)
f (x) = x|x| is an odd function.
Hence, a0 = 0 and an = 0
2.6 Fourier Series of Even and Odd Functions 2.85

f (x) = –x2 –1 < x < 0


= x2 0<x<1
The Fourier series of an odd function with period 2 l = 2 is given by

np x
f ( x ) = Â bn sin
n =1 l

= Â bn sin np x
n =1

2 l np x
bn =
l Ú0
f ( x )sin
l
dx
1
= 2 Ú x 2 sin np x dx
0
1
Ê cos np x ˆ
2 Ê sin np x ˆ Ê cos np x ˆ
= 2 x Á- ˜ - 2x Á - 2 2 ˜ + 2 Á 3 3 ˜
Ë np ¯ Ë n p ¯ Ë np ¯ 0

È cos np 2 cos np 2 cos 0 ˘


= 2 Í- + 3 3 - 3 3 ˙ [Q sin np = sin 0 = 0]
Î np np np ˚
È (- 1) n
2(- 1) n
2 ˘
= 2 Í- + 3 3 - 3 3˙ ÈÎQ cos np = (-1)n , cos 0 = 1˘˚
ÍÎ np np n p ˙˚
• È
(- 1)n 2 (- 1)n 2 ˘
Hence, f (x) = 2 Â Í- + 3 3 - 3 3 ˙ sin np x
n =1 Í
Î np np n p ˙˚

example 19
Find the Fourier series of f(x) = x – x3 in –1 < x < 1. [Winter 2013]
Solution
f(–x) = –x + x3 –1 < x < 1
= –(x – x3)
= –f(x)
f(x) = x – x3 is an odd function.
Hence, a0 = 0 and an = 0
The Fourier series of an odd function with period 2l = 2 is given by

np x
f ( x ) = Â bn sin
n =1 l

= Â bn sin np x
n =1
2.86 Chapter 2 Fourier Series and Fourier Integral

2 l np x
l Ú0
bn = f ( x )sin dx
l
1
= 2 Ú ( x - x 3 )sin np x dx
0
1
Ê np x ˆ 2 Ê sin np x ˆ Ê cos np x ˆ Ê sin np x ˆ
= 2 ( x - x 3 ) Á - cos ˜ - (1 - 3 x ) Á - 2 2 ˜ + (-6 x ) Á 3 3 ˜ - (-6) Á 4 4 ˜
Ë np ¯ Ë n p ¯ Ë np ¯ Ë n p ¯ 0

È cos np ˘
= 2 Í-6 3 3 ˙ [Q sin np = sin 0 = 0]
Î np ˚
(-1)n ÈÎQ cos np = (-1)n ˘˚
= -12
n 3p 3

12 (-1)n
Hence, f ( x) = -
p3
 n3
sin np x
n =1
12 Ê sin 2p x sin 3p x ˆ
x - x3 = 3 Á
sin p x - + - L˜
p Ë 2 3
33 ¯

example 20
1 1
Find the Fourier series of f ( x ) = +x - <x<0
2 2
1 1
= -x 0< x<
2 2

Solution
1 1 1
f (- x ) = -x - < - x < 0 or 0< x<
2 2 2
1 1 1
= +x 0 < -x < or - < x < 0
2 2 2
f (− x) = f ( x)
f (x) is an even function.
Hence, bn = 0
The Fourier series of an even function with period 2l = 1 is given by

np x
f ( x ) = a0 + Â an cos
n =1 l

= a0 + Â an cos 2 np x
n =1
2.6 Fourier Series of Even and Odd Functions 2.87

1 l
l Ú0
a0 = f ( x )dx
1
1 Ê 1 ˆ
=
1 Ú 2
0 ÁË 2
- x ˜ dx
¯
2
1
x x2 2
=2 -
2 2
0

Ê 1 1ˆ
= 2Á - ˜
Ë 4 8¯
1
=
4
2 l np x
an = Ú f ( x ) cos dx
l 0 l
1
2 Ê 1 ˆ
=
1 Ú 2
0 ÁË 2
- x ˜ cos 2np x dx
¯
2
1
Ê1 ˆ Ê sin 2 np x ˆ Ê cos 2 np x ˆ 2
= 4 Á - x˜ Á - (-1) Á -
Ë2 ¯ Ë 2 np ˜¯ Ë 4 n2p 2 ˜¯ 0

ÈÊ cos np cos 0 ˆ ˘
= 4 ÍÁ - 2 2 + 2 2 ˜ ˙ [Q sin np = sin 0 = 0]
ÎË 4 n p 4n p ¯ ˚
1È1 - (-1)n ˘ ÈÎQ cos np = (-1)n , cos 0 = 1˘˚
=
n p2 Î
2 ˚

1 1 • È 1 - (-1)n ˘
Hence, f ( x) = +
4 p2
Â Í n2 ˙ cos 2np x
Í
n =1 Î ˚˙

exercIse 2.2
Find the Fourier series of the following functions:
x(p 2 - x 2 ) -p < x < p
1. f (x) = È •
(-1)n +1 ˘
12 Í Ans. : Â sin nx ˙
Î n =1 n ˚

2. f (x) = cos ax -p < x < p

È sin ap 2a sin ap •
(-1)n ˘
Í Ans. :
Î p
+
p
Â
n =1 a - n
2 2
cos nx ˙
˚
2.7 Half-Range Fourier Series 2.89

2.7 HAlF-rAnge FourIer serIes


Any arbitrary function f (x) with period 2l which is defined in half of the interval (0, l)
can also be represented in terms of sine and cosine functions. A half-range expansion
containing only cosine terms is known as a half-range cosine series. Similarly, a half-
range expansion containing only sine terms is known as a half-range sine series.
To represent any function f (x) in the half-range cosine series in the interval (0, l), we
extend the function by reflecting it in the vertical axis (i.e., y axis ) so that f (–x) = f (x).
The extended function is an even function in (–l, l ) and is periodic with period 2l. The
half-range cosine series of such a function is given by

np x
f ( x) = a0 + Â an cos
n =1 l
1 l
where a0 =
l Ú0 f ( x) dx
2 l np x
an =
l Ú0 f ( x)cos l
dx

Corollary If any function with period 2p is defined in the interval (0, p ) then the
half-range cosine series of such a function is given by

f ( x ) = a0 + Â an cos nx
n =1
1 p
where a0 =
p Ú0 f ( x ) dx

2 p
an =
p Ú0 f ( x ) cos nx dx

Similarly, to represent any function f (x) in the half-range sine series in the interval
(0, l), we extend the function by reflecting it in the origin so that f (–x) = –f (x). The
extended function is an odd function in (–l, l ) and is periodic with period 2l. The half-
range sine series of such a function is given by

np x
f ( x ) = Â bn sin
n =1 l
2 l np x
where bn =
l Ú0 f ( x)sin l
dx

Corollary If any function with period 2p is defined in the interval (0, p) then the
half-range sine series of such a function is given by

f ( x ) = Â bn sin nx
n =1

2 p
where bn =
p Ú0 f ( x )sin nx dx
2.90 Chapter 2 Fourier Series and Fourier Integral

example 1
Find the half-range cosine series of f (x) = x in the interval (0, p).
Solution
The half-range cosine series of f (x) with period 2p is given by

f ( x ) = a0 + Â an cos nx
n =1

1 p
a0 =
p Ú0 f ( x ) dx

1 p
=
p Ú0 x dx
p
1 x2
=
p 2
0

1 Ê p2 ˆ
= Á ˜
pË 2 ¯
p
=
2
2 p
an =
p Ú0 f ( x ) cos nx dx

2 p
=
p Ú0 x cos nx dx
p
2 Ê sin nx ˆ Ê cos nx ˆ
= xÁ ˜ - (1) Á - 2 ˜
p Ë n ¯ Ë n ¯ 0
2 È cos np cos 0 ˘
= Í 2 - 2 ˙ [Q sin np = sin 0 = 0]
p Î n n ˚
2
= 2
[(-1)n - 1] ÈÎQ cosn p = (-1)n , cos 0 = 1˘˚
pn
p 2È (-1)n - 1 ˘•
Hence, f ( x) = + 2 ÂÍ˙ cos nx
n =1 Í
2 pÎ n ˙˚
p 2Ê 2 2 ˆ
x = + Á - 2 cos x - 2 cos3 x - L˜
2 pË 1 3 ¯

example 2
Find the Fourier cosine series of f (x) = x2 0 < x < p [Summer 2015]
2.7 Half-Range Fourier Series 2.91

Solution
The Fourier cosine series of f(x) with period 2p is given by

f ( x ) = a0 + Â an cos nx
n =1

1 p
p Ú0
a0 = f ( x ) dx

1 p
= Ú x 2 dx
p 0
p
1 x3
a0 =
p 3 0

1 Êp 3ˆ
=
p ÁË 3 ˜¯
p2
=
3
2 p
an =
p Ú0 f ( x ) cos nx dx

2 p
Ú0 x
2
= cos nx dx
p
p
2 2 Ê sin nx ˆ Ê cos nx ˆ Ê sin nx ˆ
= x Á - 2x Á - 2 ˜ + 2 Á - 3 ˜
p Ë n ˜¯ Ë n ¯ Ë n ¯ 0
p
2 2 Ê sin nx ˆ Ê cos nx ˆ Ê 2 sin nx ˆ
= x Á ˜ + 2 x ËÁ 2 ¯˜ - ËÁ ˜
p Ë n ¯ n n3 ¯ 0

2 È cos np ˘
= Í2p ˙ [Q sin np = sin 0 = 0]
p Î n2 ˚
4 cos np
=
n2
4(-1)n
= [Q cos np = (-)n ]
n2

p2 (-1)n
Hence, f ( x) = + 4 Â 2 cos nx
3 n =1 n

p2 (-1)n
x2 = + 4 Â 2 cos nx
3 n =1 n
2.92 Chapter 2 Fourier Series and Fourier Integral

example 3
Find the half-range sine series of f (x) = x2 in the interval (0, p).
Solution
The half-range sine series of f (x) with period 2p is given by

f ( x ) = Â bn sin nx
n =1

2 p
p Ú0
bn = f ( x )sin nx dx

2 p
= Ú x 2 sin nx dx
p 0
p
2 2 Ê cos nx ˆ Ê sin nx ˆ Ê cos nx ˆ
= x Á- - (2 x ) Á - 2 ˜ + 2 Á 3 ˜
p Ë n ˜¯ Ë n ¯ Ë n ¯ 0

2 È 2 Ê cos np ˆ Ê cos np ˆ Ê cos 0 ˆ ˘


= Í -p ÁË ˜¯ + 2 Á ˜ - 2 Á 3 ˜ ˙ [Q sin np = sin 0 = 0]
pÎ n Ë n ¯3 Ë n ¯˚
2 È -p 2 ( -1)n 2( -1)n 2 ˘
= Í + 3
- 3 ˙ ÈÎQ cos np = ( -1)n , cos 0 = 1˘˚
p ÍÎ n n n ˙˚

2 • È -p 2 (-1)n 2(-1)n 2˘
Hence, f ( x ) = ÂÍ + 3
- ˙ sin nx
n3 ˙˚
p n =1 Í
Î n n

example 4
Find the half-range sine series of f ( x ) = x 3 in 0 £ x £ p.
[Summer 2017]

Solution
The half-range sine series of f(x) with period 2p is given by

f ( x) = Â bn sin nx
n =1

p
2
bn =
p Ú f ( x ) sin x dx
0
2.7 Half-Range Fourier Series 2.93

p
2
Úx
3
= sin nx dx
p 0
p
2 3 Ê cos nx ˆ 2 Ê sin nx ˆ Ê cos nx ˆ Ê sin nx ˆ
= x Á- ˜ - (3 x ) Á - 2 ˜ + (6 x ) Á 3 ˜ - (6) Á 4 ˜
p Ë x ¯ Ë n ¯ Ë n ¯ Ë n ¯ 0

p
2 Ê cos nx ˆ Ê sin nx ˆ Ê cos nx ˆ Ê sin nx ˆ
= - x3 Á ˜ + 3x2 Á 2 ˜ + 6 x Á 3 ˜ - 6 Á 4 ˜
p Ë n ¯ Ë n ¯ Ë n ¯ Ë n ¯ 0

2 È 3 (-1)n (-1)n ˘ ÈQ sin np = sin = 0 ˘


= Í-p + 6p 3 ˙ Í ˙
p Î n n ˚ Î cos np = (-1) ˚

2 È 6 p2 ˘
= ◊p Í 3 - ˙ (-1)
n
p În n ˚

2(-1)n
= (6 - n2p 2 )
n3

1
Hence, f ( x ) = 2 Â 3
(-1)n (6 - n2p 2 ) sin nx
n =1 n

example 5
Find the cosine series for f (x) = p – x in the interval 0 < x < p.
[Winter 2017]
Solution
The cosine series of f (x) with period 2p is given by

f ( x ) = a0 + Â an cos nx
n =1

1 p
a0 =
p Ú0 f ( x ) dx

1 p
=
p Ú0 (p - x) dx
p
1 x2
= px-
p 2
0

1Ê 2 p ˆ 2
= p -
p ÁË 2 ˜¯
2.94 Chapter 2 Fourier Series and Fourier Integral

p
=
2
2 p
an =
p Ú0 f ( x ) cos nx dx

2 p
=
p Ú0 (p - x) cos nx dx
p
2 Ê sin nx ˆ Ê cos nx ˆ
= (p - x ) Á - (-1) Á - 2 ˜
p Ë n ˜¯ Ë n ¯ 0

È cos np 1 ˘ ÈQ sin np = sin 0 = 0 ˘


2
= Í- + 2˙ Í ˙
Î p n2 n ˚ Î cos 0 = 1 ˚
2 È 1 - (-1)n ˘ È
= Í ˙ ÎQ cos np = (-1) ˘˚
n
p ÍÎ n2 ˙˚

p 2 • È 1 - (-1)n ˘
Hence, f ( x ) = + Â Í n2 ˙ cos nx
2 p n =1 Í
Î ˙˚

example 6
Find the half-range cosine series of f(x) = x(p – x) in the interval (0, p)
and, hence, deduce that
p2 1 1 1 p2 1 1 1
(i) = 2 + 2 + 2 +K (ii) = 2 - 2 + 2 -K
6 1 2 3 12 1 2 3
Solution
The half-range cosine series of f (x) with period 2p is given by

f ( x ) = a0 + Â an cos nx
n =1

1 p
a0 =
p Ú0 f ( x ) dx

1 p
=
p Ú0 x(p - x) dx
p
1 x2 x3
= p -
p 2 3
0
2.7 Half-Range Fourier Series 2.95

1 Ê p2 p3 ˆ
= Áp - ˜
pË 2 3¯
p2
=
6
2 p
an =
p Ú0 f ( x ) cos nx dx

2 p
Ú0 (p x - x
2
= ) cos nx dx
p
p
2 Ê sin nx ˆ Ê cos nx ˆ Ê sin nx ˆ
= (p x - x 2 ) Á - (p - 2 x ) Á - 2 ˜ + (-2) Á - 3 ˜
p Ë n ˜¯ Ë n ¯ Ë n ¯ 0

È2 cos np p cos 0 ˘
= Í(p - 2p ) - ˙ [Q sin np = sin 0 = 0]
Îp n2 n2 ˚
2 ÈÎQ cos np = (-1)n , cos 0 = 1˘˚
= - 2 [1 + (-1)n ]
n

• È
p2 1 + (-1)n ˘
Hence, f ( x) = - 2Â Í 2 ˙ cos nx
6 n =1 Í
Î n ˙˚
p2 Ê 2 2 2 ˆ
x(p - x ) = - 2 Á 2 cos 2 x + 2 cos 4 x + 2 cos6 x + L˜ … (1)
6 Ë2 4 6 ¯

Putting x = 0 in Eq. (1),

p2 Ê 1 1 1 ˆ
0= - 4 Á 2 + 2 + 2 + K˜
6 Ë 2 4 6 ¯
p2 1 1 1
= 2 + 2 + 2 +K
6 1 2 3
p
Putting x = in Eq. (1),
2

pÊ p ˆ p2 Ê 2 2 2 ˆ
Á p - ˜ = - 2 Á 2 cos p + 2 cos 2p + 2 cos 3p + L˜
2Ë 2¯ 6 Ë2 4 6 ¯
p2 p2 Ê 1 1 1 ˆ
= - 4 Á - 2 + 2 - 2 + K˜
4 6 Ë 2 4 6 ¯
p2 1 1 1
= 2 - 2 + 2 -K
12 1 2 3
2.96 Chapter 2 Fourier Series and Fourier Integral

example 7
Find the Fourier sine series of f (x) = ex in 0 < x < p. [Summer 2015]
Solution
The half-range sine series of f (x) with period 2p is given by

f ( x ) = Â bn sin nx
n =1

2 p
p Ú0
bn = f ( x )sin nx dx

2 p
= Ú0 e
x
sin nx dx
p
p
2 ex
= (sin nx - n cos nx )
p 1 + n2
0

2 È ep e0 ˘
= Í (- n cos np ) - (- n cos0)˙ [Q sin np = sin 0 = 0]
p Î1 + n 2
1+ n 2
˚

2 È ep 1 ˘
= Í (-1)n (- n) + n ◊ ˙ [Q cos np = (-1)n , cos0 = 1]
p Î1 + n 2
1 + n2 ˚
2 n
= ◊ [ep (-1)n +1 + 1]
p (1 + n2 )

2 n
Hence, f ( x ) =
p
 (1 + n2 ) [ep (-1)n+1 + 1] sin nx
n =1

2 n
ex =
p
 1 + n2 [ep (-1)n+1 + 1] sin nx
n =1

example 8
Find the Fourier cosine series of f(x) = e–x, where 0 £ x £ p.
[Winter 2015]
Solution
The Fourier cosine series of f(x) with period 2p is given by

f(x) = a0 + Â an cos nx
n =1
2.7 Half-Range Fourier Series 2.97

p
1
p Ú0
a0 = f ( x ) dx

p
1 -x
p Ú0
= e dx

p
1 e- x
=
p -1
0

1 È -p
= - e - e -0 ˘˚

1 È -p ˘
= - e - 1˚

1
= (1 - e -p )
p
p
2
an =
p Ú f ( x) cos nx dx
0
p
2 -x
p Ú0
= e cos nx dx

p
2 e- x
=
p 1 + n2
{(-1) cos nx + n sin x}
0
p
2 e- x
= ( - cos nx + n sin nx )
p 1 + n2
0

2 È e -p e0 ˘
= Í ( - cos np ) - ( -1) ˙ [Q sin np = sin 0 = 0]
p ÍÎ 1 + n2 1 + n2 ˙˚

2 È -e -p ( -1)n 1 ˘
= Í + ˙ [Q cos np = (-1)n ]
ÍÎ 1 + n 1 + n2 ˙˚
p 2

2 1 È
= ◊ 1 - ( -1)n e -p ˘˚
p 1 + n2 Î

1 2 • [1 - ( -1)n ep ]
Hence, f(x) = (1 - e -p ) + Â cos nx
p p n =1 1 + n2
2.98 Chapter 2 Fourier Series and Fourier Integral

example 9
Find the half-range cosine series of f (x) = sin x in the interval (0, p) and
p 1 1 1
hence, deduce that = 1 - + - +K .
4 3 5 7
[Winter 2014; Summer 2018]
Solution
The half-range cosine series of f (x) with period 2p is given by

f ( x ) = a0 + Â an cos nx
n =1
1 p
p Ú0
a0 = f ( x ) dx

1 p
p Ú0
= sin x dx

1 p
= - cos x 0
p
1
= (- cos p + cos 0)
p
2
= [Q cos p = - 1, cos 0 = 1]
p
2 p
an =
p Ú0 f ( x ) cos nx dx

2 p
=
p Ú0 sin x cos nx dx
1 p
=
p Ú0 [sin(n + 1) x - sin(n - 1) x] dx
p
1 cos(n + 1) x cos(n - 1) x
= - + , n π1
p n +1 n -1 0
È cos(n + 1)p cos( n - 1)p cos 0 cos 0 ˘
1
= Í- + + - , n π1
Îp n +1 n -1 n + 1 n - 1 ˙˚
2
=- 2
[1 + (-1)n ], n π 1
p (n - 1)
ÈÎQ cos( np + p ) = cos(np - p ) = - cos np = -(-1)n , cos 0 = 1˘˚
2.7 Half-Range Fourier Series 2.99

For n = 1,
2 p
a1 =
p Ú0 sin x cos x dx
1 p
=
p Ú0 sin 2 x dx
p
1 cos 2 x
= -
p 2 0
1
= (- cos 2p + cos 0)
2p
= 0 [Q cos 2p = cos 0 = 1]

2 2 È 1 + (-1)n ˘

Hence, f ( x) = - ÂÍ
2 ˙ cos nx
Î n - 1 ˙˚
n=2 Í
p p
2 2Ê2 2 ˆ
sin x = - Á cos 2 x + cos 4 x + L˜ … (1)
p p 3 Ë 15 ¯
p
Putting x = in Eq. (1),
2
p 2 2Ê2 2 ˆ
sin = - Á cos p + cos 2p + L˜
2 p p 3 Ë 15 ¯
2 2Ê 2 2 ˆ
1 = - Á - + - K˜
p p Ë 3 15 ¯
2 2 ÈÊ 1 ˆ Ê 1 1 ˆ ˘
1= + Í 1- - - + K˙
p p ÎÁË 3 ˜¯ ÁË 3 5 ˜¯ ˚
2Ê 2 2 ˆ
1 = Á 2 - + - K˜
pË 3 5 ¯
p 1 1
= 1- + -K
4 3 5

example 10
For the function f(x) = cos 2x, find the Fourier sine series over (0, p).
[Winter 2015]
Solution
The Fourier sine series of f(x) with period 2p is given by

f(x) = Â bn sin nx
n=1
2.100 Chapter 2 Fourier Series and Fourier Integral

p
2
bn =
p Ú f ( x) sin nx dx
0
p
2
p Ú0
= cos 2 x sin nx dx

p
1
p Ú0
= 2 cos 2 x sin nx dx

p
1
=
p Ú [sin(2 + n) x - sin(2 - n) x ] dx
0

p
1 Ê cos(n + 2) x ˆ Ê cos(2 - n) x ˆ
=
p ÁË - n + 2 ˜¯ ÁË
- -
2 - n ˜¯
0

1 È cos(2p + np ) cos(2p - np ) 1 1 ˘
= Í- - + + ˙
p Î n+2 n-2 n+2 n-2˚

1 È cos np cos np 1 1 ˘
= Í - - + +
p Î n+2 n - 2 n + 2 n - 2 ˙˚

1 È n +1 Ï 1 1 ¸ Ï 1 1 ¸˘
= Í(-1) Ì + ˝+Ì + ˝˙
p ÍÎ Ó n + 2 n - 2 ˛ Ó n + 2 n - 2 ˛˙˚
[Q cos np = (-1)n )]

1 È ( -1)n +1 + 1{(n - 2 + n + 2)} ˘


= Í ˙
p ÍÎ ( n + 2) ( n - 2) ˙˚

2 n ÈÎ( -1)n + 1 + 1˘˚


= , if n π 2
n2 - 4
p
1
p Ú0
b2 = 2 cos 2 x sin 2 x dx

p
1
p Ú0
= sin 4 x dx

p
1 cos 4 x
=
p 4 0
2.7 Half-Range Fourier Series 2.101

1
= (-1 + 1)
4p
=0

Hence,

f(x) = 2 Â Í
{ } ˘˙ sin nx
È n (-1)n + 1 + 1

n =1
Í n2 - 4 ˙
nπ2Î ˚

example 11
Find the half-range cosine series of f (x), where
p
f ( x) = x 0< x<
2
p
=p -x < x<p
2
Solution
The half-range cosine series of f (x) with period 2p is given by

f ( x ) = a0 + Â an cos nx
n =1

1 p
a0 = Ú f ( x ) dx
p 0
1È ˘
p
p
= Í Ú 2 x dx + Ú p (p - x )dx ˙
p ÍÎ 0
2 ˙˚
È p
p ˘
1 Í x2 2 x2 ˙
= Í + px -
pÍ 2 2 p ˙˙
0
Î 2˚

1 Èp 2 Ê 2 p 2 ˆ Ê p 2 p 2 ˆ ˘
= Í + Áp - ˜ -Á - ˜˙
pÎ 8 Ë 2 ¯ Ë 2 8 ¯˚
p
=
4
2 p
an = Ú f ( x ) cos nx dx
p 0
2.102 Chapter 2 Fourier Series and Fourier Integral

È p
2 p ˘
= Í Ú 2 x cos nx dx + Ú p (p - x ) cos nx dx ˙
ÍÎ 0
p 2 ˙˚
È p
p ˘
2 Í Ê sin nx ˆ Ê cos nx ˆ 2 Ê sin nx ˆ Ê cos nx ˆ ˙
= Í xÁ ˜ - (1) Á - 2 ˜ + (p - x ) Á ˜ - (-1) Á - 2 ˜ ˙
p Ë n ¯ Ë n ¯ 0 Ë n ¯ Ë n ¯
Í
p
˙
Î 2˚

ÈÊ np np ˆ Ê np np ˆ ˘
2 ÍÁ p sin 2 cos
2 - cos 0 ˜ Á cos n p p
sin
2 +
cos
2 ˜ ˙˙
= ÍÁ ◊ + ˜ +Á- - ˜
p ÍÎË 2 n n 2
n ¯ Ë
2
n 2 2 n n ¯ ˙˚
2

[Q sin np = sin 0 = 0]
2 È np ˘ ÈÎQ cos 0 = 1, cos np = (-1)n ˘˚
= 2 Í
2 cos - 1 - (-1)n ˙
pn Î 2 ˚

p 2 1 È np ˘
Hence, f ( x) = +
4 p
 n2 ÍÎ2 cos 2
- 1 - (-1)n ˙ cos nx
˚
n =1

p 2È1 1 1 ˘
= + (-4) cos 2 x + 2 (-4) cos 6 x + 2 (-4) cos 10 x + K˙
4 p ÍÎ 22 6 10 ˚
p 2Ê 1 1 1 ˆ
= - Á 2 cos 2 x + 2 cos 6 x + 2 cos 10 x + K˜
4 p Ë1 3 5 ¯

example 12
Find the half-range sine series of f (x), where
p p
f ( x) = 0£ x<
3 3
p 2p
=0 £x<
3 3
p 2p
=- £ x£p
3 3
Solution
The half-range sine series of f (x) with period 2p is given by

f ( x ) = Â bn sin nx
n =1
2.7 Half-Range Fourier Series 2.103

2 p
p Ú0
bn = f ( x )sin nx dx

2È p ˘
2p
p Ê pˆ
p
= Í Ú 3 sin nx dx + Ú p3 0 ◊ sin nx dx + Ú 2p Á - ˜ sin nx dx ˙
pÍ 0 3 Ë 3¯ ˙˚
Î 3 3

È p
p ˘
2 Í cos nx 3 - cos nx ˙
= Í- -
3 n 0 n 2p ˙
ÍÎ 3 ˙
˚
2 È np 2 np ˘
= - cos + cos 0 + cos np - cos
3n ÍÎ 3 3 ˙˚
ÈQ cos 0 = 1, cos np = ( -1)n ˘
2 È n np np ˘ Í ˙
= 1 + ( -1) - 2 cos cos ˙
3n ÍÎ 2 6 ˚ Ícos A + cos B = 2 cos A + B cos A - B ˙
ÍÎ 2 2 ˙˚
2 • 1È np np ˘
Hence, f ( x) = Â Í
3 n =1 n Î
1 + (-1)n - 2 cos
2
cos ˙ sin nx
6 ˚

example 13
Find the half-range sine series of f (x) = lx – x2 in the interval (0, l ) and,
hence, deduce that
p3 1 1
= 1 - 3 + 3 -º
32 3 5
Solution
The half-range sine series of f (x) with period 2l is given by

np x
f ( x ) = Â bn sin
n =1 l
2 l np x
bn =
l Ú0
f ( x )sin
l
dx

2 l np x
= Ú (lx - x 2 )sin dx
l 0 l
l
2 l È np x ˘ l2 È np x ˘ È l3 np x ˘
= (lx - x 2 ) ÍÎ - co s - (l - 2 x ) - sin + Í( -2 ) cos ˙
l np l ˙˚ n2p 2 ÍÎ ˙
l ˚ Î 3 3
np l ˚
0

2 È 2l 3 ˘
= Í- 3 3 (cos np - cos 0)˙ [Q sin np = sin 0 = 0]
l ÍÎ n p ˙˚
4l 2
= 3 3
[1 - (-1)n ] [Q cos np = (-1)n ]
np
2.104 Chapter 2 Fourier Series and Fourier Integral

È 1 - (-1)n ˘
4l 2 •
np x
3 ÂÍ
Hence, f ( x) = 3 ˙ sin
p n =1 ÍÎ n ˙˚ l
8l È 1 px 1 3p x 1 5p x ˘
lx - x 2 = 3 Í 3 sin + 3 sin + 3 sin + L˙ … (1)
p Î1 l 3 l 5 l ˚
l
Putting x = in Eq. (1),
2

l 2 l 2 8l 2 Ê 1 p 1 3p 1 5p ˆ
- = 3 Á 3 sin + 3 sin + 3 sin + L˜
2 4 p Ë1 2 3 2 5 2 ¯
l 2 8l 2 Ê 1 1 1 ˆ
= 3 Á 3 - 3 + 3 - K˜
4 p Ë1 3 5 ¯
p3 1 1
= 1 - 3 + 3 -K
32 3 5

example 14
Find the Fourier cosine series of f(x) = x in 0 < x < l. [Winter 2013]
Solution
The half-range cosine series of f(x) with period 2l is given by

np x
f ( x ) = a0 + Â an cos
n =1 l
1 l
l Ú0
a0 = f ( x ) dx

1 l
= Ú x dx
l 0
l
1 x2
=
l 2 0

1Ê l ˆ 2
= Á ˜
lË 2¯
l
=
2
2 l np x
an = Ú f ( x ) cos dx
l 0 l
2 l np x
= Ú x cos dx
l 0 l
2.7 Half-Range Fourier Series 2.105

l
2 Ê l np x ˆ Ê l2 np x ˆ
= xÁ sin ˜ - (1) Á - 2 2 cos
l Ë np l ¯ Ë n p l ˜¯ 0

2 Ê l2 l2 ˆ
= Á 2 2 cos np - 2 2 cos 0˜ [Q sin np = sin 0 = 0]
l Ën p n p ¯
2l
= 2 2 [( -1)n - 1] ÈÎQ cos np = ( -1)n , cos 0 = 1˘˚
n p
l 2l È ( -1)n - 1 ˘

np x
Hence, f ( x) = +
2 p2
 ÍÍ
n 2 ˙ cos
˙˚ l
n =1 Î

l 4l È 1 Ê pxˆ 1 Ê 3p x ˆ 1 Ê 5p x ˆ ˘
x = - 2 Í 2 cos Á ˜ + 2 cos Á ˜¯ + 2 cos ÁË ˜¯ + L˙
2 p Î1 Ë l ¯ 3 Ë l 5 l ˚

example 15
Find the Fourier cosine series of f(x) = x2 in 0 < x < l. [Summer 2013]
Solution
The half-range cosine series of f(x) with period 2l is given by

np x
f ( x ) = a0 + Â an cos
n =1 l
1 l
l Ú0
a0 = f ( x ) dx

1 l
= Ú x 2 dx
l 0
l
1 x3
=
l 3 0

1Ê l 3ˆ
= Á ˜
lË 3¯
1
= l2
3
2 l np x
an = Ú f ( x ) cos dx
l 0 l
2 l np x
= Ú x 2 cos dx
l 0 l
l
2 Ê l np x ˆ Ê l2 np x ˆ Ê l3 np x ˆ
= x2 Á sin ˜ - (2 x ) Á - 2 2 cos ˜ + 2 Á 3 3 sin
l Ë np l ¯ Ë n p l ¯ Ën p l ˜¯ 0
2.106 Chapter 2 Fourier Series and Fourier Integral

2 È 2l 3 ˘
= Í 2 2 cos np ˙ [Q sin np = sin 0 = 0]
l În p ˚
4l 2 ÈÎQ cos np = (-1)n ˘˚
= (-1)n
n2p 2

1 2 4l 2 (-1)n np x
Hence, f ( x) =
3
l + 2
p
 n2
cos
l
n =1

1 2 4l 2
È1 Ê pxˆ 1 Ê 2p x ˆ 1 Ê 3p x ˆ ˘
x2 = l - 2 Í 2 cos ÁË ˜¯ - 2 cos ÁË ˜¯ + 2 cos ÁË ˜¯ - L˙
3 p Î1 l 2 l 3 l ˚

example 16
Obtain the Fourier cosine series of the function f(x) = ex in the range
(0, l). [Winter 2014]
Solution
The half-range cosine series of f(x) with period 2l is given by

np x
f ( x ) = a0 + Â an cos
n =1 l
1 l
l Ú0
a0 = f ( x ) dx

1 l
= Ú e x dx
l 0
1 l
= ex 0
l
1 l
= (e - 1)
l
2 l np x
an =
l Ú0
f ( x ) cos
l
dx

2 l np x
= Ú e x cos dx
l 0 l
l
2 Ï Ê np x ˆ np
ex Ê np x ˆ ¸
= 2 2 Ì ˜¯ + Ë l ˜¯ ˝˛
cos Á sin Á
l n p Ó Ë l l
1+ 2
l 0
2l
= 2 (el cos np - e0 cos 0) [Q sin np = sin 0 = 0]
l +n p
2 2
2.7 Half-Range Fourier Series 2.107

2l
= [el ( -1)n - 1] [Q cos np = ( -1)n , cos 0 = 1]
l 2 + n2p 2

1 2l Èel (-1)n - 1˘˚ cos np x
Hence, f ( x ) = (el - 1) + Â 2 2 2 Î
l n =1 l + n p l

example 17
Find the half-range cosine series of f (x), where
l
f ( x ) = kx 0£ x£
2
l
= k (l - x ) £ x£l
2
p2 1 1 1
Hence, deduce that = 2 + 2 + 2 +K. [Summer 2016]
8 1 3 5

Solution
The half-range cosine series of f (x) with period 2l is given by

np x
f ( x ) = a0 + Â an cos
n =1 l

1 l
l Ú0
a0 = f ( x ) dx

1È ˘
l
l
= Í Ú 2 kx dx + Ú l k (l - x ) dx ˙
l ÍÎ 0
2 ˙˚
È l
l ˘
1 Í x2 2 x2 ˙
= Ík + k lx -
lÍ 2 2 l ˙˙
0
Î 2˚

k È l2 Ê l2 ˆ Ê l2 l2 ˆ ˘
= Í + Á l2 - ˜ - Á - ˜ ˙
l Î8 Ë 2 ¯ Ë 2 8 ¯˚
kl
=
4
2.108 Chapter 2 Fourier Series and Fourier Integral

2 l np x
an =
l Ú0
f ( x ) cos
l
dx

2È np x ˘
l
np x l
= Í Ú 2 kx cos dx + Ú l k (l - x ) cos dx ˙
l ÍÎ 0 l 2 l ˙˚
È l

np x ˆ Ê l 2 ˆ
2
2k Í Ê np x ˆ Ê l ˆ Ê
= x Á sin ˜ ◊ Á ˜ - Á - cos ˜◊
l Í Ë l ¯ Ë np ¯ Ë l ¯ ÁË n2p 2 ˜¯
ÍÎ 0

l ˘
Ê np x ˆ Ê l ˆ Ê np x ˆ Ê l 2 ˆ ˙
+ (l - x ) Á sin ◊ Á ˜ - ( -1) - cos ◊
Ë l ˜¯ Ë np ¯ ÁË l ˜¯ ÁË n2p 2 ˜¯ 2l ˙
˚
2 kl È np n˘
= 2 2 Í
2 cos - {1 + ( -1)} ˙ ÈÎQ sin np = 0, cos np = ( -1)n , cos 0 = 1˘˚
n p Î 2 ˚

kl 2 kl • 1
Hence, f ( x) = + Â
4 p 2 n =1 n2
È np
{ n ˘ np x
Í2 cos 2 - 1 + (-1) ˙ cos l
Î ˚
} … (1)

Putting x = 0 in Eq. (1),

kl 2 kl Ê 4 4 4 ˆ
0= + 2 Á - 2 - 2 - 2 - K˜
4 p Ë 2 6 10 ¯
kl 2 kl Ê 1 1 1 ˆ
0 = - 2 Á 2 + 2 + 2 + K˜ … (2)
4 p Ë1 3 5 ¯
p2 1 1 1
= + + +K
8 12 32 52

example 18
2x l
Find the half-range sine series of f ( x ) = 0£ x£
l 2
2(l - x ) l
= £ x£l
l 2
Solution
The half-range sine series of f (x) with period 2l is given by

np x
f ( x ) = Â bn sin
n =1 l

2 l np x
bn =
l Ú0
f ( x )sin
l
dx
2.7 Half-Range Fourier Series 2.109

2 È 2 2x np x ˘
l
np x l 2 (l - x )
= ÍÚ sin dx + Ú l sin dx ˙
l ÍÎ 0 l l 2
l l ˙˚

È l
4Í Ê np x ˆ l Ê np x ˆ l 2 2
= 2 Í x Á - cos ˜ - Á - sin ˜
l Í Ë l ¯ np Ë l ¯ n2p 2 0
Î
l ˘
Ê np x ˆ l Ê np x ˆ l 2 ˙
+ (l - x ) Á - cos ˜ - (-1) Á - sin ˜
Ë l ¯ np Ë l ¯ n2p 2 l ˙
2 ˙˚
4l2 Ê np ˆ
= 2 2 2 Á
2 sin ˜
l n p Ë 2 ¯
8 np
= 2 2 sin
n p 2

8 1 np np x
Hence, f ( x ) =
p 2 Â n2 sin 2
sin
l
n =1

example 19
Express f(x) = x as a
(i) half-range sine series in 0 < x < 2
(ii) half-range cosine series in 0 < x < 2 [Summer 2014]
Solution
(i) The half-range sine series of f(x) with period 2l = 4 is given by

np x
f ( x ) = Â bn sin
n =1 l

np x
= Â bn sin
n =1 2
2 l np x
bn =
l Ú0
f ( x ) sin
l
dx

2 2 np x
= Ú x sin dx
2 0 2
2
Ê 2 np x ˆ Ê 4 np x ˆ
= xÁ- cos ˜ - (1) Á - 2 2 sin
Ë np 2 ¯ Ë n p 2 ˜¯ 0

Ê 2 ˆ
= 2 Á - ˜ cos np [Q sin np = sin 0 = 0]
Ë np ¯
2.110 Chapter 2 Fourier Series and Fourier Integral

4(-1)n ÈÎQ cos np = (-1)n ˘˚


=-
np
4 • (-1)n np x
Hence, f ( x) = - Â
p n =1 n
sin
2
4 Ê px 1 1 3p x ˆ
x= Á sin - sin p x + sin - L˜
pË 2 2 3 2 ¯

(ii) The half-range cosine series of f(x) with period 2l = 4 is given by



np x
f ( x ) = a0 + Â an cos
n =1 l

np x
= a0 + Â an cos
n =1 2
1 l

l Ú0
a0 = f ( x ) dx

1 2
= Ú x dx
2 0
2
1 x2
=
2 2 0
1
= (2 )
2
=1
2 l np x
an = Ú
l 0
f ( x ) cos
l
dx

2 2 np x
= Ú x cos dx
2 0 2
2
Ê 2 np x ˆ Ê 4 np x ˆ
= xÁ sin ˜¯ - (1) Á - 2 2 cos
Ë np 2 Ë n p 2 ˜¯ 0
4 4
= cos np - 2 2 cos 0 [Q sin np = sin 0 = 0]
n2p 2 n p
4
= 2 2 ÈÎ(-1)n - 1˘˚ ÈÎQ cos np = (-1)n , cos 0 = 1˘˚
n p
4 È ( -1)n - 1 ˘

np x
2 ÂÍ
Hence, f ( x ) = 1 + 2 ˙ cos
p n =1 ÍÎ n ˙˚ 2
8 È1 px 1 3p x 1 5p x ˘
x = 1 - 2 Í 2 cos + 2 cos + 2 cos + L˙
p Î1 2 3 2 5 2 ˚
2.7 Half-Range Fourier Series 2.111

example 20
Find the Fourier sine series of f (x) = 2x in 0 < x < 1. [Summer 2015]
Solution
The Fourier sine series of f(x) with period 2l = 2 is given by

np x
f ( x ) = Â bn sin
n =1 l

= Â bn sin np x
n =1

2 l np x
bn =
l Ú0
f ( x )sin
l
dx
1
= 2 Ú (2 x ) sin np x dx
0
1
Ê cos np x ˆ Ê sin np x ˆ
= 4 ( x) Á - ˜ - (1) Á - 2 2 ˜
Ë np ¯ Ë n p ¯ 0
1
Ê cos np x ˆ sin np x
= 4 -x Á + 2 2
Ë np ˜¯ n p 0

È cos np ˘
= 4 Í- [Q sinn p = sin 0 = 0]
Î np ˙˚
4(-1)n
=- [Q cos np = (-1)n ]
np
4
= (-1)n +1
np

4 • (-1)n +1
Hence, f ( x) = Â
p n =1 n
sin np x

example 21
Find the half-range cosine series of f(x) = (x – 1)2 in 0 < x < 1.
[Summer 2015]
Solution
The half-range cosine series of f(x) with period 2l = 2 is given by

np x
f ( x ) = a0 + Â an cos
n =1 l
2.112 Chapter 2 Fourier Series and Fourier Integral


= a0 + Â an cos np x
n =1

1 l
l Ú0
a0 = f ( x ) dx
1
= Ú ( x - 1)2 dx
0
1
( x - 1)3
=
3 0

È ( -1) ˘
= Í0 -
Î 3 ˙˚
1
=
3
2 l cos np x
l Ú0
an = f ( x) dx
l
1
= 2 Ú ( x - 1)2 cos np x dx
0

1
Ê sin np x ˆ Ê cos np x ˆ Ê sin np x ˆ
= 2 ( x - 1)2 Á - 2( x - 1) Á - 2 2 ˜ + 2 Á - 3 3 ˜
Ë np ˜¯ Ë n p ¯ Ë np ¯ 0

1
Ê sin np x ˆ Ê cos np x ˆ Ê sin np x ˆ
= 2 ( x - 1)2 Á + 2( x - 1) Á 2 2 ˜ - 2 Á 3 3 ˜
Ë np ˜¯ Ë np ¯ Ë np ¯ 0

4 cos0
= [Q sin np = sin 0 = 0]
n 2p 2
4
= 2 2 [Q cos0 = 1]
np

1 4 1
Hence, f ( x) = +
3 p2
 n2 cos np x
n =1

1 4 1
( x - 1)2 = + Â n2 cos np x
3 p2 n =1
2.7 Half-Range Fourier Series 2.113

example 22
Find the half-range sine series of f (x) = x 0<x<1
=2–x 1<x<2
p2 1 1 1
Hence, deduce that = 2 + 2 + 2 +K
8 1 3 5
Solution
The half-range sine series of f (x) with period 2l = 4 is given by

np x
f ( x ) = Â bn sin
n =1 l

np x
= Â bn sin
n =1 2
2 l np x
l Ú0
bn = f ( x )sin dx
l
1 np x 2 np x
= Ú x sin dx + Ú (2 - x )sin dx
0 2 1 2
1
Ê 2 np x ˆ Ê 4 np x ˆ
= xÁ- cos ˜ - (1) Á - 2 2 sin
Ë np 2 ¯ Ë n p 2 ˜¯ 0
2
Ê 2 np x ˆ Ê 4 np x ˆ
+ (2 - x ) Á - cos ˜ - ( -1) Á - 2 2 sin
Ë np 2 ¯ Ë n p 2 ˜¯ 1
8 np
= 2 2 sin
n p 2

8 1 np np x
Hence, f ( x ) =
p2
 n2 sin 2
sin
2
n =1
8 È1 p px 1 3p 3p x 1 5p 5p x ˘
= 2 Í 2 sin sin + 2 sin sin + 2 sin sin + L˙
p Î1 2 2 3 2 2 5 2 2 ˚
8 È1 px 1 3p x 1 5p x ˘
= 2 Í 2 sin - sin + 2 sin - L˙ ...(1)
p Î1 2 32 2 5 2 ˚

At x = 1,
1È ˘ 1 + (2 - 1)
f (1) = Í lim- f ( x ) + lim+ f ( x )˙ = =1
2 Î x Æ1 x Æ1 ˚ 2
2.114 Chapter 2 Fourier Series and Fourier Integral

Putting x = 1 in Eq. (1),


8 Ê1 p 1 3p 1 5p ˆ
f (1) = 2 Á
sin - 2 sin + 2 sin - L˜
p 1 Ë 2 2 3 2 5 2 ¯
8 Ê1 1 1 ˆ
1 = 2 Á 2 + 2 + 2 + K˜
p Ë1 3 5 ¯
p2 1 1 1
= 2 + 2 + 2 +K
8 1 3 5

example 23
Find the half-range cosine series of f ( x ) = 1 0 £ x £1
=x 1£ x £ 2
Solution
The half-range cosine series of f (x) with period 2l = 4 is given by

np x
f ( x ) = a0 + Â an cos
n =1 l

np x
= a0 + Â an cos
n =1 2
1 l
a0 = Ú f ( x )dx
l 0
= Í Ú 1dx + Ú xdx ˘˙
1È 1 2

2Î 0 1 ˚
È 2 ˘
1 x2 ˙
= Íx0 +
1
2Í 2 ˙
Î 1˚

5
=
4
2 l np x
an = Ú f ( x ) cos dx
l 0 l
1 np x 2 np x
= Ú 1 ◊ cos dx + Ú x cos dx
0 2 1 2
È Ê 2 np x ˆ ˘
1 2
2 np x np x ˆ Ê 4
= sin + Í xÁ sin - (1) - cos ˙
np 2 0 ÎÍ Ë np 2 ˜¯ ÁË 2 2
n p 2 ˜¯ 1 ˙˚
Ê 2 np ˆ Ê 4 2 np 4 np ˆ
=Á sin ˜ + Á 2 2 cos np - sin - 2 2 cos ˜
Ë np 2 ¯ Ën p np 2 n p 2 ¯
2.7 Half-Range Fourier Series 2.115

4 Ê np ˆ
= 2 ÁË cos np - cos 2 ˜¯
2
n p
4 È np ˘
= 2 Í( -1) - cos 2 ˙
2
n
[Q cos np = ( -1)n ]
n p Î ˚

5 4 1 È np ˘ np x
Hence, f ( x) = +
4 p2
 n2 ÍÎ(-1)n - cos 2 ˙˚
cos
2
n =1

exercIse 2.3
1. Find the half-range cosine series of f (x) = x sin x in 0 < x < p.
È 1 •
(-1)n -1 ˘
Í Ans. : 1 - cos x + 2Â 2 cos nx ˙
Î 2 n =1 n - 1 ˚
2. Find the half-range cosine series of f (x) = (x – 1)2 in 0 < x < 1.
È 1 4 •
1 ˘
Í Ans. : + 2
Î 3 p
Ân
n =1
2
cos np x ˙
˚
x
3. Find the half-range cosine series of f (x) = e in 0 < x < 1.
È •
1 ˘
Í Ans. : (e - 1) + 2Â [e(-1)n - 1]cos np x ˙
n =1 1 + n p
2 2
Î ˚
4. Find the half-range sine series of
f (x) = x 0£x£2
=4–x 2£x£4
È 16 • Ê 1 np ˆ np x ˘
2 ÂÁ 2
Í Ans. : sin ˜ sin ˙
Î p n =1 Ë n 2 ¯ 4 ˚

5. Find the half-range sine and cosine series of f (x) = x – x2 in 0 < x < 1.

È 8 •
1 1 4 •
1 ˘
Í Ans. : 3 Â (2n + 1) 3
sin(2n + 1)p x, -
6 p2
 (2n) 2
cos 2np x ˙
Î p n=0 n =1 ˚

Ê xˆ
6. Find the half-range sine and cosine series of f (x) = a Á 1 - ˜ in 0 < x < l.
Ë l¯

È 2a • 1 np x a 4 a • 1 (2n + 1)p x ˘
Í Ans. : Â
p n =1 n
sin
l
, + 2Â
2 p n = 0 (2n + 1)2
cos
l
˙
Î ˚

You might also like