
Lecture No.2-10 by Hussein J. AbdulHussein
Advanced Calculus II Al Muthanna University, College of Science
1
FOURIER SERIES FOR DISCONTINUOUS FUNCTIONS
Let the function
f(x) be defined by
f(x) = f
1
(x). c < x < x
0
= f
2
(x). x
0
< x < c + 2π .
Where
x
0
is the point of discontinuity in the interval (
c . c + 2π)
In such cases also , we obtain the Fourier series for
f(x) in the usual way The values of
a
0
. a
n
. b
n
are evaluated by
a
0
=
1
π
[ ∫
f
1
(x)dx + ∫
f
2
(x)dx] ;
2+2π
x
0
x
0
c
a
n
=
1
π
[ ∫
f
1
(x) cos n x dx + ∫
f
2
(x) cos nx dx] ;
2+2π
x
0
x
0
c
b
n
=
1
π
[ ∫
f
1
(x) sin nx dx + ∫
f
2
(x) cos nx dx]
2+2π
x
0
x
0
c
If is the point of finite discontinuity, then the sum of the Fourier series
=
1
2
[ lim
h→0
f( x
0
− h) + lim
h→0
f( x
0
+ h)]
=
1
2
[ lim
h→0
f( x
0
− 0) + lim
h→0
f( x
0
+ 0)] =
1
2
(FB + FC)
Remarks
1. It may be seen from the graph, that at a point of finite discontinuity
x = x
0
there is a finite
jump equal to BC in the value of the function
f(x) at x = x
0
2. A given function
f(x) may be defined by different formulae in different regions Such types of
functions are quite common in Fourier Series.
3. At a point of discontinuity the sum of the series is equal to the mean of the limits on the right
and left
FUNCTION DEFINED IN TWO OR MORE SUB - RANGES
Example 4. Find the Fourier series to represent the function
f (x) given by:
f (x) = [
−k for − π < x < 0
k for 0 < x < π
Hence show that ∶

Lecture No.2-10 by Hussein J. AbdulHussein
Advanced Calculus II Al Muthanna University, College of Science
2
1 −
1
3
+
1
5
−
1
7
+ ⋯ =
π
4
Solution.
f(x) {
−k . for − π < x <
k . for 0 < x < π
⋯ (1)
a
0
=
1
π
∫ f(x)dx =
1
π
[∫ −kdx ∫ kdx
π
0
0
−π
π
−π
] =
1
π
[−kx]
0
−π
+ [kx]
π
0
]
=
1
π
k[0 − π + π − 0] = 0
a
n
=
1
π
∫ f(x) cos nx dx =
1
π
[∫ −k cos nx dx + ∫ k cos nx dx
π
0
0
−π
π
−π
]
=
1
π
k [− {
sin nx
n
}
0
−π
− {
sin nx
n
}
π
0
] =
1
π
k[−0 + 0] = 0
b
n
=
1
π
∫ f(x) sin nx dx =
1
π
[∫ −k sin nx dx + ∫ k sin nx dx
π
0
0
−π
π
−π
]
=
1
π
k [− {
cos nx
n
}
0
−π
− {
cos nx
n
}
π
0
]
=
1
π
k [
1
n
−
(−1)
n
n
−
(−1)
n
n
+
1
n
] =
1
π
k [
2
n
−
2(−1)
2
n
]
If n is even
b
n
= 0
If n is odd
b
n
=
4k
nπ
f(x) = a
0
+ ∑ a
n
∞
n=1
cos nx + ∑ b
n
∞
n=1
sin nx
f(x) = ∑ b
n
∞
n=1
sin nx = b
1
sin x + b
2
sin2 x + b
3
sin3 x + b
4
sin4 x + ⋯
Thus required Fourier sin series is
f (x) =
4k
π
sin x +
4k
3π
sin 3x +
4k
5π
sin 5x + ⋯
⇒ f (x) =
4k
π
[sin x +
1
3
sin 3x +
1
5
sin 5x + ⋯ ] ⋯ (2)

Lecture No.2-10 by Hussein J. AbdulHussein
Advanced Calculus II Al Muthanna University, College of Science
3
Putting
x =
π
2
in (2). we get
k =
4k
π
[sin
π
2
+
1
3
sin
3π
2
+
1
5
sin
5π
2
+ ⋯
1 =
4
π
[1 +
1
3
(−1) +
1
5
(1) +
1
7
(−1) + ⋯ ]
=
4
π
[1 −
1
3
+
1
5
−
1
7
+ ⋯ ] ⇒
4
π
= 1 −
1
3
+
1
5
−
1
7
+ ⋯
Example 5. find the Fourier series of the function
f(x) =
{
−1 for − π < x < −
π
2
0 for −
π
2
< x <
π
2
+1 for
π
2
< x < π
Solution : Let
f(x) =
a
0
2
+ a
1
cos x + a
2
cos 2x + ⋯ + b
1
sin x + b
2
sin 2x + ⋯ (1)
a
0
=
1
π
∫ f(x) dx =
1
π
∫ (−1)dx +
1
π
∫
0 dx +
1
π
∫ 1 dx
π
π
2
π/2
−π/2
−
π
2
−π
π
−π
=
1
π
[−x]
−π
−π/2
+
1
π
[x]
π/2
π
=
1
π
[
π
2
− π + π −
π
2
] = 0
a
n
=
1
π
∫ f(x) cos nx dx
π
−π
=
1
π
∫
(−1) cos nx dx +
1
π
∫ (0) cos nx dx +
1
π
∫ (1) cos nx dx
π
π/2
π
2
−
π
2
−π/2
−π
= −
1
π
[
sin nx
n
]
−π
−π/2
+
1
π
[
sin nx
n
]
π/2
π
= −
1
π
[
sin
nπ
2
n
] +
1
π
[
sin
nπ
2
n
] = 0
b
n
=
1
π
∫ f(x) sin nx dx
π
−π

Lecture No.2-10 by Hussein J. AbdulHussein
Advanced Calculus II Al Muthanna University, College of Science
4
=
1
π
∫
(−1) sin nx dx +
1
π
∫
(0) sin nx dx +
1
π
∫ (1) sin nx dx
π
π/2
π/2
−π/2
−π/2
−π
=
1
π
[
cos nx
n
]
−π
−π/2
−
1
π
[
cos nx
n
]
π/2
π
=
1
nπ
[cos
nπ
2
− cos nπ] −
1
nπ
[cos nπ − cos
nπ
2
] =
2
nπ
[cos
nπ
2
− cos nπ]
b
1
=
2
π
. b
2
= −
2
π
. b
3
=
2
3π
Putting the values of
a
0
. a
n
. b
n
in(1). we get
f(x) =
1
π
[2 sin x − 2 sin 2x +
2
3
sin 3x + ⋯]
DISCONTINUOUS FUNCTION
At a point of discontinuity, Fourier series gives the value
f(x) of as the arithmetic mean of left and
right limits
At the point of discontinuity,
x = c
Example 6. Find the Fourier series for if
f(x) = {
−π − π < x < 0
x. 0 < x < π
Deduce that
1
1
2
+
1
3
2
+
1
5
2
+ ⋯ =
π
2
8
Solution Let
f(x) =
a
0
2
+ a
1
cos x + a
2
cos 2x + ⋯ + a
n
cos nx + ⋯ + b
1
sin x +
b
2
sin 2x + ⋯ + b
n
sin nx + ⋯ ⋯ (1)
a
0
=
1
π
∫ f(x)dx
π
−π
Then
a
0
=
1
π
[ ∫ (−π)dx + ∫ x dx] =
1
π
[−π(x)
−π
0
+ (x
2
/2)
0
π
π
−π
0
−π
] =
1
π
(−π
2
+
π
2
2
) = −
π
2
;
a
n
=
1
π
∫ f(x) cos nx dx
π
−π
a
n
=
1
π
[∫ (−π)cos nx dx
0
−π
+ ∫ x cos nx dx
π
0
] =
1
π
[ −π (
sin nx
n
)
−π
0
+ (
sin nx
n
+
cos nx
n
2
)
−π
0
]

Lecture No.2-10 by Hussein J. AbdulHussein
Advanced Calculus II Al Muthanna University, College of Science
5
=
1
π
[0 +
1
n
2
cos nπ −
1
n
2
] =
1
πn
2
(cos nπ − 1)
b
n
=
1
π
∫ f(x) sin nx dx
π
−π
=
1
π
[∫ (−π)sin nx dx
0
−π
+ ∫ x sin nx dx
π
0
]
=
1
π
[ (
πsin nx
n
)
−π
0
+ (−x
cos nx
n
+
sin nx
n
2
)
0
π
]
=
1
π
[
π
n
(1 − cos n π) −
π
n
cos n π] =
1
n
(1 − 2cos n π)
f(x) = −
π
4
−
2
π
[cos x +
cos 3x
3
2
+
cos 5x
5
2
+ ⋯ ] + 3 sin x −
sin2x
2
+
sin3x
3
−
sin4x
4
⋯ (2)
Putting
x = 0 in (2). we get f(0) = −
π
4
−
2
π
[1 +
1
3
2
+
1
5
2
+ ⋯ ∞] ⋯ (3)
Now
f(x) discontinuous at x = 0
But f (0 − 0) = −π and f (0 + 0) = 0
∴ f(0) =
1
2
[ f(0 − 0) + f(0 + 0)] = −
π
2
From (3),
−
π
2
= −
π
4
−
2
π
[
1
1
2
+
1
3
2
+
1
5
2
+ ⋯ ] ⇒
π
2
8
=
1
1
2
+
1
3
2
+
1
5
2
+ ⋯ proved
Example 7. Obtain Fourier Series of the function
f(x) = {
x. − π < x < 0
−x. 0 < x < π
And hence show that
1
1
2
+
1
3
2
+
1
5
2
+ ⋯ ⋯ ⋯ =
π
2
8
Solution. We have,
f(x) = {
x. − π < x < 0
−x. 0 < x < π
Fourier Series
Here
f(x) is an even function so b
n
= 0
a
0
=
2
π
∫ f(x)dx
π
0
=
2
π
∫ −xdx
π
0
= −
2
π
[
π
2
2
]
0
π
= −
2
π
[
π
2
2
] = −π

Lecture No.2-10 by Hussein J. AbdulHussein
Advanced Calculus II Al Muthanna University, College of Science
6
a
n
=
2
π
∫ f(x) cos nx dx
π
0
=
2
π
∫ −xcos nxdx
π
0
= −
2
π
[x
sin nx
n
+
cos nx
n
2
]
0
π
= −
2
π
[
(−1)
n
n
2
−
1
n
2
] =
2
πn
2
[1 − (−1)
n
] = {
0 . n is even
4
πn
2
. n is odd
Fourier series :
f(x) = −
π
4
+
4
π
[
cos x
1
2
+
cos 3x
3
2
+
cos 5x
5
2
+ ⋯]
At the point of discontinuity
f(0) =
1
2
[f (0 − 0) + f(0 + 0) = −
1
2
(0 − 0) = 0
Putting
x = 0 in the above, we get
0 = −
π
2
+
π
4
[
1
1
2
+
2
3
2
+
1
5
2
+ ⋯] ⇒
1
1
2
+
2
3
2
+
1
5
2
+ ⋯ ⋯
π
2
8
Ans
Example 8. Find the Fourier series of the function defined as
f(x) = {
x + π. for 0 ≤ x ≤ π
−x − π. for − π ≤ x < π
and f (x + 2π) = f(x)
Solution
a
0
=
1
π
∫ f(x)dx
π
−π
=
1
π
∫ f(x)dx
0
−π
+
1
π
∫ f(x)dx
π
0
=
1
π
∫ (−x − π)dx +
0
−π
1
π
∫ (x + π)dx
π
0
=
1
π
[−
x
2
2
− πx]
−π
0
+
1
π
[
x
2
2
+ πx]
−π
0
=
1
π
[
x
2
2
+ πx] + [
x
2
2
+ π
2
] = π [
1
2
− 1] + π [
1
2
+ 1] = π
a
n
=
1
π
∫ f(x)cos nxdx =
1
π
∫ f(x)cos nxdx +
1
π
∫ f(x) cos nx dx
π
0
0
−π
0
−π
=
1
π
∫ (−x − π)cos nxdx +
1
π
∫ (x + π) cos nx dx
π
0
0
−π
=
1
π
[(−x − π)
sin nx
n
− (−1) {−
cos nx
n
2
}]
−π
0
+
1
π
[(x + π)
sin nx
n
− (−1) {−
cos nx
n
2
}]
0
π
=
1
π
[−
1
n
2
+
(−1)
n
n
2
] +
1
π
[−
(−1)
n
n
2
+
1
n
2
] =
2
n
2
π
[(−1)
n
− 1] =
−4
n
2
π
. if n is odd
= 0. if n is even

Lecture No.2-10 by Hussein J. AbdulHussein
Advanced Calculus II Al Muthanna University, College of Science
7
b
n
=
1
π
∫ f(x)sin nxdx =
1
π
∫ f(x)sin nxdx +
1
π
∫ f(x) sin nx dx
π
0
0
−π
π
−π
=
1
π
∫ (−x − π)sin nxdx +
1
π
∫ (x + π) sin nx dx
π
0
0
−π
=
1
π
[(−x − π) [−
cos nx
n
] − (−1) {−
sin nx
n
2
}]
−π
0
+
1
π
[(x + π) [−
cos nx
n
] − (−1) {−
sin nx
n
2
}]
0
π
=
1
π
[
π
n
] +
1
π
[−
2π
n
(−1)
n
+
π
n
] =
1
n
[(1) − 2(−1)
n
+ (1)] =
2
n
[1 − (−1)
n
]
=
4
n
. if n is odd
= 0. if n is even
Fourier series is : f(x) =
a
0
2
+ a
1
cos x + a
2
cos 2x + ⋯ + b
1
sin x + b
2
sin 2x + ⋯
f(x) =
π
2
−
π
4
[
cos x
1
2
+
cos 3x
3
2
+ ⋯] + [
sinx
1
+
sin3x
3
]
Problems
1- Find the Fourier series of the function
f(x) = {
−1 for − π < x < 0
1 for 0 < x < π
Where
f(x + 2π) = f(x) Ans
4
π
[
1
1
sin x +
1
3
sin 3x +
1
5
sin 5x +
1
7
sin 7x + ⋯]
2. Find the Fourier series of the function
f(x) = {
0 for − π ≤ x ≤ 0
1 for 0 < x <
π
2
0 for
π
2
≤ x ≤ π
Ans
1
4
+
1
π
[
cos x
1
+
cos 2x
2
+
cos 3x
3
+ ⋯ +
sinx
1
+
sin2x
2
+
sin3x
3
]
3. Obtain a Fourier series to represent the following periodic function
f(x) = {
0 when 0 < x < π
1. when π < x < 2π
Ans
1
2
−
2
π
[sin x =
1
3
sin 3x =
1
5
sin 5x + ⋯ ]
4. Find the Fourier expansion the function defined in single period by the relations

Lecture No.2-10 by Hussein J. AbdulHussein
Advanced Calculus II Al Muthanna University, College of Science
8
f(x) = {
1 for 0 < x < π
2 for π < x < 2π
And from it deduce that
π
4
= 1 −
1
3
+
1
5
−
1
7
+ ⋯ Ans ∙
3
2
−
2
π
[sin x +
1
3
sin 3x +
1
5
sin 5x + ⋯]
5. Find a Fourier series to represent the function
f(x) = {
0 for − π < x ≤ 0
1
4
πx for 0 < x < 2π
and hence deduce that
π
2
8
=
1
1
2
+
2
3
2
+
1
5
2
+ ⋯
Ans
π
2
16
+ ∑[
[(−1)
n
− 1]
4n
2
∞
n=1
cos nx −
(−1)
n
π
4n
sin nx + ⋯]
6. Find the Fourier series for
f(x). If
Fourier series
f(x) = {
−π for − π < x ≤ 0
x for 0 < x < π
−π
2
for x = 0
Deduce that
1
1
2
+
2
3
2
+
1
5
2
+ ⋯ =
π
2
8
Ans −
π
4
−
4
π
[cos x +
cos 3x
3
2
+
cos 5x
5
2
+ ⋯] + 3 sin x −
1
2
sin 2x +
3
2
sin 3x −
1
4
sin 4x + ⋯
7. Obtain a Fourier series to represent the function
f(x) = |x| for − π < x < 0
And hence deduce
π
2
8
=
1
1
2
+
2
3
2
+
1
5
2
+ ⋯ Ans
π
4
−
4
π
[cosx +
1
3
2
cos 3x +
1
5
2
cos 5x + ⋯ ]
8. Example as a Fourier series, the function
f(x) defined as
f(x) =
{
π + x for − π < x < −
π
2
π
2
for −
π
2
< x <
π
2
π − x for
π
2
< x < π
9. Obtain a Fourier series to represent the function
f(x) = |sin x| for − π < x < π (
Hint
}
= sin x for 0 <x<π
f(x)= − sin x for −π <x<0

Lecture No.2-10 by Hussein J. AbdulHussein
Advanced Calculus II Al Muthanna University, College of Science
9
Ans
π
4
−
4
π
[
1
3
cos2x +
1
15
cos 4x +
1
35
cos 6 + ⋯ ]
10. An alternating current after passing through a rectifier has the form
i {
I sin θ for 0 < θ < π
0 for π < θ < 2π
,Find the Fourier series of the function
Ans ∙
I
π
−
2I
π
[
cos θ
3
+
cos4 θ
15
+ ⋯ ] +
I
2
sin θ
11. If
f(x) = {
0 for − π < x < 0
sin x for 0 < x < π
Prove that
f(x) =
1
π
+
sin x
2
−
2
π
∑
cos 2mx
4m
2
−1
∞
m=1
Hence show that
1
1∙3
−
1
3∙5
+
1
5∙7
⋯ ∞ =
1
4
(π − 2)