0% found this document useful (0 votes)
13 views54 pages

5 Fourier Series

Fourier Transform_differential eqns
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views54 pages

5 Fourier Series

Fourier Transform_differential eqns
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 54

Fourier Series

Definition (Fourier Series)


Let a0 , a1 , b1 , a2 , b2 , . . . an , bn , . . . be any sequence of real numbers. Then the trigonometric
series

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

is called a Fourier Series.

Applications: Solving important partial differential equations arising in the theory of sound,
heat conduction, electromagnetic waves, and mechanical vibrations.

It is More Powerful than Power Series: Can represent very general functions with many
discontinuities, like the impulse function.
Fourier Series: Its Relation to Power Series
Recall: A power series is a series of the form

X
an x n = a0 + a1 x + a2 x 2 + . . . + an x n + . . . .
n=0

A Generalization of Power Series:


X
an x n = . . . + a−n x −n + . . . + a−2 x −2 + a−1 x −1 + a0 + a1 x + a2 x 2 + . . . + an x n + . . . .
n=−∞

A Further Generalization to Complex Numbers:


X
cn z n = . . . + c−n z −n + . . . + c−2 z −2 + c−1 z −1 + c0 + c1 z + c2 z 2 + . . . + cn z n + . . . .
n=−∞
A Further Generalization to Complex Numbers:


X
cn z n = . . . + c−n z −n + . . . + c−2 z −2 + c−1 z −1 + c0 + c1 z + c2 z 2 + . . . + cn z n + . . . .
n=−∞

Taking z = e ix , we obtain


X
cn e inx = . . . + c−n e −inx + . . . + c−2 e −i2x + c−1 e −ix + c0 + c1 e ix + c2 e i2x + . . . + cn e inx + . . . .
n=−∞

This is Fourier Series! Why? (Our Fourier series is only a special case of this series!)
A Bit of Complex Analysis

Let a and b be any real numbers. Consider the linear combination

a cos x + b sin x.

There is a unique pair of complex numbers c and d such that the linear combination

ce ix + de −ix = a cos x + b sin x.

(Prove!)

Let n be any integer. For any pair of real numbers a and b, there is a unique choice of complex
numbers c and d such that

ce inx + de −inx = a cos nx + b sin nx.


Consider a Fourier series

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

where a0 , a1 , b1 , a2 , b2 , . . . an , bn , . . . is a sequence of real numbers.

Then, for each n ≥ 1, we can find complex numbers cn and c−n such that

an cos nx + bn sin nx = cn e inx + c−n e −inx .

Hence we have
∞ ∞ ∞
1 X X X n
a0 + (an cos nx + bn sin nx) = cn e inx = cn e ix .
2 n=1 n=−∞ n=−∞
Properties of Sine and Cosine Functions

Let n be any integer.

Case 1: n = 0: Then Z π Z π
sin nx dx = 0 dx = 0.
−π −π

Case 2: n 6= 0: Then
Z π  π
− cos nx −1
sin nx dx = = [cos nπ − cos nπ] = 0
−π n −π n

and Z π  π
sin nx 1
cos nxdx = = [sin nπ + sin nπ] = 0.
−π n −π n
Properties of Sine and Cosine Functions

1
sin mx cos nx = [sin(m + n)x + sin(m − n)x]
2
1
cos mx cos nx = [cos(m + n)x + cos(m − n)x]
2
1
sin mx sin nx = [cos(m − n)x − cos(m + n)x]
2

Let m, n ≥ 1 be integers. Then

Z π
sin mx cos nx dx = 0
−π
Z π
cos mx cos nx dx = 0 (m 6= n)
−π
Z π
sin mx sin nx dx = 0 (m 6= n)
−π
Let n be any nonzero integer. Then
Z π
cos2 nx dx = π
−π

and
Z π
sin2 nx dx = π.
−π
Note
Suppose the Fourier series on the RHS of the equation below converges and has sum f (x):

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

Then


" #
Z π Z π
1 X
f (x) dx = a0 + (an cos nx + bn sin nx) dx
−π −π 2 n=1
Z π ∞  Z π Z π 
1 X
= a0 dx + an cos nx dx + bn sin nx dx
2 −π n=1 −π −π

But
Z π Z π
sin nx dx = 0 and cos nx dx = 0
−π −π
for n = 1, 2, 3, . . ..
So, we have
Z π
f (x) dx = a0 π
−π

Z π
1
=⇒ a0 = f (x) dx
π −π
Now

Z π " #
Z π
1 X
f (x) cos x dx = a0 + (an cos nx + bn sin nx) cos x dx
−π −π 2 n=1
Z π ∞  Z π Z π 
1 X
= a0 cos x dx + an cos x cos nx dx + bn cos x sin nx dx
2 −π n=1 −π −π

But

Z π Z π Z π
cos x dx = 0, cos x cos nx dx = 0 (n ≥ 2) and cos x sin nx dx = 0.
−π −π −π
So, we have
Z π Z π
f (x) cos x dx = a1 cos2 x dx = a1 π
−π −π

Z π
1
=⇒ a1 = f (x) cos x dx
π −π

Similarly, we have
Z π
1
an = f (x) cos nx dx (n ≥ 1)
π −π

and
Z π
1
bn = f (x) sin nx dx (n ≥ 1).
π −π
Summary

Suppose

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

Then, if the above convergence is uniform, we have

1 π
Z
a0 = f (x) dx
π −π
Z π
1
an = f (x) cos nx dx (n ≥ 1)
π −π
Z π
1
bn = f (x) sin nx dx (n ≥ 1)
π −π
Remarks

I In the preceding discussion, we assumed that we are given a convergent Fourier series
whose sum is f (x).
I In this case, if the convergence is uniform, then the coefficients an and bn can be derived
from the sum function f (x) by the formulas given for them.
I In the following slides, we assume that we are given an integrable function f (x) defined on
the interval −π ≤ x ≤ π. We use it find its Fourier Series, by finding the coefficients an
and bn from f (x).
The Fourier Series of a Function
Definition
Let f (x) be an integrable function defined on the interval −π ≤ x ≤ π. Then the coefficients
1 π
Z
a0 = f (x) dx
π −π
Z π
1
an = f (x) cos nx dx (n ≥ 1)
π −π
Z π
1
bn = f (x) sin nx dx (n ≥ 1)
π −π

are called the Fourier coefficients of the function f (x) and the corresponding trigonometric
series

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

is called the Fourier series of the function f (x).


Important Note

I The Fourier series of f (x) need not converge on the interval −π ≤ x ≤ π. Even if it
converges, its limit need not be f (x).
I If the Fourier series of f (x) converges uniformly to f (x), then its Fourier coefficients can
obviously be recovered from the sum function f (x).
I If the Fourier series converges, it defines a periodic function of period 2π over the entire
real line.
Example 1

Let f (x) be a function of period 2π such that



1, −π ≤ x < 0
f (x) =
0, 0≤x <π
1. Sketch the graph of f (x) in the interval −2π < x < 2π.
2. Show that the Fourier series for f (x) in the interval −π < x < π is
 
1 2 1 1
− sin x + sin 3x + sin 5x + · · ·
2 π 3 5

3. By giving an appropriate value of x, show that


π 1 1 1
= 1 − + − + ··· .
4 3 5 7
Solution: (1) The graph of the function:

f(x)

−2π −π π 2π x
(2) The Fourier series of the function:
Step 1:
Z π
1
a0 = f (x)dx
π −π
Z 0 Z π
1 1
= 1 · dx + 0 · dx
π −π π 0
Z 0
1
= 1 · dx
π −π
1  0
= x −π = 1.
π
Step 2:
Z π
1
an = f (x) cos nx dx
π −π
Z 0 Z π
1 1
= 1 · cos nx dx + 0 · cos nx dx
π −π π 0
Z 0
1
= 1 · cos nx dx
π −π
 0
1 sin nx
=
π n −π
1  
= sin 0 − sin(−nπ) = 0.

Step 3:
Z π
1
bn = f (x) sin nx dx
π −π
Z 0 Z π
1 1
= 1 · sin nx dx + 0 · sin nx dx
π −π π 0
Z 0
1
= sin nx dx
π −π
 0
1 cos nx
= −
π n −π
1
= − [cos 0 − cos(−nπ)]

1
= − [1 − (−1)n ].

2
Thus we have a0 = 1, an = 0 and bn = 0 if n is even and bn = − if n is odd.

Hence the Fourier series of the given function f (x) is


 
1 2 1 1
− sin x + sin 3x + sin 5x + · · · .
2 π 3 5
Dirichlet Conditions

Under what conditions does the Fourier series of f (x) converge to f (x)?

German mathematician Dirichlet gave a sufficiently broad sufficient conditions in 1829.


These conditions are called Dirichlet conditions.

Dirichlet Conditions
I f (x) is defined and bounded on −π ≤ x < π.
I f (x) has a finite number of discontinuities and a finite number of maxima and minima.
I f (x) is defined for other values of x by the periodicity condition f (x + 2π) = f (x).
Examples

Functions which pass/fail the Derichlet conditions:

Pass: sin x, x 2 and step functions on [−π, π).

1 1
Fail: tan x, sin and on [−π, π).
x x

Classwork:
1. Explain explicitly which properties the above functions fail to satisfy.
2. Give an example of a function which has an infinite number of maxima.
Note

If a bounded function f (x) defined on −π ≤ x ≤ π has only a finite number of discontinuities


and only a finite number of maxima and minima, then all its discontinuities are simple. This
means that f (x−) and f (x+) exist at every x and the points of continuity are those for which
f (x−) = f (x+).
Theorem (Dirichlet Theorem)
Assume that the Dirichlet conditions hold for f (x) on the interval −π ≤ x < π. Then the
Fourier series of f (x) converges to

1
[f (x−) + f (x+)]
2
at every point x and therefore it converges to f (x) at every point x of continuity of the
function.
Example 1 Contd.

(3) To show that


π 1 1 1
= 1 − + − + ··· .
4 3 5 7
Recall: For the periodic function f (x) defined
 by
1, −π ≤ x < 0
f (x) =
0, 0≤x <π

we obtained the Fourier series


 
1 2 1 1
− sin x + sin 3x + sin 5x + · · · .
2 π 3 5

The function f (x) is continuous at x = π/2.

So, by Dirichlet theorem, the Fourier of f (x) above converges to f (x) at x = π/2.
So, on substituting x = π/2 in the Fourier series of f (x) below,
 
1 2 1 1
− sin x + sin 3x + sin 5x + · · · ,
2 π 3 5

we have
           
π 1 2 π 1 3π 1 5π 1 7π
f = − sin + sin + sin + sin + ···
2 2 π 2 3 2 5 2 7 2

or, since f (π/2) = 0, we have


   
1 2 1 1 1 1 2 1 1 1
0= − 1 + (−1) + (1) + (−1) + · · · = − 1 − + − + ··· .
2 π 3 5 7 2 π 3 5 7

This implies that


π 1 1 1
= 1 − + − + ··· .
4 3 5 7
A Final Note on Example 1

Recall: The periodic function of period 2π defined by


1, −π ≤ x < 0
f (x) =
0, 0≤x <π

has the integer multiples of π as the only points of discontinuity.

Thus, by Dirichlet theorem, at these points of discontinuity, the Fourier series of f (x) has sum

1 1
[f (x−) + f (x+)] = .
2 2
Example 2

Let f (x) be a function of period 2π such that


(
0 −π ≤x <0
f (x) = .
x, 0 ≤ x < π

1. Sketch the graph of f (x) on the interval −3π ≤ x < 3π.


2. Find the Fourier series representation of f (x) on the interval −π ≤ x < π.
3. By giving appropriate values of x, show that
I π = 1 − 1 + 1 − 1 + ···
4 3 5 7
2
I π = 1 + 1 + 1 + 1 + ···
8 32 52 72
Solution: (1) The Graph of the Function:

f(x)

−3π −2π −π π 2π 3π x
(2) The Fourier Series of the Function:
Step 1:
Z π
1
a0 = f (x)dx
π −π
Z 0 Z π
1 1
= 0 · dx + x · dx
π −π π 0
1 π
Z
= xdx
π 0
 2 π
1 x
=
π 2 0
π
= .
2
Step 2:

Z π
1
an = f (x) cos nxdx
π −π
Z 0
1 π
Z
1
= 0 · cos nxdx + x · cos nxdx
π −π π 0
1 π
Z
= x cos nxdx
π 0
 π Z π 
1 sin nx sin nx
= x − dx
π n 0 n
  0 π 
1 1 cos nx
= 0− −
π n n 0
1
= [(−1)n − 1].
πn2
Step 3:
Z π
1
bn = f (x) sin nxdx
π −π
Z 0
1 π
Z
1
= 0 · sin nxdx + x · sin nxdx
π −π π 0
Z π
1
= x sin nxdx
π 0
 π Z π 
1 cos nx cos nx
= −x − − dx
π n 0 0 n
  π 
1 1 1 sin nx
= − [π cos nπ − 0] +
π n n n 0
1
= − π(−1)n + 0

1
= (−1)n+1 .
n
Thus the values of an , bn for different values of n are as follows:
n 1 2 3 4 5
2 2 1 2 1
an − 0 − 0 −
π π 32 π 52
1 1 1 1
bn 1 − −
2 3 4 5
Hence the required Fourier series is

     
1 π 2 2 1
f (x) = + − cos x + 0 cos 2x + − . 2 cos 3x + 0. cos 4x
2 2 π π 3
 
2 1 1 1
+ − . 2 cos 5x + · · · + sin x − sin 2x + sin 3x − · · ·
π 5 2 3
   
π 2 1 1 1 1
= − cos x + 2 cos 3x + 2 cos 5x + · · · + sin x − sin 2x + sin 3x − · · ·
4 π 3 5 2 3
π
3(a) A series for :
4

The given function satisfies the Dirichlet conditions on −π ≤ x < π and is continuous at
x = π/2. So, by Dirichlet theorem, the Fourier series of f (x) converges to f (π/2) = π/2 at
x = π/2.

So, we have
         
π π 2 π 1 π 1 π
f = − cos + 2 cos 3 + 2 cos 5 + ···
2 4 π 2 3 2 5 2
       
π 1 π 1 π
+ sin − sin 2 + sin 3 − ···
2 2 2 3 2
         
π 2 π 1 π 1 π
= − 0 + 0 + 0 + · · · + sin − sin 2 + sin 3 −···
4 π 2 2 2 3 2
| {z } | {z } | {z }
Thus 1 0 −1

π π 1 1 1
= + 1 − + − + ··· .
2 4 3 5 7
π2
3(b) A series for :
8
Again, by Dirichlet theorem, the Fourier series at x = 0 converges to f (0) = 0. So,

 
π 2 1 1
f (0) = − cos(0) + 2 cos(0) + 2 cos(0) + · · ·
4 π 3 5
 
1 1
+ sin(0) − sin(0) + sin(0) − · · ·
2 3

That is,
 
π 2 1 1 1
0= − 1 + 2 + 2 + 2 + ··· .
4 π 3 5 7

Hence

π2 1 1 1
= 1 + 2 + 2 + 2 + ···
8 3 5 7
Homework

Prove that
1 1 1 π2
1+ + + + · · · = .
22 32 42 6
Even and Odd Functions: Cosine and Sine Series

Let f (x) be a function defined on an evenly placed interval −a ≤ x ≤ a.


I The function f is said to be even if f (−x) = f (x) for all x.

Examples: 1, x 2 , x 4 and cos x

I The function f is said to be odd if f (−x) = −f (x) for all x.

Example: x, x 3 , sin x

Note: If f (x) is an odd function, then f (0) = 0.


Note

I If f (x) and g (x) are both even, then f (x)g (x) is even.
I If f (x) and g (x) are both odd, then f (x)g (x) is even.
I If one of f (x) and g (x) is even and the other is odd, then f (x)g (x) is odd.

Example: x 3 cos nx is odd as x 3 is odd and cos nx is even. So x 3 cos nx is odd.


Recall

I If f is an even function, then


Z a Z a
f (x) dx = 2 f (x) dx.
−a 0

I If f is an odd function, then Z a


f (x) dx = 0.
−a

Example: The function x 3 cos nx is odd. So


Z π
x 3 cos nx dx = 0.
−π
Sine and Cosine series

Theorem
Let f (x) be a function defined and integrable on −π ≤ x ≤ π.
I If f (x) is even, then its Fourier series has only cosine terms and the coefficients are given
by
2 π
Z
an = f (x) cos nx dx and bn = 0.
π 0

I If f (x) is odd, then its Fourier series has only sine terms and the coefficients are given by

2 π
Z
an = 0 and bn = f (x) sin nx dx.
π 0

Proof: Homework.
Examples
Example 1: The function f (x) = x is an odd function on −π ≤ x ≤ π. So, its Fourier series is
automatically a sine series. Indeed
 
sin 2x sin 3x
x = 2 sin x − + − · · · , −π < x < π.
2 3

(Prove!)

Example 2: The function f (x) = |x| is an even function on −π ≤ x ≤ π. So, its Fourier series
is automatically a cosine series. Indeed
 
π 4 cos 3x cos 5x
|x| = − cos x + + + · · · , −π ≤ x ≤ π.
2 π 32 52

(Prove!)
Extending any Function on 0 ≤ x ≤ π to an Even or Odd Function on
−π ≤ x ≤ π

Let f (x) be a function defined for 0 ≤ x ≤ π.


I It can be extended to an even function on −π ≤ x ≤ π by defining f (x) = f (−x) for
−π ≤ x < 0.
I It can be extended to an odd function on −π ≤ x ≤ π by defining f (x) = −f (−x) for
−π ≤ x < 0 and redefining f (x) = 0 if necessary.

The above observations imply the following theorem:

Theorem
If f (x) is an integrable function on the interval 0 ≤ x ≤ π, then it can be expanded both as a
sine series and as a cosine series on this interval.
Example
Find the sine series, and also the cosine series, for the function f (x) = cos x, 0 ≤ x ≤ π.

Solution: To obtain the sine series, we just assume that f (x) has been extended to an odd
function (We do not really bother to extend!). So, we will have

2 π
Z
an = 0 and bn = f (x) sin nx dx.
π 0

For n = 1, we have b1 = 0. (Why?)


2n 1 + (−1)n
 
For n > 1, we obtain bn = . (Prove!)
π n2 − 1
So,
8n
b2n−1 = 0 and b2n = .
π(4n2 − 1)

Thus the sine series is



8 X n sin 2nx
cos x = , 0 < x < π.
π n=0 4n2 − 1
To obtain the cosine series, assume that f (x) has been extended to an even function. So,

2 π
Z
an = f (x) cos nx dx and bn = 0.
π 0

Now, Z π
2 1, n = 1
an = cos x sin nx dx =
π 0 6 1
0, n =

Thus the cosine series for cos x is simply cos x.


Homework

Find the sine series and the cosine series of the constant function f (x) = π/4.
Extension to Arbitrary Intervals −L ≤ x ≤ L

In many applications, it is desirable to express a function f (x) defined on an interval


−L ≤ x ≤ L as a trigonometric series where L 6= π.
This can be easily effected by a change of variable:

Introduce a new variable t that varies from −π to π as x varies from −L to L:


πx Lt
t= ⇒ x= .
L π
Now put
Lt
x=
π
in the function f (x) to obtain a function
 
Lt
g (t) = f , −π ≤ t ≤ π
π
and proceed with finding the Fourier series of g (t), −π ≤ t ≤ π:

1 X
g (t) = a0 + (an cos nt + bn sin nt)
2 n=0

And finally replace t by


πx
L
in the Fourier series found:
∞ 
1 X nπx nπx 
f (x) = a0 + an cos + bn sin .
2 n=0
L L
Example
Find the Fourier series of the function
(
0, −2 ≤ x < 0
f (x) =
5, 0 ≤ x ≤ 2.

Solution: The graph of the function:


f(x)

−4 −2 2 4 x
Here Z 2 Z 2
1 1
a0 = f (x)dx = 5dx = 5.
2 −2 2 0

Z 2 

1 nπx
an = f (x) cos
2 −2 2
Z 2  
1 nπx
= 5 cos dx
2 0 2
2
5 2 sin nπx
  
2 5 2nπ 0nπ
= = sin − sin =0
2 nπ 0 nπ 2 2

Z 2 
1 nπx
bn = f (x) sin
2 −2 2
Z 2  
1 nπx
= 5 sin dx
2 0 2
2
5 −2 cos nπx

2
=
2 nπ
Example

Using these coefficient, we have the Fourier series


a0 X nπx nπx
f (x) = + an cos + bn sin
2 n=0
2 2
∞  
5 X 5 nπx
= + (1 − (−1)n ) sin
2 n=0 nπ 2
 
5 10 πx 1 3πx 1 5πx 1 7πx
= + sin + sin + sin + sin + ··· .
2 π 2 3 2 5 2 7 2
Homework
1. Find the Fourier series of the following functions:
1.1 (
−3, −2 ≤ x < 0
f (x) =
3, 0≤x <2

1.2 (
1 + x, −1 ≤ x < 0
f (x) =
1 − x, 0≤x ≤1
1.3
f (x) = |x|, −2 ≤ x ≤ 2.
2. Show that

1 LX 2nπx
L−x = sin , 0 < x < L.
2 π n=1 L

3. Find the cosine series for the function


(
2, 0 ≤ x ≤ 1
f (x) =
0, 1 < x ≤ 2

You might also like