Richardson’s Extrapolation Suppose ∀ h � = 0 we have a formula N 1 ( h ) that approximates an unknown value M M − N 1 ( h ) = K 1 h + K 2 h 2 + K 3 h 3 + · · · , (7) for some unknown constants K 1 , K 2 , K 3 , . . . . If K 1 � = 0, then the truncation error is O ( h ). For example, h 2 − f (4) ( x ) = − f ′′ ( x ) h − f ′′′ ( x ) f ′ ( x ) − f ( x + h ) − f ( x ) h 3 − · · · . h 2! 3! 4! Goal Find an easy way to produce formulas with a higher-order truncation error. Replacing h in (7) by h/ 2, we have h 2 h 3 � h � h M = N 1 + K 1 2 + K 2 4 + K 3 8 + · · · . (8) 2 Wei-Cheng Wang (NTHU) Numerical Diff. & Integ. Fall 2010 15 / 66
Subtracting (7) with twice (8), we get M = N 2 ( h ) − K 2 2 h 2 − 3 K 3 4 h 3 − · · · , (9) where � h � � h � � � h � � N 2 ( h ) = 2 N 1 − N 1 ( h ) = N 1 + N 1 − N 1 ( h ) , 2 2 2 which is an O ( h 2 ) approximation formula. Replacing h in (9) by h/ 2, we get � h � − K 2 8 h 2 − 3 K 3 32 h 3 − · · · . M = N 2 (10) 2 Subtracting (9) from 4 times (10) gives � h � − N 2 ( h ) + 3 K 3 8 h 3 + · · · , 3 M = 4 N 2 2 which implies that � � h � � + N 2 ( h/ 2) − N 2 ( h ) + K 3 8 h 3 + · · · ≡ N 3 ( h ) + K 3 8 h 3 + · · · M = N 2 2 3 Wei-Cheng Wang (NTHU) Numerical Diff. & Integ. Fall 2010 16 / 66
Using induction, M can be approximated by M = N m ( h ) + O ( h m ) , where � h � + N m − 1 ( h/ 2) − N m − 1 ( h ) N m ( h ) = N m − 1 . 2 m − 1 − 1 2 Centered difference formula . From the Taylor’s theorem f ( x + h ) = f ( x )+ hf ′ ( x )+ h 2 2! f ′′ ( x )+ h 3 3! f ′′′ ( x )+ h 4 4! f (4) ( x )+ h 5 5! f (5) ( x ) + · · · f ( x − h ) = f ( x ) − hf ′ ( x )+ h 2 2! f ′′ ( x ) − h 3 3! f ′′′ ( x )+ h 4 4! f (4) ( x ) − h 5 5! f (5) ( x ) + · · · we have f ( x + h ) − f ( x − h ) = 2 hf ′ ( x ) + 2 h 3 3! f ′′′ ( x ) + 2 h 5 5! f (5) ( x ) + · · · , Wei-Cheng Wang (NTHU) Numerical Diff. & Integ. Fall 2010 17 / 66
and, consequently, � h 2 3! f ′′′ ( x 0 ) + h 4 � f ( x 0 + h ) − f ( x 0 − h ) 5! f (5) ( x 0 ) + · · · f ′ ( x 0 ) = , − 2 h � h 2 3! f ′′′ ( x 0 ) + h 4 � 5! f (5) ( x 0 ) + · · · ≡ N 1 ( h ) − . (11) Replacing h in (11) by h/ 2 gives − h 2 h 4 � h � 1920 f (5) ( x 0 ) − · · · . f ′ ( x 0 ) = N 1 24 f ′′′ ( x 0 ) − (12) 2 Subtracting (11) from 4 times (12) gives f ′ ( x 0 ) = N 2 ( h ) + h 4 480 f (5) ( x 0 ) + · · · , where � � h � � � h � N 2 ( h ) = 1 + N 1 ( h/ 2) − N 1 ( h ) 4 N 1 − N 1 ( h ) = N 1 . 3 2 2 3 Wei-Cheng Wang (NTHU) Numerical Diff. & Integ. Fall 2010 18 / 66
In general, f ′ ( x 0 ) = N j ( h ) + O ( h 2 j ) with � h � + N j − 1 ( h/ 2) − N j − 1 ( h ) N j ( h ) = N j − 1 . 4 j − 1 − 1 2 Example Suppose that x 0 = 2 . 0, h = 0 . 2 and f ( x ) = xe x . Compute an approximated value of f ′ (2 . 0) = 22 . 16716829679195 to six decimal places. Solution . By centered difference formula, we have f (2 . 0 + 0 . 2) − f (2 . 0 − 0 . 2) N 1 (0 . 2) = = 22 . 414160 , 2 h f (2 . 0 + 0 . 1) − f (2 . 0 − 0 . 1) N 1 (0 . 1) = = 22 . 228786 . h Wei-Cheng Wang (NTHU) Numerical Diff. & Integ. Fall 2010 19 / 66
It implies that N 2 (0 . 2) = N 1 (0 . 1) + N 1 (0 . 1) − N 1 (0 . 2) = 22 . 166995 3 which does not have six decimal digits. Adding N 1 (0 . 05) = 22 . 182564, we get N 2 (0 . 1) = N 1 (0 . 05) + N 1 (0 . 05) − N 1 (0 . 1) = 22 . 167157 3 and N 3 (0 . 2) = N 2 (0 . 1) + N 2 (0 . 1) − N 2 (0 . 2) = 22 . 167168 15 which contains six decimal digits. Wei-Cheng Wang (NTHU) Numerical Diff. & Integ. Fall 2010 20 / 66
O ( h 2 ) O ( h 3 ) O ( h 4 ) O ( h ) 1: N 1 ( h ) = N ( h ) 2: N 1 ( h/ 2) = N ( h/ 2) 3: N 2 ( h ) 4: N 1 ( h/ 4) = N ( h/ 4) 5: N 2 ( h/ 2) 6: N 3 ( h ) 7: N 1 ( h/ 8) = N ( h/ 8) 8: N 2 ( h/ 4) 9: N 3 ( h/ 2) 10: N 4 ( h ) Wei-Cheng Wang (NTHU) Numerical Diff. & Integ. Fall 2010 21 / 66
Remark In practice, we are often encountered with the situation where the order of the numerical method is unknown. That is, the error expansion is of the form M − N ( h ) = K 1 h p 1 + K 2 h p 2 + K 3 h p 3 + · · · , (13) where p 1 , p 2 , · · · are unknown. Solving for the leading order p 1 , together with the primary unknowns M and K 1 , requires 3 equations, which can be obtained from, for example, the numerical results at h , h/ 2 and h/ 4: K 1 h p 1 + · · · , M − N ( h ) = � h � p 1 + · · · , M − N ( h 2 ) = K 1 (14) 2 � h � p 1 + · · · M − N ( h 4 ) = K 1 4 The answer is given by N ( h ) − N ( h 2 ) p 1 ≈ log 2 N ( h 2 ) − N ( h 4 ) Once p 1 is known, Richardson extrapolation can be proceeded as before. Wei-Cheng Wang (NTHU) Numerical Diff. & Integ. Fall 2010 22 / 66
Recommend
More recommend