1 Existance of A Fourier Series Expansion

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

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:

• When does f has a Fourier series expansion?


• How we find the expansion?

• What are the main properties of this expansion?

1 Existance of a Fourier series expansion:

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:

1. f is a periodic function on R. This means that there exists a period T ≥ 0


such that
f (x) = f (x + T ) for all x ∈ R.

2. f has only a finite number of maxima and minima in a period.


3. f has atmost a finite number of discontinuous points inside a period.
4. f is integrable over the period of the function.

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

Most of the functions, that we commonly use, defined


on finite intervals can be expanded as Fourier series

Figure

1
2 Derivation of Fourier series expansion of a
function defined in [−π, π]:

In Fourier series expansion, we would like to write the function as a series in


sine and cosine terms in the form:

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

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

This implies that Z π


1
a0 = f (x) dx
π −π

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

This implies that Z π


1
an = f (x) cos nx dx
π −π

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

This implies that Z π


1
bn = f (x) sin nx dx
π −π

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
−π

[This expansion is valid at all those points x, where f (x) is continuous.]

Note: Note that the above mentioned


Z c+2π results hold when we take any 2 π
length intervals [This is because sin mx dx = 0, . . . are true for any c].
c

Result: So whenever we take a function f defined from [c, c + 2π] (any


interval of length 2π) to R, satisfying the Dirichlet conditions, we have

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

3 Derivation of Fourier series expansion of a


function defined in an arbitrary period [a, b]:

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

(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

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 = π ,...

Thus the Fourier expansion of f (x) is

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

3.2 Some special cases:


Suppose the function is an odd/even function in a symmetric interval [−c, c].
That is f (−x) = f (x) for all x ∈ R [⇒ Even] or f (−x) = −f (x) for all x ∈ R
[⇒ Odd]. Then from the results,
Z c
f (x) dx = 0 when f (x) is odd
−c
Z c Z c
f (x) dx = 2 f (x) dx when f (x) is even ,
−c 0
we have some specialities in the expansions.

3.2.1 Even functions:


Suppose f (x) is even in a domain [−c, c]. Then it can be observed that bn = 0
and so the Fourier series becomes

a0 X nπ
f (x) = + an cos x
2 n=1
c
where
2 c
Z
a0 = f (x) dx
c 0
Z c
2 nπ
an = f (x) cos x dx
c 0 c

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

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 Evaluation of series


Fourier series can be used for evaluating the sum of certain numerical series
related with it. For each value of f (x0 ), where x0 is a continuous point of the
function, we get a series by putting the value x0 on both sides of the function.
Care should be given if we substitute a discontinuous point as then instead of
f (x0 ), we should use the average value of the left and right limit at x0

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 − . . ..

Observe that the function is an even function in the symmetric interval


(−π, π). So we immediatly get bn = 0 for all n. So we need to find only ao , &an .

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].

Extension as even function - Cosine series:


Suppose we think of f (x) as even in the interval [−c, c]. Now expand this
function. Obviously the series you obtain will have only constant and cosine
terms. This is the cosine series of the function f (x). That is

a0 X nπ
f (x) = + an cos x
2 n=1
c
where
2 c
Z
a0 = f (x) dx
c 0
2 c
Z

an = f (x) cos x dx
c 0 c
This type of a series is valid only in the domain [0, c] as the function on the
other side was just an extension (not a part of the original function).

Extension as odd function - Sine series:


Similarly when f (x) is thought as an extended odd function in a domain [−c, c].
Then the Fourier series becomes

X nπ
f (x) = bn sin x
n=1
c
where Z c
2 nπ
bn = f (x) sin x dx
c 0 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 .

5 Practical Harmonic Analysis


In many practical problems, we get the data at discrete points of time. That
is, the function will not be given explicitly but the function values will be given
at, say, regular intervals of the domain. For example,
π π
x 0 4 2 3 π4 π
f (x) 0 √1 1 √1 −1
2 2
π π
Here the function is actually sin x, but given at discrete points, 0, 4, 2, 3 π4 , π.
With these point values, how to calculate the Fourier series?

5.1 The Trapezoidal Rule of Integration


This is a rule used for finding the definite integral of a function, which is given
at equally spaced, discrete points. Suppose the values of a function are given as
in
x x0 x1 x2 . . . xn−1 xn
f (x) y0 y1 y2 . . . yn−1 yn
were the points x0 , x1 , . . . , xn are equally spaced; i.e., xi+1 − xi = h, a constant,
for all i. Then the Trapezoidal rule says that
Z xn
h
f (x) dx = [y0 + 2 (y1 + y2 + . . . + yn−1 ) + yn ]
x0 2

9
5.1.1 Example
Z 4
Calculate f (x)dx where f (x) is given at
1

x: 1 1.5 2 2.5 3 3.5 4


f(x): 2 4.875 10 18.125 30 46.375 68
Solution: Note that h = 0.5 here. Now from trapezoidal rule,
Z 4
0.5
f (x)dx = (2 + 2[4.875 + 10 + 18.125 + 30 + 46.375] + 68) = 72.1875.
1 2

5.2 Calculating the Fourier series from a discrete data


Suppose that the values of a function are given as in
x x0 x1 x2 ... xn−1 xn
f (x) y0 y1 y2 ... yn−1 yn

Here the length of the interval is xn −x0 and so l = xn −x


2
0
. The spacing between
the points is h = xi+1 − xi . The Fourier series of the function is

a0
X nπ nπ
f (x) = 2 + an cos x + bn sin x,
n=1
l l
where Z xn
1
a0 = l f (x) dx
Zx0xn
1 nπ
an = l f (x) cos
x dx
Z xx0n l

bn = 1l f (x) sin x dx,
x0 l
Since f (x) is not explicitly given here, we need to use the Trapezoidal rule to
find a0 , an & bn :

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 ]

2. Expand f (x) = x sin x, 0 ≤ x ≤ 2π as a Fourier series.


2 −1
[Hint: Even, l = π, bn = 0, a0 = −2, an = n2 −1 , if n 6= 1, a1 = 2 ]

12

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy