Vous êtes sur la page 1sur 27

Fourier Series

Joseph Fourier

Fourier was
obsessed with the
physics of heat and
developed the
Fourier series and
transform to model
heat-flow problems.

Joseph Fourier 1768 - 1830


Introduction to Fourier Series

a0 + a1 cos( x )
f (x)

... + a2 cos(2 x )
=

... + a3 cos(3 x )

...

... + an cos(nx ) + ...


f

T
f

T
Even and Odd Functions
(We are not talking about even or
odd numbers.)
Even The value of
Functions the function
would be the
same when we
walk equal
distances along
the X-axis in
opposite
directions.
Mathematically speaking -
f (− θ ) = f (θ )
Odd Functions The value of
the function
would change
its sign but with
the same
magnitude when
we walk equal
distances along
the X-axis in
opposite
Mathematically speaking directions.
f − θ = − f- θ
(− θ ) = − (θ )
Even functions can solely be represented
by cosine waves because, cosine waves
are even functions. A sum of even
functions is another even function.
5

5
10 0 10

θ
Odd functions can solely be represented by
sine waves because, sine waves are odd
functions. A sum of odd functions is another
odd function.
5

10 0 10

θ
Fourier series
A Fourier series is a convenient
representation of a periodic
function.
A Fourier series consists of a
sum of sines and cosine terms.
Sines and cosines are the most
fundamental periodic functions.
Fourier series

The formula for a Fourier series


is:
n =∞
  2nπx   2nπx  
f ( x) = a0 + ∑  an cos  + bn sin   
n =1   T   T 
Fourier series

We have formulae for the


coefficients

T
2
1
a0 =
T ∫ f ( x)dx
T

2
T

 2nπx 
2
2
an =
T ∫T f ( x ) cos
 T 
dx

2
T

 2nπx 
2
2
bn =
T ∫T f ( x ) sin 
 T 
dx

2
Summary of finding
coefficients
function function function
even odd neither
T T
2 2
1 1
a0 = ∫ f ( x)dx a0 = ∫ f ( x)dx
a0 T

Though maybe easy to find


T
2 0 T

Though maybe easy to find


T
2

using geometry using geometry

T T

 2nπx   2nπx 
2 2
2 2
an an =
T ∫ f ( x) cos

T
2
T 
dx
0 an =
T ∫ f ( x) cos

T
2
T 
dx

T T

 2nπx   2nπx 
2 2
bn 0 bn =
2
T ∫ f ( x) sin T 
dx bn =
2
T ∫ f ( x) sin T 
dx
T T
− −
2 2
Example – Fourier series

Example – Find the coefficients


for the Fourier series of:

− x − π ≤ x ≤ 0
f ( x) = 
 x 0≤ x≤π
f ( x + 2π ) = f ( x)

f ( x)

π
Fundamental
range

x
0 2π 4π
Period = 2π
Example – Fourier series f ( x)

Find a0 x
0 2π 4π
T
2 π
1 1
a0 =
T ∫T f ( x)dx 0 2π
⇒ a = ∫π f ( x)dx


2

f (x) is an even function so:


π π
1 1
a0 =
2π ∫π f ( x)dx

⇒ a0 =
π ∫ f ( x)dx
0

π π
1 1 x  π 2
⇒ a0 = ∫ xdx ⇒ a0 =   ⇒ a0 =
π 0 π  2 0 2
Example – Fourier series

Find an
T
π
 2nπx   2nπx 
2
2 1
an =
T ∫T f ( x ) cos
 T 
 dx ⇒ a n =
π ∫−π f ( x ) cos
 2π 
dx

2

Since both functions are even their product


is even:
π π
1 2
an =
π ∫π f ( x) cos(nx )dx

⇒ an =
π ∫ x cos(nx )dx
0
Example – Fourier series

Find bn
T
π
 2nπx   2nπx 
2
2 1
bn =
T ∫T f ( x ) sin 
 T 
 dx ⇒ bn =
π ∫−π f ( x ) sin 
 2π 
dx

2

Since sine is an odd function and f (x) is an


even function, the product of the functions
is odd:
π
1
bn =
π ∫π f ( x) sin (nx )dx

⇒ bn = 0
Example – Fourier series

So we can put the coefficients


back into the Fourier series
formula:
n =∞
  2nπx   2nπx  
f ( x) = a0 + ∑  an cos  + bn sin   
n =1   T   T 
π  2n =∞

2 n =1  πn
( ) (
⇒ f ( x) = + ∑  2 − 1 − 1 cos nx 
n
( ) )

π 4 4
⇒ f ( x) = − cos( x ) + 0 − cos(3x ) + K
2 π 9π
Partial Sums

The Fourier series gives the


exact value of the function.
However, it uses an infinite
number of terms, so is
impossible to calculate.
We can evaluate the partial
sums of a Fourier series by only
evaluating a set number of the
terms.
Partial Sums

For partial sums we use the


notation:
n= N
  2nπx   2nπx  
S N ( x ) = a0 + ∑  an cos  + bn sin   
n =1   T   T 

To represent a partial sum


with N terms.
Example 1 – Partial Sums

Compare the plots of the partial


sums with the original function:

N =1 N =3

N =5 N = 11
Example 1 – Partial Sums

Compare the plots of the partial


sums with the original function:

N = 100 N = 1000
Example 1 – Partial Sums

Compare the plots of the partial


sums with the original function:

N =1 N =3

N =9 N = 25

Vous aimerez peut-être aussi