lesson 3 approximating fourier series
play

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


  1. Lesson 3 Approximating Fourier series 1

  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 � 1 than O for any α � n α • In this lecture, we will apply this to calculating Fourier coefficients and Fourier series • This is practical function approximation 2

  3. • Given an integrable function f defined on T = [ − π , π ) , the following exist for every integer k : � π f k = 1 ˆ f ( θ ) � − � k θ � x 2 π − π • We can formally define the Fourier series of f : ∞ ˆ � f k � � k θ f ( θ ) ∼ k = −∞ � This sum will converge uniformly to f for periodic smooth functions 3

  4. � � • Define the m evenly spaced points on the periodic interval θ = ( θ 1 , . . . , θ m ) : � 2 � � � � � 1 − 2 θ := m − 1 = − π , π , . . . , π - 3 - 2 - 1 0 1 2 3 m • We can approximate the Fourier coefficients using the point trapezoidal rule 4

  5. • Define the m evenly spaced points on the periodic interval θ = ( θ 1 , . . . , θ m ) : � 2 � � � � � 1 − 2 θ := m − 1 = − π , π , . . . , π - 3 - 2 - 1 0 1 2 3 m • We can approximate the Fourier coefficients using the m point trapezoidal rule � π m f k = 1 f ( θ ) � θ ≈ 1 f ( θ j ) � − k θ j =: ˆ ˆ � f m k 2 π m − π j =1 5

  6. • Using these, and truncating the Fourier sum between integers α and β we obtain an approximate Fourier series β ˆ � f m k � � k θ f ( θ ) ≈ f α , β ,m ( θ ) := k = α • Big question: how to choose α , β and m ? • When we specify just and , we will choose to be the same as the number of coefficients • When we specify just , we will choose roughly equal number of negative and positive coefficients: odd even 6

  7. • Using these, and truncating the Fourier sum between integers α and β we obtain an approximate Fourier series β ˆ � f m k � � k θ f ( θ ) ≈ f α , β ,m ( θ ) := k = α • Big question: how to choose α , β and m ? • When we specify just α and β , we will choose m to be the same as the number of coefficients f α , β ( θ ) := f α , β , β − α +1 ( θ ) • When we specify just , we will choose roughly equal number of negative and positive coefficients: odd even 7

  8. • Using these, and truncating the Fourier sum between integers α and β we obtain an approximate Fourier series β ˆ � f m k � � k θ f ( θ ) ≈ f α , β ,m ( θ ) := k = α • Big question: how to choose α , β and m ? • When we specify just α and β , we will choose m to be the same as the number of coefficients f α , β ( θ ) := f α , β , β − α +1 ( θ ) • When we specify just m , we will choose roughly equal number of negative and positive coefficients: � m odd ,m ( θ ) f 1 − m , m − 1 f m ( θ ) := 2 2 m even 2 − 1 ,m ( θ ) f − m 2 , m 8

  9. Experimental results 9

  10. � θ m = 5 10 5 q - 3 - 2 - 1 1 2 3 10

  11. � θ m = 5 10 5 q - 3 - 2 - 1 1 2 3 | θ − . 1 | m = 5 3.0 2.5 2.0 1.5 1.0 0.5 q - 3 - 2 - 1 1 2 3 11

  12. ��� 20 � θ π θ ��� 5 θ m = 5 m = 5 m = 5 1.0 1.0 0.5 10 0.5 q q - 3 - 2 - 1 1 2 3 - 3 - 2 - 1 1 2 3 5 - 0.5 - 0.5 q - 3 - 2 - 1 1 2 3 - 1.0 - 1.0 ��� 2 ��� θ | θ − . 1 | ��� ( θ − . 1) m = 5 m = 5 m = 5 1.0 1.5 3.0 2.5 1.0 0.5 2.0 0.5 1.5 q - 3 - 2 - 1 1 2 3 q 1.0 - 3 - 2 - 1 1 2 3 - 0.5 0.5 - 1.0 - 0.5 q - 3 - 2 - 1 1 2 3 12

  13. ��� 20 � θ π θ ��� 5 θ m = 10 m = 10 m = 10 1.0 1.0 15 0.5 0.5 10 q q - 3 - 2 - 1 1 2 3 - 3 - 2 - 1 1 2 3 5 - 0.5 - 0.5 q - 3 - 2 - 1 1 2 3 - 1.0 - 1.0 ��� 2 ��� θ | θ − . 1 | ��� ( θ − . 1) m = 10 m = 10 m = 10 1.0 3.0 1.0 0.8 2.5 0.6 0.5 2.0 0.4 1.5 q - 3 - 2 - 1 1 2 3 0.2 1.0 - 0.5 q - 3 - 2 - 1 1 2 3 0.5 - 0.2 - 1.0 q - 0.4 - 3 - 2 - 1 1 2 3 13

  14. ��� 20 � θ π θ ��� 5 θ m = 100 m = 100 m = 100 25 1.0 1.0 20 0.5 0.5 15 q q - 3 - 2 - 1 1 2 3 - 3 - 2 - 1 1 2 3 10 - 0.5 5 - 0.5 q - 3 - 2 - 1 1 2 3 - 1.0 - 1.0 ��� 2 ��� θ | θ − . 1 | ��� ( θ − . 1) m = 100 m = 100 m = 100 1.0 3.0 1.0 0.8 2.5 0.6 0.5 2.0 0.4 q 1.5 - 3 - 2 - 1 1 2 3 0.2 1.0 - 0.5 q - 3 - 2 - 1 1 2 3 0.5 - 0.2 - 1.0 q - 0.4 - 3 - 2 - 1 1 2 3 14

  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 ˆ f k • This will follow naturally from orthogonality properties of � � θ 15

  16. Orthogonality of complex exponentials 16

  17. The L 2 inner product and norm • We define the � 2 inner product (on T ) by � π � f, g � = 1 ¯ f ( θ ) g ( θ ) � θ 2 π − π • Associated with this inner product is the � 2 norm: � � π 1 | f ( θ ) | 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 17

  18. ���� ���� • A set of nonzero vectors v 1 , . . . , v n in a vector space V are called orthogonal if � v i , v j � = 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 18

  19. ���� ���� • A set of nonzero vectors v 1 , . . . , v n in a vector space V are called orthogonal if � v i , v j � = 0 whenever i � = k. • They are called orthonormal if they are orthogonal and all vectors are of unit norm: 1 = � v i � , or equivalently, � v i , v i � = 1 . • For orthonormal vectors , we can construct a projection of a vector into by � If then is equal to its projection: � In other words 19

  20. ���� • A set of nonzero vectors v 1 , . . . , v n in a vector space V are called orthogonal if � v i , v j � = 0 whenever i � = k. • They are called orthonormal if they are orthogonal and all vectors are of unit norm: 1 = � v i � , or equivalently, � v i , v i � = 1 . • For orthonormal vectors v k , we can construct a projection of a vector f � V into ���� { v 1 , . . . , v n } by n � P f := � v k , f � v k k =1 � If then is equal to its projection: � In other words 20

  21. • A set of nonzero vectors v 1 , . . . , v n in a vector space V are called orthogonal if � v i , v j � = 0 whenever i � = k. • They are called orthonormal if they are orthogonal and all vectors are of unit norm: 1 = � v i � , or equivalently, � v i , v i � = 1 . • For orthonormal vectors v k , we can construct a projection of a vector f � V into ���� { v 1 , . . . , v n } by n � P f := � v k , f � v k k =1 � If f � ���� { v 1 , . . . , v n } then f is equal to its projection: f = P f � In other words P 2 f = P f 21

  22. • We have � π = 1 � � k θ , � � k θ � � � θ = 1 2 π − π and for k � = j � π � � ( j − k ) θ � θ = � � ( j − k ) π � � − � ( j − k ) π = 1 � � k θ , � � j θ � � = 0 2 π 2 π � ( j � k ) − π • In other words, the complex exponentials are orthonormal! • Thus we can think of the Fourier series as an infinite projection ∞ � � � k θ , f � � k θ � � f ( θ ) � k = −∞ � Since this sum is infinite, we cannot appeal to the simple argument of equality from the last slide 22

  23. Discrete orthogonality of complex exponentials 23

  24. • We have shown that the complex exponentials are orthogonal with respect to the inner product � � � f, g � = 1 ¯ f ( θ ) g ( θ ) � θ 2 π − � • A remarkable fact we now show is that they are also orthogonal with respect to the following discrete semi-inner product : m � f, g � m = 1 f ( θ j ) g ( θ j ) = f ( θ ) � g ( θ ) ¯ � m m j =1 where θ = ( θ 1 , . . . , θ m ) are again evenly spaced points: � 2 � � � � � 1 � 2 θ = � π , m � 1 = π , . . . , π - 3 - 2 - 1 0 1 2 3 m 24

  25. Evenly spaced points on the unit circle θ = ( θ 1 , . . . , θ m ) z = ( z 1 , . . . , z m ) e i θ 1.0 0.5 - 3 - 2 - 1 0 1 2 3 - 1.0 - 0.5 0.5 1.0 - 0.5 - 1.0 25

  26. Some identities (shown for even m ): z 1.0 0.5 m m e i θ j = � � z j = 0 - 1.0 - 0.5 0.5 1.0 j =1 j =1 - 0.5 - 1.0 26

  27. Some identities (shown for even m ): z 0.5 m m e i2 θ j = � � z 2 j = 0 - 1.0 - 0.5 0.5 1.0 j =1 j =1 - 0.5 27

  28. ������� : m � � k θ j = ( − ) k m � for k = . . . , − 2 m, − m, 0 , m, 2 m . . . j =1 m � � k θ j = 0 � for all other integer k j =1 28

  29. • Note that z j = − � 2 π � ( j − 1)/ m = − ω j − 1 for ω = 1 1/ m = � 2 π � / m • Therefore, • If is a multiple of , then we have

Recommend


More recommend