Lesson 3 Approximating Fourier series 1 Last lecture, we saw that - - PowerPoint PPT Presentation

lesson 3 approximating fourier series
SMART_READER_LITE
LIVE PREVIEW

Lesson 3 Approximating Fourier series 1 Last lecture, we saw that - - PowerPoint PPT Presentation

Lesson 3 Approximating Fourier series 1 Last lecture, we saw that the trapezoidal rule was an effective method for calculating integrals of periodic functions We used the EulerMcLaurin formula to prove that the error decayed faster


slide-1
SLIDE 1

Lesson 3 Approximating Fourier series

1

slide-2
SLIDE 2

2

  • Last lecture, we saw that the trapezoidal rule was an effective method for calculating

integrals of periodic functions We used the Euler–McLaurin formula to prove that the error decayed faster than O 1

  • for any α
  • In this lecture, we will apply this to calculating Fourier coefficients and Fourier series
  • This is practical function approximation
slide-3
SLIDE 3

3

  • Given an integrable function f defined on T = [−π, π), the following exist for

every integer k: ˆ fk = 1 2π π

−π

f(θ)−kθ x

  • We can formally define the Fourier series of f:

f(θ) ∼

  • k=−∞

ˆ fkkθ This sum will converge uniformly to f for periodic smooth functions

slide-4
SLIDE 4

4

  • 3
  • 2
  • 1

1 2 3

  • Define the m evenly spaced points on the periodic interval θ = (θ1, . . . , θm):

θ :=

  • −π,

2 m − 1

  • π, . . . ,
  • 1 − 2

m

  • π
  • =
  • We can approximate the Fourier coefficients using the

point trapezoidal rule

slide-5
SLIDE 5

5

  • 3
  • 2
  • 1

1 2 3

  • Define the m evenly spaced points on the periodic interval θ = (θ1, . . . , θm):

θ :=

  • −π,

2 m − 1

  • π, . . . ,
  • 1 − 2

m

  • π
  • =
  • We can approximate the Fourier coefficients using the m point trapezoidal rule

ˆ fk = 1 2π π

−π

f(θ) θ ≈ 1 m

m

  • j=1

f(θj)−kθj =: ˆ f m

k

slide-6
SLIDE 6

6

  • Using these, and truncating the Fourier sum between integers α and β we obtain

an approximate Fourier series f(θ) ≈ fα,β,m(θ) :=

β

  • k=α

ˆ f m

k kθ

  • Big question: how to choose α, β and m?
  • When we specify just

and , we will choose to be the same as the number

  • f coefficients
  • When we specify just

, we will choose roughly equal number of negative and positive coefficients:

  • dd

even

slide-7
SLIDE 7

7

  • Using these, and truncating the Fourier sum between integers α and β we obtain

an approximate Fourier series f(θ) ≈ fα,β,m(θ) :=

β

  • k=α

ˆ f m

k kθ

  • Big question: how to choose α, β and m?
  • When we specify just α and β, we will choose m to be the same as the number
  • f coefficients

fα,β(θ) := fα,β,β−α+1(θ)

  • When we specify just

, we will choose roughly equal number of negative and positive coefficients:

  • dd

even

slide-8
SLIDE 8

8

  • Using these, and truncating the Fourier sum between integers α and β we obtain

an approximate Fourier series f(θ) ≈ fα,β,m(θ) :=

β

  • k=α

ˆ f m

k kθ

  • Big question: how to choose α, β and m?
  • When we specify just α and β, we will choose m to be the same as the number
  • f coefficients

fα,β(θ) := fα,β,β−α+1(θ)

  • When we specify just m, we will choose roughly equal number of negative and

positive coefficients: fm(θ) :=

  • f 1−m

2

, m−1

2

,m(θ)

m odd f− m

2 , m 2 −1,m(θ)

m even

slide-9
SLIDE 9

Experimental results

9

slide-10
SLIDE 10

10

θ

  • 3
  • 2
  • 1

1 2 3 q 5 10

m = 5

slide-11
SLIDE 11

11

θ

  • 3
  • 2
  • 1

1 2 3 q 5 10

m = 5

  • 3
  • 2
  • 1

1 2 3 q 0.5 1.0 1.5 2.0 2.5 3.0

m = 5

|θ − .1|

slide-12
SLIDE 12

12

  • 3
  • 2
  • 1

1 2 3 q

  • 1.0
  • 0.5

0.5 1.0

m = 5

θ

  • 3
  • 2
  • 1

1 2 3 q 5 10

m = 5

20 π θ

  • 3
  • 2
  • 1

1 2 3 q 0.5 1.0 1.5 2.0 2.5 3.0

m = 5

|θ − .1| (θ − .1)

  • 3
  • 2
  • 1

1 2 3 q

  • 1.0
  • 0.5

0.5 1.0 1.5

m = 5

  • 3
  • 2
  • 1

1 2 3 q

  • 1.0
  • 0.5

0.5 1.0

m = 5

  • 3
  • 2
  • 1

1 2 3 q

  • 0.5

0.5 1.0

m = 5

2 θ

slide-13
SLIDE 13

13

θ 20 π θ |θ − .1| (θ − .1) 5θ

  • 3
  • 2
  • 1

1 2 3 q

  • 0.4
  • 0.2

0.2 0.4 0.6 0.8 1.0

m = 10

  • 3
  • 2
  • 1

1 2 3 q

  • 1.0
  • 0.5

0.5 1.0

m = 10

2 θ

  • 3
  • 2
  • 1

1 2 3 q

  • 1.0
  • 0.5

0.5 1.0

m = 10

  • 3
  • 2
  • 1

1 2 3 q 0.5 1.0 1.5 2.0 2.5 3.0

m = 10

  • 3
  • 2
  • 1

1 2 3 q

  • 1.0
  • 0.5

0.5 1.0

m = 10

  • 3
  • 2
  • 1

1 2 3 q 5 10 15

m = 10

slide-14
SLIDE 14

14

θ 20 π θ |θ − .1| (θ − .1) 5θ

  • 3
  • 2
  • 1

1 2 3 q

  • 0.4
  • 0.2

0.2 0.4 0.6 0.8 1.0

m = 100

  • 3
  • 2
  • 1

1 2 3 q

  • 1.0
  • 0.5

0.5 1.0

m = 100

2 θ

  • 3
  • 2
  • 1

1 2 3 q

  • 1.0
  • 0.5

0.5 1.0

m = 100

  • 3
  • 2
  • 1

1 2 3 q 0.5 1.0 1.5 2.0 2.5 3.0

m = 100

  • 3
  • 2
  • 1

1 2 3 q

  • 1.0
  • 0.5

0.5 1.0

m = 100

  • 3
  • 2
  • 1

1 2 3 q 5 10 15 20 25

m = 100

slide-15
SLIDE 15

15

  • Observed convergence properties:

Fast convergence for periodic functions, just like trapezoidal rule Slow convergence for non-periodic functions away from singularities No convergence in neighbourhood of jump singularities (including ±π)

  • We also observed interpolation at the quadrature points θ
  • To understand this, we need to related the approximate Fourier coefficients ˆ

f m

k

to the true Fourier coefficients ˆ fk

  • This will follow naturally from orthogonality properties of θ
slide-16
SLIDE 16

Orthogonality of complex exponentials

16

slide-17
SLIDE 17

17

The L2 inner product and norm

  • We define the 2 inner product (on T) by

f, g = 1 2π π

−π

¯ f(θ)g(θ) θ

  • Associated with this inner product is the 2 norm:

f =

  • 1

2π π

−π

|f(θ)|2 θ

  • 2 space is all integrable functions f such that f <

Exercise: verify 2 is a vector space and f, g is an inner product on 2

slide-18
SLIDE 18

18

  • A set of nonzero vectors v1, . . . , vn in a vector space V are called orthogonal if

vi, vj = 0 whenever i = k.

  • They are called orthonormal if they are orthogonal and all vectors are of unit norm:

, or equivalently,

  • For orthonormal vectors

, we can construct a projection of a vector into

  • by

If

  • then

is equal to its projection: In other words

slide-19
SLIDE 19

19

  • A set of nonzero vectors v1, . . . , vn in a vector space V are called orthogonal if

vi, vj = 0 whenever i = k.

  • They are called orthonormal if they are orthogonal and all vectors are of unit norm:

1 = vi , or equivalently, vi, vi = 1.

  • For orthonormal vectors

, we can construct a projection of a vector into

  • by

If

  • then

is equal to its projection: In other words

slide-20
SLIDE 20

20

  • A set of nonzero vectors v1, . . . , vn in a vector space V are called orthogonal if

vi, vj = 0 whenever i = k.

  • They are called orthonormal if they are orthogonal and all vectors are of unit norm:

1 = vi , or equivalently, vi, vi = 1.

  • For orthonormal vectors vk, we can construct a projection of a vector f V into

{v1, . . . , vn} by Pf :=

n

  • k=1

vk, f vk If

  • then

is equal to its projection: In other words

slide-21
SLIDE 21

21

  • A set of nonzero vectors v1, . . . , vn in a vector space V are called orthogonal if

vi, vj = 0 whenever i = k.

  • They are called orthonormal if they are orthogonal and all vectors are of unit norm:

1 = vi , or equivalently, vi, vi = 1.

  • For orthonormal vectors vk, we can construct a projection of a vector f V into

{v1, . . . , vn} by Pf :=

n

  • k=1

vk, f vk If f {v1, . . . , vn} then f is equal to its projection: f = Pf In other words P2f = Pf

slide-22
SLIDE 22

22

  • We have
  • kθ, kθ

= 1 2π π

−π

θ = 1 and for k = j

  • kθ, jθ

= 1 2π π

−π

(j−k)θ θ = (j−k)π −(j−k)π 2π(j k) = 0

  • In other words, the complex exponentials are orthonormal!
  • Thus we can think of the Fourier series as an infinite projection

f(θ)

  • k=−∞
  • kθ, f

Since this sum is infinite, we cannot appeal to the simple argument of equality from the last slide

slide-23
SLIDE 23

Discrete orthogonality of complex exponentials

23

slide-24
SLIDE 24

24

  • We have shown that the complex exponentials are orthogonal with respect to the

inner product f, g = 1 2π

¯ f(θ)g(θ) θ

  • A remarkable fact we now show is that they are also orthogonal with respect to

the following discrete semi-inner product: f, gm = 1 m

m

  • j=1

¯ f(θj)g(θj) = f(θ)g(θ) m where θ = (θ1, . . . , θm) are again evenly spaced points: θ =

  • π,

2 m 1

  • π, . . . ,
  • 1 2

m

  • π
  • =
  • 3
  • 2
  • 1

1 2 3

slide-25
SLIDE 25

25

Evenly spaced points on the unit circle

eiθ

  • 1.0
  • 0.5

0.5 1.0

  • 1.0
  • 0.5

0.5 1.0

  • 3
  • 2
  • 1

1 2 3

θ = (θ1, . . . , θm) z = (z1, . . . , zm)

slide-26
SLIDE 26

26

Some identities (shown for even m):

z

m

  • j=1

eiθj =

m

  • j=1

zj = 0

  • 1.0
  • 0.5

0.5 1.0

  • 1.0
  • 0.5

0.5 1.0

slide-27
SLIDE 27

27

Some identities (shown for even m):

z

m

  • j=1

ei2θj =

m

  • j=1

z2

j = 0

  • 1.0
  • 0.5

0.5 1.0

  • 0.5

0.5

slide-28
SLIDE 28

28

:

m

  • j=1

kθj = (−)km for k = . . . , −2m, −m, 0, m, 2m . . .

m

  • j=1

kθj = 0 for all other integer k

slide-29
SLIDE 29
  • Note that

zj = −2π(j−1)/m = −ωj−1 for ω = 11/m = 2π/m

  • Therefore,
  • If

is a multiple of , then we have

slide-30
SLIDE 30
  • Note that

zj = −2π(j−1)/m = −ωj−1 for ω = 11/m = 2π/m

  • Therefore,

m

  • j=1

zk

j = (−)k m−1

  • j=0

ωkj

  • If

is a multiple of , then we have

slide-31
SLIDE 31
  • Note that

zj = −2π(j−1)/m = −ωj−1 for ω = 11/m = 2π/m

  • Therefore,

m

  • j=1

zk

j = (−)k m−1

  • j=0

ωkj

  • If k = αm is a multiple of m, then we have

m−1

  • j=0

ωkj =

m−1

  • j=0

(ωm)αj =

m−1

  • j=0

1αj = m

slide-32
SLIDE 32
  • Note that

zj = −2π(j−1)/m = −ωj−1 for ω = 11/m = 2π/m

  • Therefore,

m

  • j=1

zk

j = (−)k m−1

  • j=0

ωkj

  • If k = αm is a multiple of m, then we have

m−1

  • j=0

ωkj =

m−1

  • j=0

(ωm)αj =

m−1

  • j=0

1αj = m

  • For k not a multiple of m, recall the geometric sum formula:

m−1

  • j=0

zj = zm − 1 z − 1

  • Thus
  • Because

is not a multiple of , the denominator is nonzero

  • Because

, the numerator is zero

slide-33
SLIDE 33
  • Note that

zj = −2π(j−1)/m = −ωj−1 for ω = 11/m = 2π/m

  • Therefore,

m

  • j=1

zk

j = (−)k m−1

  • j=0

ωkj

  • If k = αm is a multiple of m, then we have

m−1

  • j=0

ωkj =

m−1

  • j=0

(ωm)αj =

m−1

  • j=0

1αj = m

  • For k not a multiple of m, recall the geometric sum formula:

m−1

  • j=0

zj = zm − 1 z − 1

  • Thus

m−1

  • j=0

ωkj =

m−1

  • j=0

(ωk)j = ωkm − 1 ωk − 1

  • Because

is not a multiple of , the denominator is nonzero

  • Because

, the numerator is zero

slide-34
SLIDE 34
  • Note that

zj = −2π(j−1)/m = −ωj−1 for ω = 11/m = 2π/m

  • Therefore,

m

  • j=1

zk

j = (−)k m−1

  • j=0

ωkj

  • If k = αm is a multiple of m, then we have

m−1

  • j=0

ωkj =

m−1

  • j=0

(ωm)αj =

m−1

  • j=0

1αj = m

  • For k not a multiple of m, recall the geometric sum formula:

m−1

  • j=0

zj = zm − 1 z − 1

  • Thus

m−1

  • j=0

ωkj =

m−1

  • j=0

(ωk)j = ωkm − 1 ωk − 1

  • Because k is not a multiple of m, the denominator is nonzero
  • Because ωkm = (ωm)k = 1k, the numerator is zero
slide-35
SLIDE 35
  • kθ, jθ

m = (−1)j−k

  • j − k = . . . , −2m, −m, 0, m, 2m, . . .
  • kθ, jθ

m = 0

  • kθ, jθ

m = 1

m

m

  • j=1

(j−k)θj