Chapter III Solution of Nonlinear Equations Chen,Xianjin I ÆEâŒÆ êææ chenxjin@ustc.edu.cn
Solution of Nonlinear Equations š 5 Æ 8 ÆuÐ é ïä š 5 Š( )) ÙØŒ½" SN. 5 ƒ' š 5 ) KÃØ lnøþ OŽþÑ E,õ.
Solution of Nonlinear Equations š 5 Æ 8 ÆuÐ é ïä š 5 Š( )) ÙØŒ½" SN. 5 ƒ' š 5 ) KÃØ lnøþ OŽþÑ E,õ. ~Xµ { sin( π x) = y 2 kã õ ) y = 1 2 { y = x 2 + a x = y 2 + a
Solution of Nonlinear Equations š 5 Æ 8 ÆuÐ é ïä š 5 Š( )) ÙØŒ½" SN. 5 ƒ' š 5 ) KÃØ lnøþ OŽþÑ E,õ. ~Xµ { sin( π x) = y 2 kã õ ) y = 1 2 a = 1 Ã) { y = x 2 + a x = y 2 + a a = 1 ) 4 a = 0 ü ) a = 1 o ) e x 1 = cos(πx) ()º
Solution of Nonlinear Equations š 5 Æ 8 ÆuÐ é ïä š 5 Š( )) ÙØŒ½" SN. 5 ƒ' š 5 ) KÃØ lnøþ OŽþÑ E,õ. ~Xµ { sin( π x) = y 2 kã õ ) y = 1 2 a = 1 Ã) { y = x 2 + a x = y 2 + a a = 1 ) 4 a = 0 ü ) a = 1 o ) e x 1 = cos(πx) ()º à ()Lˆª!
3.1 Šé {(bisection method)
3.1 Šé {(bisection method) nµ ^ëy¼ê0š½n
3.1 Šé {(bisection method) nµ ^ëy¼ê0š½n [ ] f (a) f (b) < 0 = x (a, b), s.t., f ( x) = 0 zgòš Œ Œ.
3.1 Šé {(bisection method) nµ ^ëy¼ê0š½n [ ] f (a) f (b) < 0 = x (a, b), s.t., f ( x) = 0 zgòš Œ Œ.
3.1 Šé {(bisection method) nµ ^ëy¼ê0š½n [ ] f (a) f (b) < 0 = x (a, b), s.t., f ( x) = 0 zgòš Œ Œ. Stopping condition: x k+1 x k < ɛ 1 or f (x k+1 ) < ɛ 2
é {Ž{ ã InputµüC¼êf (x),a, b f (a)f (b) < 0) Ýε, ëêδ. Outputµf 3[a,b]þ CqŠc(e3). u f (a); v f (b); e b a if sign(u)=sign(v) While e δ e e/2 c a + e w f (c) Output k, c, w, e if w < ε or e < δ if sign(w) sign(u) else endif End while b c; v w a c; u w then STOP. (=à:óòž SªŽ) then STOP then
é {`":
é {`": Remark: `:µž{{ü ¼ê f ëy.
Remark: `:µž{{ü é {`": ¼ê f ëy. ":µ k^ à:léò Âñ Ýú Ué Š.
Error Analysis of Bisection Method Check the lecture notes in class.
Example 1 (P79) Suppose that the bisection method is started with the interval [50,63]. How many steps should be taken to compute a root with relative accuracy of 10 12?
Example 2 Find a root of 1 3 x 3 + x 3 = 0 on the interval [0,2] via the bisection method. At least how many steps should be taken with absolute error tolerance (Ø ) 10 3?
3.2 Newton s Method Suppose r is a root of a nonlinear function f (x) = 0.
3.2 Newton s Method Suppose r is a root of a nonlinear function f (x) = 0. Then, with an initial guess or approximation x 0 of r, the Newton s iteration is given by x k+1 = x k f (x k) f (x k ) (k 0)
3.2 Newton s Method Suppose r is a root of a nonlinear function f (x) = 0. Then, with an initial guess or approximation x 0 of r, the Newton s iteration is given by x k+1 = x k f (x k) f (x k ) (k 0) 1 How to get such Newton s iteration formula?
3.2 Newton s Method Suppose r is a root of a nonlinear function f (x) = 0. Then, with an initial guess or approximation x 0 of r, the Newton s iteration is given by x k+1 = x k f (x k) f (x k ) (k 0) 1 How to get such Newton s iteration formula? 2 Does it work or not? Under what condition?
3.2 Newton s Method Suppose r is a root of a nonlinear function f (x) = 0. Then, with an initial guess or approximation x 0 of r, the Newton s iteration is given by x k+1 = x k f (x k) f (x k ) (k 0) 1 How to get such Newton s iteration formula? 2 Does it work or not? Under what condition? 3 Is it fast (i.e., convergent rate)?
Key idea of Newton s Method
Key idea of Newton s Method b f (x)3, : x 0 Œ Њ NCk Š r òf (x)3 x 0? ŠTaylorÐmµ f (x) = f (x 0 ) + f (x 0 )(x x 0 ) + f (x 0 ) (x x 0 ) 2 + 2!
Key idea of Newton s Method b f (x)3, : x 0 Œ Њ NCk Š r òf (x)3 x 0? ŠTaylorÐmµ f (x) = f (x 0 ) + f (x 0 )(x x 0 ) + f (x 0 ) (x x 0 ) 2 + 2! Ù 5Ü L 0 (x) = f (x 0 ) + f (x 0 )(x x 0 )5Cq¼êf (x) Óž ^L 0 (x)š x 1 = x 0 f (x 0) 5Cqf (x)š r. f (x 0 )
Key idea of Newton s Method b f (x)3, : x 0 Œ Њ NCk Š r òf (x)3 x 0? ŠTaylorÐmµ f (x) = f (x 0 ) + f (x 0 )(x x 0 ) + f (x 0 ) (x x 0 ) 2 + 2! Ù 5Ü L 0 (x) = f (x 0 ) + f (x 0 )(x x 0 )5Cq¼êf (x) Óž ^L 0 (x)š x 1 = x 0 f (x 0) 5Cqf (x)š r. (KEY point of Newton s f (x 0 ) iteration)
Key idea of Newton s Method b f (x)3, : x 0 Œ Њ NCk Š r òf (x)3 x 0? ŠTaylorÐmµ f (x) = f (x 0 ) + f (x 0 )(x x 0 ) + f (x 0 ) (x x 0 ) 2 + 2! Ù 5Ü L 0 (x) = f (x 0 ) + f (x 0 )(x x 0 )5Cq¼êf (x) Óž ^L 0 (x)š x 1 = x 0 f (x 0) 5Cqf (x)š r. (KEY point of Newton s f (x 0 ) iteration) Question: is x 1 a better approximation of r than x 0?
Key idea of Newton s Method b f (x)3, : x 0 Œ Њ NCk Š r òf (x)3 x 0? ŠTaylorÐmµ f (x) = f (x 0 ) + f (x 0 )(x x 0 ) + f (x 0 ) (x x 0 ) 2 + 2! Ù 5Ü L 0 (x) = f (x 0 ) + f (x 0 )(x x 0 )5Cq¼êf (x) Óž ^L 0 (x)š x 1 = x 0 f (x 0) 5Cqf (x)š r. (KEY point of Newton s f (x 0 ) iteration) Question: is x 1 a better approximation of r than x 0? 2òf (x)3x 1?TaylorÐm Ù 5Ü L 1 (x) = f (x 1 ) + f (x 1 )(x x 1 )5C qf (x) ^L 1 (x)š x 2 = x 1 f (x 1) Cqf (x)š... f (x 1 )
Key idea of Newton s Method b f (x)3, : x 0 Œ Њ NCk Š r òf (x)3 x 0? ŠTaylorÐmµ f (x) = f (x 0 ) + f (x 0 )(x x 0 ) + f (x 0 ) (x x 0 ) 2 + 2! Ù 5Ü L 0 (x) = f (x 0 ) + f (x 0 )(x x 0 )5Cq¼êf (x) Óž ^L 0 (x)š x 1 = x 0 f (x 0) 5Cqf (x)š r. (KEY point of Newton s f (x 0 ) iteration) Question: is x 1 a better approximation of r than x 0? 2òf (x)3x 1?TaylorÐm Ù 5Ü L 1 (x) = f (x 1 ) + f (x 1 )(x x 1 )5C qf (x) ^L 1 (x)š x 2 = x 1 f (x 1) Cqf (x)š... f (x 1 ) 5µx k 5 Cý) Š ž 5¼êL k (x)cqf J Ð Ñ Cq) (.
NewtonS AÛ)º
NewtonS ª`":
NewtonS ª`": `:µ Ï~ Âñ Ý ª{ü A^2
NewtonS ª`": `:µ Ï~ Âñ Ý ª{ü A^2 Û 5µ Њ ƒƒ' eðšøð KŒUØÂñ" Ÿoº
NewtonS ª`": `:µ Ï~ Âñ Ý ª{ü A^2 Û 5µ Њ ƒƒ' eðšøð KŒUØÂñ" Ÿoº
NewtonS ªÂñ
NewtonS ªÂñ NewtonS ª x k+1 = φ(x k ) = x k f (x k) f (x k ) ex f (x) = 0üŠ Âñ ex Š K Âñ"
NewtonS ªÂñ NewtonS ª x k+1 = φ(x k ) = x k f (x k) f (x k ) ex f (x) = 0üŠ Âñ ex Š K Âñ" ex f (x) = 0p Š,KS ª Âñ" x k+1 = φ(x k ) = x k p f (x k) f (x k )
š 5 NewtonS { f 1 (x 1, x 2,, x n) = 0 f 2 (x 1, x 2,, x n) = 0 þ/ª µ. f n(x 1, x 2,, x n) = 0 F(X) = 0, Ù F = (f 1, f 2,, f n) T, X = (x 1, x 2,, x n) T
š 5 NewtonS { f 1 (x 1, x 2,, x n) = 0 f 2 (x 1, x 2,, x n) = 0 þ/ª µ. f n(x 1, x 2,, x n) = 0 F(X) = 0, Ù F = (f 1, f 2,, f n) T, X = (x 1, x 2,, x n) T ìücþnewton{ ЊX 0 = (x 01, x 02,, x 0n ) T ò{f i } n i=13x 0?? 1TaylorÐm OƒA 5Ü 5Cqz f i µ f 1 (X 0 ) + f 1 (x x 1 x 01 ) + + f 1 1 x n (x n x 0n ) = 0 f 2 (X 0 ) + f 2 (x x 1 x 01 ) + + f 2 1 x n (x n x 0n ) = 0. f n(x 0 ) + fn x 1 (x 1 x 01 ) + + fn x n (x n x 0n ) = 0
þ/ª= F(X 0 ) + J F (X 0 )(X X 0 ) = 0 ( ) Ù L«F JacobiÝ. J F (X) = f 1 f 1 x n x 1....... f n x 1 ( ) ) X 1 = X 0 J 1 F (X 0)F(X 0 ) 2ò{f i } n i=13x 1?TaylorÐm. ÓnŒí2NewtonS ª µ X k+1 = X k F (X k) F (X k ) = X k f n x n ( J F (X k )) 1 F(X k )
þ/ª= F(X 0 ) + J F (X 0 )(X X 0 ) = 0 ( ) Ù L«F JacobiÝ. J F (X) = f 1 f 1 x n x 1....... f n x 1 ( ) ) X 1 = X 0 J 1 F (X 0)F(X 0 ) 2ò{f i } n i=13x 1?TaylorÐm. ÓnŒí2NewtonS ª µ X k+1 = X k F (X k) F (X k ) = X k 3 S ÏL)±e 5 ê 5 X k+1. f n x n ( J F (X k )) 1 F(X k ) J F (X k )(X k+1 X k ) = F(X k )