Está en la página 1de 22

F32CO5: Wave phenomena

(F32FOU: Fourier methods)


Fourier 3: Trigonometric form of Fourier series II
Dr. Anne Green
anne.green@nottingham.ac.uk

O) recap of Fourier 2
A) calculation of coefficients for square wave
B) Dirichlet conditions RHB 12.1
C) discontinuities RHB 12.4
D) odd and even functions RHB 12.3
E) analytic continuation RHB 12.5
F) graphical representation

O) recap of Fourier 2
A periodic functions, f (x) = f (x + L) , can be written as a Fourier
series. The trigonometric form is a sum of cos and sine waves:
1
X

a0
f (x) =
+
ar cos
2
r=1

2 rx
L

+ br sin

2 rx
L

The coefficients a0, ar and br are calculated using:

Z x0 +L
2
2 rx
ar =
f (x) cos
dx
L x0
L

2
br =
L

x0 +L

f (x) sin
x0

2 rx
L

dx

The expression for a0 can be found by setting r=0 in the expression for ar:

2
a0 =
L

x0 +L
x0

f (x) dx

A) calculation of coefficients of square wave


Finally lets calculate the coefficients for our square wave
example:

f (x) =

0
1

for -1 < x < 0


for 0 < x < 1

ar = 0

a0 = 1

br =

even r

2
r

odd r

1
X

a0
f (x) =
+
ar cos
2
r=1
L=2 so
1
= +
2
=

1
+
2

r=0

e.g.

2 rx
L

b1 =

+ br sin

b2 = 0,

2 rx
L

b3 =

2
, ...
3

2
k0 =
=
L

sin (3 x)
sin ( x) +
+ ....
3

X
1
2
j=0

1
sin ((2j + 1) x)
2j + 1

When j=0,1,2,3,... (2j+1)=1,3,5,7,..... so we just get the odd terms in the sum as
required.
Could instead have used (2j-1) and started the sum from j=1.

X
19
1
2
sin ((2j + 1) x)
= +
2
(2j + 1)
j=0

Why are weird things happening at x=0, 1, 2 etc.?


Why do we only need sine (and not cos) terms in the Fourier series?

B) Dirichlet conditions RHB 12.1


If a function f(x):
i) is periodic ( f (x) = f (x + L) ),
ii) is single valued and continuous (except possibly at a finite
number of finite discontinuities),
iii) has only a finite number of maxima and minima within one
period,
iv) the integral over one period of |f(x)| converges,
then it can be expanded as a Fourier series which converges to f(x)
at all points where f(x) is continuous.
6

What about our square wave?

f (x) =

i) periodic?

0
1

for -1 < x < 0


for 0 < x < 1

YES

ii) single valued and continuous?

NO, but finite number


of finite discontinuities

iii) finite number of maxima and minima within one period?

YES

iv) the integral of modulus over one period converges?

YES
7

C) discontinuities RHB 12.4


What happens at discontinuities?
a) Value of Fourier series at discontinuity converges to the mean of
the values of the function immediately above and below the
discontinuity:

1
f (xd ) lim
2

0 [f (xd

+ ) + f (xd

)]

For our square wave example?

b) Gibbs phenomenon: close to the discontinuity the Fourier


series overshoots.
As the number of terms included in the Fourier series is
increased the position of the overshoot moves closer to the
discontinuity (but it never disappears, even in the limit of an
infinite number of terms).
square wave example:

5 terms

10 terms

20 terms

D) odd and even functions RHB 12.1 and 12.3


def:

A function is even if f (x) = f ( x)

graph for negative x is graph for


positive x reflected in y-axis
______ function
........... x and y axes

e.g.
f (x) = x2

2
2
is even since f ( x) = ( x) = x = f (x)

f(x) = cos(x) is even since cos(-x)=cos(x)


10

def:

A function is odd if f (x) =

f ( x)

graph for negative x is graph for


positive x reflected in x and y-axes
______ function
........... x and y axes
........... function reflected
in y axis

e.g.

f (x) = x

is odd since

f ( x) =

x=

f (x)

f(x)= sin(x) is odd since sin(-x)=-sin(x)


11

Are the following functions odd, even or neither?

12

Are the following functions odd, even or neither?

ODD

NEITHER

f (x) = x

EVEN

f (x) = |x|

13

Are the following functions odd, even or neither?


x2
tan
a)
b) x +
2

14

The Fourier series of an even function only contains cosine


terms (i.e. br=0 for all r) and
2
ar =
L

L/2

f (x) cos
L/2

2 rx
L

4
dx =
L

L/2

f (x) cos
0

2 rx
L

dx

The Fourier series of an odd function only contains sine


terms (i.e. ar=0 for all r) and
2
br =
L

L/2

f (x) sin
L/2

2 rx
L

4
dx =
L

L/2

f (x) sin
0

2 rx
L

dx

(see appendix A of summary notes for derivation of these results)

Thinking about whether a function is odd or even before


calculating the Fourier series will save you doing unnecessary
calculations (i.e. calculating coefficients which must be zero).
15

What about our square wave?

f (x) = f ( x) and f (x) =

f ( x) so its neither odd nor

even.

16

What about our square wave?

f (x) = f ( x) and f (x) =

f ( x) so its neither odd nor

even.

However if we subtracted the average value (a0/2 =1/2) then it


would be odd, therefore ar = 0 for r > 0 .

1
= +
2

sin (3 x)
sin ( x) +
+ ....
3
17

E) analytic continuation RHB 12.5


If a function is only specified over a finite range, then we need to
extend it outside the specified range to make it periodic. This is
known as analytic continuation.

period L

2L

odd period 2L

2L

2L

even period 2L

The Fourier series then correctly represents the original function


over the originally specified range.
Can sometime choose to make the extended function odd or even
(which reduces the number of calculations required).
Period of function (e.g. L or 2L) may depend on how its extended.
Extension should ideally be continuous at end-points (if not series wont
converge to required value there).

18

F) graphical representation
Can display Fourier coefficients, ar and br, graphically (and visualize
how much of each harmonic is required).

For the square wave example:

1
= +
2

a0 = 1

br =

ar

sin (3 x)
sin ( x) +
+ ....
3

ar = 0
2
r

odd r

r=0

even r

br
envelope:

2
r

n.b. r is an integer and only takes discrete values r=0,1,2,3,...

19

Summary Fourier 3: Trigonometric form of Fourier series II


B) Dirichlet conditions RHB 12.1
If function f(x):
is periodic,
has finite number of discontinuities,
has finite number of maxima and minima per period,
the integral of modulus over period is finite,
then the function can be expanded as a Fourier series which converges to
f(x) at all points where f(x) is continuous.
C) discontinuities RHB 12.4
Series converges towards mean of values above & below discontinuity:

1
f (x) lim
2

[f (xd + ) + f (xd

)]

Gibbs phenomena (overshoot near discontinuity):


20

D) even and odd functions RHB 12.1 and 12.3

f (x) = f ( x)

even, only cosine terms in Fourier series, br=0

4
ar =
L

f (x) =

f ( x)

L/2

f (x) cos
0

2 rx
L

dx

odd, only sine terms in Fourier series, ar=0

4
br =
L

L/2

f (x) sin
0

2 rx
L

dx

E) analytic continuation RHB 12.5


Is continuing function outside specified range so that it is periodic.
Can often chose to do this in a way which simplifies the calculations
(i.e. if analytic continuation is odd then ar = 0 for all r).
F) graphical representation

A plot of the Fourier coefficients ar and br as a function of r.


21

After this lecture you should:


know:
Dirichlet conditions
definition of odd and even functions

be able to:
calculate the FS of a simple function
describe what happens to the FS at a discontinuity in the function
determine whether a function is odd, even or neither
plot the coefficients of a FS
analytically continue a function

22

También podría gustarte