1 Existance of A Fourier Series Expansion
1 Existance of A Fourier Series Expansion
1 Existance of A Fourier Series Expansion
Deepesh K P
There are many types of series expansions for functions. The Maclaurin series,
Taylor series, Laurent series are some such expansions. But these expansions
become valid under certain strong assumptions on the functions (those assump-
tions ensure convergence of the series). Fourier series also express a function as
a series and the conditions required are fairly good and suitable when we deal
with signals.
Suppose f is a real valued function from R to R. In this note, we deal with
the following three questions:
There are three conditions which guarantees the existance of a valid Fourier
series expansion for a given function. These conditions are collectively called
the Dirichlet conditions:
It should be noted that the second and third conditions are satisfied by many real
valued functions that we deal with, inside any finite interval. But periodicity is a
condition that is satisfied by very few functions, for example, constant function,
sine, cos, tan and their combinations. But we can consider any function defined
on a finite interval [a, b] (or (a, b)) as a periodic function on R by thinking that
the function is extended to R by repeating the values in [a, b] to the remaining
part of R. Thus
Figure
1
2 Derivation of Fourier series expansion of a
function defined in [−π, π]:
For finding the above unknown co-efficients a0 , an and bn in the Fourier series
expansion of a function, one need to recall the value of certain integrals:
Z π
1. sin mx dx = 0 for any integer m.
−π
Z π
2. cos mx dx = 0 for any integer m.
−π
Z π
3. sin mxcos nx dx = 0 for any integers m and n.
−π
Z π
4. sin mxsin nx dx = 0 for integers m 6= n.
−π
Z π
5. cos mxcos nx dx = 0 for integers m 6= n.
−π
Z π
6. sin mxsin nx dx = π when the integers m = n.
−π
Z π
7. cos mxcos nx dx = π when the integers m = n.
−π
[All the above integrals easily follow by evaluating using integration by parts]
∞
X
a0
Now suppose f (x) = 2 + aj cos jx + bj sin jx.
j=1
To find a0 :
Observe that
Z π Z π ∞ Z π Z π
a0 X
f (x) dx = dx + aj cos jx dx + bj sin jx dx
−π 2 −π j=1 −π −π
∞
a0 X
= 2π + (0 + 0)
2 j=1
2
To find an :
Observe that
Z π Z π ∞ Z π Z π
a0 X
f (x)cos nx dx = cos nx dx + aj cos nx cos jx dx + bj cos nx sin jx dx
−π 2 −π j=1 −π −π
∞
a0 X
= 0 + an π + bj 0
2 j=1
To find bn :
Observe that
Z π Z π ∞ Z π Z π
a0 X
f (x)sin nx dx = sin nx dx + aj sin nx cos jx dx + bj sin nx sin jx dx
−π 2 −π j=1 −π −π
∞
a0 X
= 0+ aj 0 + bn π.
2 j=1
Thus
∞
X
a0
f (x) = 2 + an cos nx + bn sin nx,
n=1
where Z π
1
a0 = π f (x) dx
Z−π
π
1
an = π f (x) cos nx dx
Z −π
π
1
bn = π f (x) sin nx dx
−π
3
∞
X
a0
f (x) = 2 + an cos nx + bn sin nx,
n=1
where
Z c+2π
1
a0 = π f (x) dx
Zc c+2π
1
an = π f (x) cos nx dx
Z cc+2π
1
bn = π f (x) sin nx dx
c
Now suppose that f (x) is defined in an arbitrary interval [a, b] and satisfy the
Dirichlet conditions. Let us take b−a2 = l, half the length of the interval. Now
define the new variable
π
z = x.
l
By this simple transformation, we can convert functions on any finite interval
(say, [a, b]) to functions in the new variable z, whose domain is an interval of
2π length. This is because
x = a ⇒ z = πl a and
x = b ⇒ z = πl b = b−a
2π
(b − a + a) = 2 π + πl a.
Thus when the variable x in f (x) moves from a to b, the new variable z in
the new function F (z) (which is the same function f in the new variable) moves
from c to c + 2π, where c = πl a. Hence the Fourier series expansion is applicable
for F (z). Thus
∞
a0 X
f (x) = F (z) = + an cos nz + bn sin nz,
2 n=1
where
1 c+2π
Z
a0 = F (z) dz
π c
1 c+2π
Z
an = F (z) cos nz dz
π c
1 c+2π
Z
bn = F (z) sin nz dz
π c
π
and changing back to the original variable x (note that dz = l dx), we have
4
∞
a0
X nπ nπ
f (x) = 2 + an cos x + bn sin x,
n=1
l l
where
Z b
1
a0 = l f (x) dx
Za b
1 nπ
an = l f (x) cos
x dx
Z ab l
nπ
bn = 1l f (x) sin x dx,
a l
which is the general form of Fourier series expansion for functions on any
finite interval. Also note that this is applicable to the first case of our discussion,
where we need to take a = −π, b = π, l = π and then everything becomes the
same as in the previous section.
3.1 Illustration
We now take a simple problem to demonstrate the evaluation of Fourier series.
Consider the function f defined by
−10 if − 2 ≤ x ≤ −1,
f (x) = x if − 1 < x < 1,
10, if 1 ≤ x ≤ 2.
We shall find the Fourier series expansion of this function. Here, note that
the length of the interval is 4. So 2l = 4 and l = 2. We need to write
∞
a0 X nπ nπ
f (x) = + an cos x + bn sin x,
2 n=1
2 2
where Z 2
1
a0 = f (x) dx
2 −2
Z 2
1 nπ
an = f (x) cos x dx
2 −2 2
Z 2
1 nπ
bn = f (x) sin x dx,
2 −2 2
Now
Z −1 Z 1 Z 2
1
a0 = ( −10 dx + x dx + 10 dx)
2 −2 −1 1
1
= (−10 + 0 + 10) = 0
2
Z −1 Z 1 Z 2
1 nπ nπ nπ
an = ( −10 cos x dx + x cos x dx + 10 cos x dx)
2 −2 2 −1 2 1 2
5
Z −1 Z 1 Z 2
1 nπ nπ nπ
= (−10 cos x dx + xcos x dx + 10 cos x dx)
2 −2 2 −1 2 1 2
1 20 nπ 20 nπ
= ( (sin − sin nπ) + 0 + (sin nπ − sin )) = 0
2 nπ 2 nπ 2
Z −1 Z 1 Z 2
1 nπ nπ nπ
bn = ( −10 sin x dx + x sin x dx + 10 sin x dx)
2 −2 2 −1 2 1 2
1 20 nπ −2 nπ 4 nπ 20 nπ
= { (cos( ) − cos(nπ)) + 2[ cos( ) + 2 2 sin( ) − 0] − (cos(nπ) − cos( )}
2 nπ 2 nπ 2 n π 2 nπ 2
18 nπ 20 4 nπ
= cos( ) − cos(nπ) + 2 2 sin( ).
nπ 2 nπ n π 2
4 19
So when n = 1 ⇒ b1 = π2 , n = 2 ⇒ b2 = π ,...
0 π 4 π 2π 19 2π
f (x) = + 0 cos x + 2 sin x + 0 cos x+ sin x + ...
2 2 π 2 2 π 2
4 π 19 2π
= sin x + sin x + ...,
π2 2 π 2
which is valid at all points in [−2, 2] except at −1 and 1, since the function
is continuous at all points except −1 and 1. When x = −1, the sum of the series
will be equal to the value −10+−1
2 = −5.5 and at x = 1, it is 10+1
2 = 5.5
6
3.2.2 Odd functions:
Similarly when f (x) is odd in a domain [−c, c]. Then a0 = an = 0 and the
Fourier series becomes
∞
X nπ
f (x) = bn sin x
n=1
c
where
2 c
Z
nπ
bn = f (x) sin x dx
c 0 c
Note: If you observe carefully, in the illustration problem, the function is
actually odd and the domain is [−2, 2]. Note that the Fourier series contains
only sine terms. But the converse is not true in general. That is, even if the
Fourier series contains only sine terms, the function may not be odd!
[For proving the above two cases, one should recall that the product of an
odd and an even function is always odd and when both functions are even or
both odd then the product is always even.]
3.3.1 Illustration
Suppose f (x) = x2 , −π < x < π. We shall find the Fourier series of this
function and use it to evaluate the sum of the series 112 − 212 + 312 − . . ..
Z π
2
a0 = x2 dx = π 2
−π 3
1 π 2 2 π 2
Z Z
4
an = x cos nx dx = x cos nx dx = (−1)n 2
π −π π 0 n
Thus the Fourier series becomes
π2 4 4 4
x2 = + −1. 2 cos x + 1. 2 cos 2x + −1. 2 cos 3x + . . .
3 1 2 3
Now to find the sum of the given series, take x = 0, which is a continuous point.
Substituting on both sides
π2
1 1 1
0= + −4 − + − . . . ,
3 12 22 32
which gives
1 1 1 π2
2
− 2 + 2 − ... = .
1 2 3 12
7
4 Fourier Sine Series and Cosine Series:
Sometimes we may need to expand a given function as a series in only cosine
terms or only sine terms. Such series are called cosine series and sine series
respectively. This can be done easily when the given function is defined on an
interval like [0, c] (that is a positive side interval) or [−c, 0] (negative side inter-
val). Hence such series are also reffered as Half range series expansion.
Suppose f (x) is defined in the interval [0, c]. Then one can think of the
extended function as either even or odd (depending on the need; i.e., cosine
series ⇒ even and sine series ⇒ odd) into the interval [−c, c].
Note: For doing problems one need not do the extension to [−c, c]. Just apply-
ing the formula is fine.
Note: Thus a function defined in [0, c] will have three types of expansions:
• a Fourier series expansion
• a Cosine series expansion
• a Sine series expansion.
8
4.1 Illustration
Consider the function f (x) = x, 0 < x < π. We shall find the Fourier cosine
series of this function.
First, considering as an even function in (−π, π), we get the Fourier cosine
X∞
series as f (x) = a20 + an cos nx
n=1
Note that l = π here. Let us find a0 and an .
2 π
Z
a0 = x dx
π 0
2 π2
= = π2 .
π Z2
2 π
an = x cos nx dx
π 0
2 (−1)2
1
= − 2
π n2 n
Thus the Fourier cosine series is given by
π 4 cos 3x cos 5x
f (x) = − cos x + + + . . .
2 π 32 52
In a similar way, one can apply the formula to find the Fourier sine series of the
function. Note that the same function also has got a Fourier series expansion,
where you need to apply the formula by taking l = π2 .
9
5.1.1 Example
Z 4
Calculate f (x)dx where f (x) is given at
1
1 xn
Z
a0 = f (x) dx
l x0
1h
= [y0 + 2 (y1 + y2 + . . . + yn−1 ) + yn ]
l 2Z
1 xn nπ
an = f (x) cos x dx
l x0 l
1hh nπ nπ nπ nπ nπ i
= y0 cos x0 + 2 y1 cos x1 + y2 cos x2 + . . . + yn−1 cos xn−1 + yn cos xn
l 2Z l l l l l
1 xn nπ
bn = f (x) sin x dx
l x0 l
1hh nπ nπ nπ nπ nπ i
= y0 sin x0 + 2 y1 sin x1 + y2 sin x2 + . . . + yn−1 sin xn−1 + yn sin xn
l2 l l l l l
In problems, you can not find all the an s. So find a0 , a1 , a2 , b1 , b2 and
substitute in the Fourier series formula.
10
5.2.1 Illustration
Find the Fourier series of the function from the data given below:
π π
x 0 4 2 3 π4 π
f (x) 1 2 3 4 5
π
Here the interval under consideration is (0, π), which is of length π. Hence l = 2
and h = π4 . The Fourier series of the function is
∞
X
a0
f (x) = 2 + an cos 2nx + bn sin 2nx,
n=1
where Z π
2
a0 = π f (x) dx
Z0 π
2
an = π f (x) cos 2nx dx
Z 0π
2
bn = π f (x) sin 2nx dx,
0
Now we calculate a0 , a1 , a2 , b1 , b2 using the Trapezoidal rule.
1 π
Z
a0 = π f (x) dx
2 0
2 nπ o
= [1 + 2 (2 + 3 + 4) + 5] = 6
π Z8
1 π
a1 = π f (x)cos 2x dx
2 0
2 nπ h π π π io
= 1 cos 2 .0 + 2 2 cos 2. + 3 cos 2. + 4 cos 2.3 + 5 cos 2π
π 8 4 2 4
1
= [1 + 2 (2.0 + 3. − 1 + 4.0) + 5.1] = 0
4 Z
1 π
a2 = π f (x)cos 4x dx
2 0
2 nπ h π π π io
= 1 cos4 .0 + 2 2 cos 4. + 3 cos 4. + 4 cos 4.3 + 5 cos 4π
π 8 4 2 4
1
= [1 + 2 (2. − 1 + 3.1 + 4. − 1) + 5.1] = 0
4 Z
1 π
b1 = π f (x)sin 2x dx
2 0
2 nπ h π π π io
= 1 sin 2 .0 + 2 2 sin 2. + 3 sin 2. + 4 sin 2.3 + 5 sin 2π
π 8 4 2 4
1
= [0 + 2 (2.1 + 3.0 + 4. − 1) + 5.0] = −1
4 Z
1 π
b2 = π f (x)sin 4x dx
2 0
2 nπ h π π π io
= 1 sin4 .0 + 2 2 sin 4. + 3 sin 4. + 4 sin 4.3 + 5 sin 4π
π 8 4 2 4
1
= [1.0 + 2 (2.0 + 3.0 + 4.0) + 5.0] = 0
4
11
Thus the Fourier series expansion of the function is
0
f (x) = + 0.cos 2x + 0.cos 4x + . . . + −1.sin 2x + 0.sin 4x + . . .
2
6 Problems
1. Obtain the Fourier series representation of f (x) = 14 (π − x)2 , 0 < x < 2π.
2
[Hint: l = π, a0 = π6 , an = n12 , bn = 0 ]
12