You are on page 1of 8

# Fourier Series Dr.

## Suresh Kumar, BITS Pilani 1

Chapter 6

Fourier Series

Note: This module is prepared from Chapter 6 of the text book (G.F. Simmons, Differential
Equations with Applications and Historical Notes, TMH, 2nd ed., 1991) just to help the students.
The study material is expected to be useful but not exhaustive. For detailed study, the students
are advised to attend the lecture/tutorial classes regularly, and consult the text book.

## Dr. Suresh Kumar, Department of Mathematics, BITS Pilani, Pilani Campus

Contents

0.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
0.2 Dirichlets conditions for convergence . . . . . . . . . . . . . . . . . . . . . . . . . . 6
0.3 Fourier series for even and odd functions . . . . . . . . . . . . . . . . . . . . . . . . 7
0.4 Fourier series on arbitrary intervals . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2
Fourier Series

0.1 Introduction
We are familiar with the power series representation of a function f (x). The representation of f (x)
in the form of a trigonometric series given by

a0 X
f (x) = + (an cos nx + bn sin nx), (1)
2 n=1

is required in the treatment of many physical problems such as heat conduction, electromagnetic
waves, mechanical vibrations etc. An important advantage of the series (1) over a usual power series
in x is that it can represent f (x) even if f (x) possesses many discontinuities (eg. discontinuous
impulse function in electrical engineering). On the other hand, power series can represent f (x)
only when f (x) is continuous and possesses derivatives of all orders.
Let m and n be positive integers such that m 6= n. Then we have,
Z Z Z
cos nxdx = 0, sin nxdx = 0, cos mx sin nxdx = 0,

Z Z
cos mx cos nxdx = 0, sin mx sin nxdx = 0.

Z Z
2
Further, cos nxdx = = sin2 nxdx.

Now, we do some classical calculations that were first done by Euler. We assume that the function
f (x) in (1) is defined on [, ]. Also, we assume that the series in (1) is uniformly convergent so
that term by term integration is possible.
Integrating both sides of (1) over [, ], we get
Z
1
a0 = f (x)dx. (2)

Multiplying both sides of (1) by cos nx, and then integrating over [, ], we get
Z
1
an = f (x) cos nxdx. (3)

Note that this formula, for n = 0, gives the value of a0 as given in (2). That is why, a0 is divided
by 2 in (1).

3
Fourier Series Dr. Suresh Kumar, BITS Pilani 4

Next, multiplying both sides of (1) by sin nx, and then integrating over [, ], we get
Z
1
bn = f (x) sin nxdx. (4)

These calculations show that the coefficients an and bn can be obtained from the sum f (x) in
(1) by means of the formulas (3) and (4) provided the series (1) is uniformly convergent. However,
this situation is too restricted to be of much practical use because first we have to ensure that the
given function f (x) admits an expansion as a uniformly convergent trigonometric series. For this
reason, we set aside the idea of finding the coefficients an and bn in the expansion (1) that may or
may not exist. Instead we use formulas (3) and (4) to define some numbers an and bn . Then we
use these to construct a series of the form (1). When we follow this approach, the numbers an and
bn are called the Fourier coefficients of the function f (x) and the series (1) is called Fourier series
of f (x). Obviously, the function f (x) must be integrable in order to construct its Fourier series.
Note that a discontinuous function may be integrable.
We hope that the Fourier series of f (x) will converge to f (x) so that (1) is a valid representation
or expansion of f (x). However, this is not always true. There exist integrable functions whose
Fourier series diverge at one or more points. That is, why some advanced texts on Fourier series
write (1) in the form

a0 X
f (x) + (an cos nx + bn sin nx), (5)
2 n=1

where the sign is used in order to emphasize that the Fourier series on right is not necessarily
convergent to f (x).
Just like a Fourier series does not imply convergence, a convergent trigonometric series does
not imply to be a Fourier series of some function. For example, it is known that the trigonometric
series

X sin nx
n=1
ln(1 + n)

converges for all x. But it is not a Fourier series since 1/ ln(1+n) can not be obtained from formula
(4) for any choice of integrable function f (x). In fact, this series fails to be Fourier series because
it fails to satisfy a remarkable theorem, which states that the term by term integral of any Fourier
series (whether convergent or not) must converge for all x.
Thus, the fundamental problem of the subject of Fourier series is clearly to discover the prop-
erties of an integrable function that guarantee that its Fourier series not only converges but also
converges to the function. Before this, let us see some examples.

## Sol. 0.1.1. We find

1
Z
a0 = f (x)dx = 0,

1
Z
an = f (x) cos nxdx = 0,

Fourier Series Dr. Suresh Kumar, BITS Pilani 5

2
Z
1
bn = f (x) sin nxdx = (1)n .
n
So Fourier series of f (x) = x reads as
 
1 1
x = 2 sin x sin 2x + sin 3x + ........ . (6)
2 3
Here equals sign is an expression of hope rather than definite knowledge. It can be proved that
the Fourier series in (6) converges to x in < x < . At x = or x = , the Fourier series
converges to 0, and hence does not converge to f (x) = x at x = or x = . Further, each
term on right hand side in (6) has a period 2. So the entire expression on right hand side of (6)
has a period 2. It follows that the Fourier series in (6) does not converge to f (x) = x outside
the interval < x < . But if f (x) = x is given to be a periodic function of period 2, then
the Fourier series in (6) converges to f (x) = x for all real values of x except x = k, where k is
any non-zero integer. In left panel of Figure 1, we show the plots of x (Black line), 2 sin x (Green
curve), 2 sin x sin 2x (Red curve) and 2 sin x sin 2x + (2/3) sin 3x (Blue curve) in the range
< x < or 3.14 < x < 3.14. We see that as we consider more and more terms of the the
Fourier series in (6), it approximates the function f (x) = x better and better, as expected.

3
2

1
2

-3 -2 -1 1 2 3

-1 1

-2

-3 -2 -1 1 2 3
-3

Figure 1: Left Panel: Plots of x (Black line), 2 sin x (Green curve), 2 sin x sin 2x (Red curve) and 2 sin x
sin 2x + (2/3) sin 3x (Blue curve) in the range < x < or 3.14 < x < 3.14.
Right Panel: Plots of f (x) (Black lines), 2 (Green line), 2 + 2 sin x (Red curve) and 2 + 2 sin x + 32 sin 3x (Blue
curve), 2 + 2 sin x + 23 sin 3x + 25 sin 5x (Purple curve) in the range < x < or 3.14 < x < 3.14.


0 , x < 0
f (x) =
, 0 x .

## Sol. 0.1.2. We find

1
Z
a0 = f (x)dx = ,

1
Z
an = f (x) cos nxdx = 0,

1
Z
1
bn = f (x) sin nxdx = [1 (1)n ].
n
Fourier Series Dr. Suresh Kumar, BITS Pilani 6

## So Fourier series of f (x) reads as

 
1 1
f (x) = + 2 sin x + sin 3x + sin 5x + ........ . (7)
2 3 5
The Fourier series in (7) converges to f (x) in < x < except x = 0. At x = 0, the value of
f (x) is while the Fourier series converges to 2 . In right panel of Figure 1, we show the plots of
f (x) (Black lines), 2 (Green line), 2 + 2 sin x (Red curve) and 2 + 2 sin x + 32 sin 3x (Blue curve),

2
+ 2 sin x + 23 sin 3x + 25 sin 5x (Purple curve) in the range < x < or 3.14 < x < 3.14. We
see that as we consider more and more terms of the the Fourier series in (7), it approximates the
function f (x) = x better and better, as expected.

## 0.2 Dirichlets conditions for convergence

Let f (x) be a function defined and bounded on x < such that it has finite number of
discontinuities, and only a finite number of maxima and minima on this interval. Let f (x) be
defined by f (x + 2) = f (x) for other values of x. Then the Fourier series of f (x) converges to
1
2
[f (x) + f (x+)] at every point x. Thus, the Fourier series of f (x) converges to f (x) at every
point x of continuity. If we redefine the function as the average of the two one sided limits at each
point of discontinuity, that is, f (x) = 12 [f (x) + f (x+)], then the Fourier series represents f (x)
everywhere.
Ex. 0.2.1. Find Fourier series of the function

0 , x < 0
f (x) =
x , 0 x .
2 1 1 1
Hence show that 8
=1+ 32
+ 52
+ 72
+ ........
Sol. 0.2.1. We find
1
Z
a0 = f (x)dx = /2,

1
Z
1
an = f (x) cos nxdx = [(1)n 1],
n2
1 (1)n+1
Z
bn = f (x) sin nxdx = .
n
So Fourier series of f (x) is

X 1 n
X (1)n+1
f (x) = + [(1) 1] cos nx + sin nx. (8)
4 n=1 n2 n=1
n

## At x = , f (x) is discontinuous. So its Fourier series converges to 12 [f (x)+f (x+)] = 12 (+0) = 2 .

So at x = , (8) gives

X 1
= + [(1)n 1](1)n .
2 4 n=1 n2
It can be rearranged to write
2 1 1 1
= 1 + 2 + 2 + 2 + .........
8 3 5 7
Fourier Series Dr. Suresh Kumar, BITS Pilani 7

## 0.3 Fourier series for even and odd functions

Let f (x) be integrable function defined on x . If f (x) is even, then its Fourier series
carries only cosine terms and the Fourier coefficients are given by
2
Z
an = f (x) cos nxdx, bn = 0.
0

If f (x) is odd, then its Fourier series carries only sine terms and the Fourier coefficients are given
by
2
Z
an = 0, bn = f (x) sin nxdx.
0

For example, the Fourier coefficients of the odd function f (x) = x, x are an = 0 and
n1
bn = 2(1)
n
. So the Fourier series of x is given by
 
1 1
x = 2 sin x sin 2x + sin 3x ........... (9)
2 3

Note that the Fourier series converges to x for < x < and not at the end points x = .
Similarly, the Fourier coefficients of the even function f (x) = |x|, x are a0 = ,
an = n2 2 [(1)n 1] and bn = 0. So we have
 
4 1 1
|x| = cos x + 2 cos 3x + 2 cos 5x + ........... (10)
2 3 5

It is interesting to observe that the two series (9) and (10) both represent the same function
f (x) = x on 0 x since |x| = x for x 0. The series (9) is called Fourier sine series of x,
and the series (10) is called Fourier cosine series of x. Similarly, any function f (x) satisfying the
Dirichlets conditions on 0 x can be expanded in both a sine series and a cosine series on
this interval subject to that the series does not converge to f (x) at the end points x = 0 and x =
unless f (x) = 0 at these points. Thus, to obtain sine series of a function, we redefine the function
(if necessary) to have the value 0 at x = 0, and then extend it over the interval x < 0 such
that f (x) = f (x) for all x lying in x . It is called odd extension of f (x). Similarly,
even extension of f (x) can be carried out in order to obtain Fourier cosine series.

Ex. 0.3.1. Find Fourier sine and cosine series of f (x) = cos x, 0 x .

## Sol. 0.3.1. For sine series, we find

2 2 2n 1 + (1)n
Z Z  
bn = f (x) sin nxdx = cos x sin nxdx = , n 6= 1.
0 0 n2 1

2
Z
b1 = cos x sin xdx = 0.
0
So Fourier sine series of cos x is given by

2n 1 + (1)n
X  
cos x = 21
sin nx.
n=2
n
Fourier Series Dr. Suresh Kumar, BITS Pilani 8

## For cosine series, we find

2 2
Z Z
an = f (x) cos nxdx = cos x cos nxdx = 0, n 6= 1.
0 0
2
Z
a1 = cos x cos xdx = 1.
0
So Fourier cosine series of cos x is given by

cos x = cos x.

## 0.4 Fourier series on arbitrary intervals

x
Let f (x) be defined on an interval L x L. If we let t = L
, then we have
 
tL
f (x) = f = g(t), t .

## So Fourier series of g(t) is given by

a0 X
g(t) = + (an cos nt + bn sin nt),
2 n=0
Z Z
1 1
where an = g(t) cos ntdt, bn = g(t) sin ntdt.

x
Since t = L
, it follows that

a0 X  nx nx 
f (x) = + an cos + bn sin ,
2 n=0
L L
Z L Z L
1 nx 1 nx
where an = f (x) cos dx, bn = f (x) sin dx.
L L L L L L
Ex. 0.4.1. Find Fourier coefficients of the function

0 , 2 x < 0
f (x) =
1 , 0 x 2.

## Sol. 0.4.1. Here L = 2. So we find

1 L 1 2
Z Z
a0 = f (x)dx = f (x)dx = 1,
L L 2 2
Z L Z 2
1 nx 1 nx
an = f (x) cos dx = f (x) cos dx = 0,
L L L 2 2 2
Z L Z 2
1 nx 1 nx 1
bn = f (x) sin dx = f (x) sin dx = [1 (1)n ].
L L L 2 2 2 n