Lesson 10 D IFFERENTIATION AND I NTEGRATION
• We have seen two applications: – signal smoothing – root finding • Today we look – differentation – integration • These will form the basis for solving ODEs
D IFFERENTIATION OF F OURIER SERIES
� � � � � � • For functions on the periodic interval, we have the Fourier representation � ˆ � f k � � k θ f ( θ ) = k = �� • Its derivative is (formally) obvious: � � � k ˆ f � ( θ ) ∼ f k � � k θ k = �� • When does this converge? Whenever ˆ f k decays fast enough • Numerically, we obtain the approximation: ... where and is the DFT
• For functions on the periodic interval, we have the Fourier representation � ˆ � f k � � k θ f ( θ ) = k = �� • Its derivative is (formally) obvious: � � � k ˆ f � ( θ ) ∼ f k � � k θ k = �� • When does this converge? Whenever ˆ f k decays fast enough • Numerically, we obtain the approximation: � � � α ... � � αθ , . . . , � � βθ � f � ( θ ) ≈ � � F f � � � � β where f = ( f ( θ 1 ) , . . . , f ( θ m )) � and F is the DFT
Pointwise convergence of derivative of at zero f ( θ ) = e cos(10 θ − 1) Direct interpolation Numerical derivative 1 0.1 0.001 10 - 4 10 - 6 10 - 7 10 - 9 10 - 10 10 - 12 10 - 13 0 500 1000 1500 2000 500 1000 1500 2000 number of points number of points
• The N th order derivative is: � ( � k ) N ˆ � f ( N ) ( θ ) ∼ f k � � k θ k = �� • Numerically, we obtain the approximation: N � � � α ... f ( N ) ( θ ) ≈ � � αθ , . . . , � � βθ � � F f � � � � � β where f = ( f ( θ 1 ) , . . . , f ( θ m )) � and F is the DFT
Pointwise convergence of 10th derivative of at zero f ( θ ) = e cos(10 θ − 1) Direct interpolation Numerical 10th derivative 10 1 0.01 10 - 5 0.01 10 - 8 10 - 4 10 - 11 10 - 6 10 - 14 10 - 8 200 400 600 800 1000 500 1000 1500 2000 number of points number of points
I NTEGRATION OF F OURIER SERIES
� � � � � � � � � • A function define don the periodic interval has the indefinite integral � ˆ � f k � k � � k θ + ˆ � f � θ = f 0 θ + C k = �� ,k � =0 • This will converge whenever the Fourier series does! • Numerically, we obtain the approximation: ... ... where and is the DFT • This is stable because the error in each computed is multiplied by a bounded number
� • A function define don the periodic interval has the indefinite integral � ˆ � f k � k � � k θ + ˆ � f � θ = f 0 θ + C k = �� ,k � =0 • This will converge whenever the Fourier series does! • Numerically, we obtain the approximation: 1 � � � α ... � � � � 1 � � � � � � � � � αθ , . . . , � � βθ � � � F f + θ e � � 0 0 F f + C f � θ ≈ � � � � 1 � � ... � � � � � � 1 � β where f = ( f ( θ 1 ) , . . . , f ( θ m )) � and F is the DFT • This is stable because the error in each computed ˆ f k is multiplied by a bounded number
Pointwise convergence of integral of at zero f ( θ ) = e cos(10 θ − 1) 0.001 10 - 7 10 - 11 10 - 15 200 400 600 800 1000 number of points
� • Letting C = 0 at each stage, we can iterate this N times: N 1 � � � α ... � � � � 1 � � ˆ � � � � f 0 − � f � θ N ≈ � � αθ , . . . , � � βθ � � � N ! θ N � 0 F f + · · · � � � 1 � � � ... � � � � � � 1 � β • The stability of this approximation is maintained
D IFFERENTIATION OF T AYLOR SERIES
• For functions in the disk, we have the Taylor series � � ˆ f k z k f ( z ) = k =0 • Derivative : � k ˆ � f � ( z ) = f k z k � 1 k =0 • Numerically, we obtain the ( m − 1) × m matrix approximation: � � 0 1 2 � � f � ( z ) ≈ � 1 | · · · | z m � 2 � � T f ... � � � � � m − 1 where f = ( f ( z 1 ) , . . . , f ( z m )) � and T is the discrete Taylor transform
Error approximating exp( z ) for z = {.1,.5,1.}exp(.1i) First derivative 10 th derivative 10 7 0.01 10 4 10 - 5 10 10 - 8 0.01 10 - 11 10 - 5 10 - 14 10 - 8 50 100 150 200 50 100 150 200 number of points
I NTEGRATION OF T AYLOR SERIES • Integral : � ˆ � f k k + 1 z k +1 + C � f ( z ) � z = k =0 • Numerically, we obtain the ( m + 1) × m matrix approximation: � � 0 1 � � � 1 | · · · | z m � � 1 � � f ( z ) � z ≈ T f + C � � 2 � � ... � � � � 1 m +1 where f = ( f ( z 1 ) , . . . , f ( z m )) � and T is the discrete Taylor transform • Now this is stable both on and inside the unit circle!
Error approximating exp( z ) for z = {.1,.5,1.}exp(.1i) First integral 10 th integral 10 - 8 0.01 10 - 10 10 - 5 10 - 8 10 - 12 10 - 11 10 - 14 10 - 14 10 - 16 50 100 150 200 50 100 150 200 number of points
D IFFERENTIATION OF L AURENT SERIES • For functions on the circle, we have the Laurent series � � ˆ f k z k f ( z ) = k = �� • Derivative : � � f k z k � 1 = k ˆ ( k + 1) ˆ � � f � ( z ) = f k +1 z k k = �� k = �� ,k � = � 1 • Numerically, we obtain the (square) approximation, where we changed our basis: � � α z α � 1 | · · · | z β � 1 � ... f � ( z ) ≈ � � F f � � � β where f = ( f ( z 1 ) , . . . , f ( z m )) � • Clearly, it will only be somewhat accurate on the unit circle, and the error will grow
I NTEGRATION OF L AURENT SERIES • For functions on the circle, we have the Laurent series � ˆ � f k z k f ( z ) = k = �� • Integral: � � 1 f k z k +1 + ˆ � ˆ f ( z ) � z = f � 1 ��� z + C k + 1 k = �� ,k � = � 1 • Numerically, we obtain the approximation where we changed bases: 1 � � α +1 ... � � � � 1 � � � � � � 1 z α +1 | · · · | z β +1 � � � � f ( z ) � z ≈ 0 F f + e � 1 F f ��� z + C � � � � 1 � � � � ... � � � � 1 β +1 where f = ( f ( z 1 ) , . . . , f ( z m )) � • This will be stable • However, we cannot (easily) iterate integrals!
I NTEGRATION OF C HEBYSHEV SERIES
� � � � • We want to compute � � � ˇ � f ( x ) � x = T k ( x ) � x f k k =0 • The first two moments are T 1 ( x ) � x = x 2 2 + C = T 2 ( x ) − T 0 ( x ) � � and T 0 ( x ) � x = x + C = T 1 ( x )+ C + C 4 • For , we do the change of variables to map to the unit circle: (Now !)
� • We want to compute � � � ˇ � f ( x ) � x = T k ( x ) � x f k k =0 • The first two moments are T 1 ( x ) � x = x 2 2 + C = T 2 ( x ) − T 0 ( x ) � � and T 0 ( x ) � x = x + C = T 1 ( x )+ C + C 4 • For k > 1 , we do the change of variables x = J ( z ) to map to the unit circle: � x � J − 1 � J − 1 ( x ) ( x ) T k ( J ( z )) J � ( z ) � z = 1 z k + z � k � � 1 − 1 � ↓ ↓ � T k ( x ) � x = � z z 2 4 J − 1 J − 1 ( a ) ( a ) a ↓ ↓ � (Now !)
• We want to compute � � � ˇ � f ( x ) � x = T k ( x ) � x f k k =0 • The first two moments are T 1 ( x ) � x = x 2 2 + C = T 2 ( x ) − T 0 ( x ) � � and T 0 ( x ) � x = x + C = T 1 ( x )+ C + C 4 • For k > 1 , we do the change of variables x = J ( z ) to map to the unit circle: � x � J − 1 � J − 1 ( x ) ( x ) T k ( J ( z )) J � ( z ) � z = 1 z k + z � k � � 1 − 1 � ↓ ↓ � T k ( x ) � x = � z z 2 4 J − 1 J − 1 ( a ) ( a ) a ↓ ↓ � J − 1 ( x ) = 1 ↓ z k + z � k − z k � 2 − z � k � 2 � � � z 4 J − 1 ( a ) ↓ � � (Now !)
• We want to compute � � � ˇ � f ( x ) � x = T k ( x ) � x f k k =0 • The first two moments are T 1 ( x ) � x = x 2 2 + C = T 2 ( x ) − T 0 ( x ) � � and T 0 ( x ) � x = x + C = T 1 ( x )+ C + C 4 • For k > 1 , we do the change of variables x = J ( z ) to map to the unit circle: � x � J − 1 � J − 1 ( x ) ( x ) T k ( J ( z )) J � ( z ) � z = 1 z k + z � k � � 1 − 1 � ↓ ↓ � T k ( x ) � x = � z z 2 4 J − 1 J − 1 ( a ) ( a ) a ↓ ↓ � J − 1 ( x ) = 1 ↓ z k + z � k − z k � 2 − z � k � 2 � � � z 4 J − 1 ( a ) ↓ � z k +1 k + 1 + z 1 � k 1 − k − z k � 1 k − 1 − z � k � 1 � = 1 (Now z = J � 1 � ( x ) !) + C 4 − k − 1
Recommend
More recommend