Lecture Soluton o Nonlnear Equatons Root Fndng Problems Dentons Classcaton o Methods Analytcal Solutons Graphcal Methods Numercal Methods Bracketng Methods Open Methods Convergence Notatons
Root Fndng Problems Many problems n Scence and Engneerng are epressed as: Gven a nd the value contnuous r uncton such that r, These problems are called root ndng problems.
Roots o Equatons A number r that satses an equaton s called a root o the equaton. The equaton : has our roots :, 3, 3, and..e., 4 3 3 7 4 3 5 7 5 8 8 3 The equaton has two smple roots and and a repeated root 3 wth multplcty. 3 3
Zeros o a Functon Let be a real-valued uncton o a real varable. Any number r or whch r s called a zero o the uncton. Eamples: and 3 are zeros o the uncton --3. 4
Graphcal Interpretaton o Zeros The real zeros o a uncton are the values o at whch the graph o the uncton crosses or touches the - as. Real zeros o 5
Smple Zeros has two smple zeros one at and one at 6
Multple Zeros has double zeros zero wth mulplcty at 7
Multple Zeros 3 3 has a zero wth mulplcty 3 at 8
Facts Any n th order polynomal has eactly n zeros countng real and comple zeros wth ther multplctes. Any polynomal wth an odd order has at least one real zero. I a uncton has a zero at r wth multplcty m then the uncton and ts rst m- dervatves are zero at r and the m th dervatve at r s not zero. 9
Roots o Equatons & Zeros o Functon Gven theequaton : Move all terms to one sde o the equaton : Dene 4 4 3 3 3 3 as : 7 7 4 3 5 5 8 3 7 8 5 8 The zeros o are the same as the roots o theequaton Whch are, 3, 3, and
Soluton Methods Several ways to solve nonlnear equatons are possble: Analytcal Solutons Possble or specal equatons only Graphcal Solutons Useul or provdng ntal guesses or other methods Numercal Solutons Open methods Bracketng methods
Analytcal Methods Analytcal Solutons are avalable or specal equatons only. Analytcal soluton o : a b c roots b ± b a 4ac No analytcal soluton s avalable or : e
Graphcal Methods Graphcal methods are useul to provde an ntal guess to be used by other methods. Solve e The root root [,].6 e Root 3
Numercal Methods Many methods are avalable to solve nonlnear equatons: Bsecton Method Newton s Method Secant Method False poston Method Muller s Method Barstow s Method Fed pont teratons. These wll be covered here 4
Bracketng Methods In bracketng methods, the method starts wth an nterval that contans the root and a procedure s used to obtan a smaller nterval contanng the root. Eamples o bracketng methods: Bsecton method False poston method 5
Open Methods In the open methods, the method starts wth one or more ntal guess ponts. In each teraton, a new guess o the root s obtaned. Open methods are usually more ecent than bracketng methods. They may not converge to a root. 6
Convergence Notaton A sequence,,..., n,... s sad to converge to to every ε > there ests N such that : n < ε n > N 7
8 Convergence Notaton C P C C p n n n n n n : order Convergence o Quadratc Convergence : Lnear Convergence :. to converge,...,, Let
Speed o Convergence We can compare derent methods n terms o ther convergence rate. Quadratc convergence s aster than lnear convergence. A method wth convergence order q converges aster than a method wth convergence order p q>p. Methods o convergence order p> are sad to have super lnear convergence. 9
Bsecton Method The Bsecton method s one o the smplest methods to nd a zero o a nonlnear uncton. It s also called nterval halvng method. To use the Bsecton method, one needs an ntal nterval that s known to contan a zero o the uncton. The method systematcally reduces the nterval. It does ths by dvdng the nterval nto two equal parts, perorms a smple test and based on the result o the test, hal o the nterval s thrown away. The procedure s repeated untl the desred nterval sze s obtaned.
Intermedate Value Theorem Let be dened on the nterval [a,b]. a Intermedate value theorem: a uncton s contnuous and a and b have derent sgns then the uncton has at least one zero n the nterval [a,b]. a b b
Eamples I a and b have the same sgn, the uncton may have an even number o real zeros or no real zeros n the nterval [a, b]. Bsecton method can not be used n these cases. a b The uncton has our real zeros a b The uncton has no real zeros
Two More Eamples I a and b have derent sgns, the uncton has at least one real zero. a b Bsecton method can be used to nd one o the zeros. The uncton has one real zero a b The uncton has three real zeros 3
Bsecton Method I the uncton s contnuous on [a,b] and a and b have derent sgns, Bsecton method obtans a new nterval that s hal o the current nterval and the sgn o the uncton at the end ponts o the nterval are derent. Ths allows us to repeat the Bsecton procedure to urther reduce the sze o the nterval. 4
Bsecton Method Assumptons: Gven an nterval [a,b] s contnuous on [a,b] a and b have opposte sgns. These assumptons ensure the estence o at least one zero n the nterval [a,b] and the bsecton method can be used to obtan a smaller nterval that contans the zero. 5
Bsecton Algorthm Assumptons: s contnuous on [a,b] a b < a Algorthm: Loop. Compute the md pont cab/. Evaluate c 3. I a c < then new nterval [a, c] I a c > then new nterval [c, b] End loop a c b b b a a a 6
Eample - - - - 7
Flow Chart o Bsecton Method Start: Gven a,b and ε u a ; v b c ab / ; w c no yes s u w < no s b-a /<ε yes Stop bc; v w ac; u w 8
Eample Can you use Bsecton method to nd a zero o : 3 3 n the nterval [,]? Answer: s contnuous on [,] and * 3 3> Assumptons are not satsed Bsecton method can not be used 9
3 Eample Answer: [,]? nterval n the 3 : o zero a nd to method Bsecton use you Can 3 used can be method Bsecton satsed are Assumptons - * and on [,] contnuous s <
Best Estmate and Error Level Bsecton method obtans an nterval that s guaranteed to contan a zero o the uncton. The best estmate o the zero o the uncton ater the rst teraton o the Bsecton method s the md pont o the ntal nterval: b a Estmate o the zero : r b a Error 3
Stoppng Crtera Two common stoppng crtera. Stop ater a ed number o teratons. Stop when the absolute error s less than a speced value How are these crtera related? 3
Stoppng Crtera c n : s the mdpont o the nterval at the n th teraton c n s usually used as the estmate o the root. r : s the zero o the uncton. Ater n teratons : error r -c n E n a b a n n 33
Convergence Analyss Gven, a, b, and ε How many teratons are needed such that : - r ε where r s the zero o and s the bsecton estmate.e., c k? log b a log ε n log 34
Convergence Analyss Alternatve Form log b a log ε n log wdth o ntal nterval n log log desred error b a ε 35
Eample a 6, b 7, ε.5 How many teratons are needed such that : - r ε? n log b a log ε log log log.5 log.9658 n 36
Eample Use Bsecton method to nd a root o the equaton cos wth absolute error <. assume the ntal nterval [.5,.9] Queston : What s? Queston : Are the assumptons satsed? Queston 3: How many teratons are needed? Queston 4: How to compute the new estmate? 37
CISE3_Topc 38
Bsecton Method Intal Interval a-.3776 b.784 a.5 c.7 b.9 Error <. -.3776 -.648.784.5.7.9 Error <. -.648.33.784.7.8.9 Error <.5 39
Bsecton Method -.648.83.33.7.75.8 -.648 -.35.83.7.75.75 Error <.5 Error <.5 Intal nterval contanng the root: [.5,.9] Ater 5 teratons: Interval contanng the root: [.75,.75] Best estmate o the root s.7375 Error <.5 4
A Matlab Program o Bsecton Method a.5; b.9; ua-cosa; vb-cosb; or k:5 cab/ cc-cosc u*c< bc ; vc; else ac; uc; end end c.7 c -.648 c.8 c.33 c.75 c.83 c.75 c -.35 4
4 Eample Fnd the root o: root the nd to used can be method Bsecton, * contnuous s * nterval:[,] n the 3 3 < b a
Eample Iteraton a b c ab c b-a.5 -.375.5.5.5.66.5 3.5.5.375-7.3E-3.5 4.5.375.35 9.3E-.65 5.35.375.34375 9.37E-3.35 43
Bsecton Method Advantages Smple and easy to mplement One uncton evaluaton per teraton The sze o the nterval contanng the zero s reduced by 5% ater each teraton The number o teratons can be determned a pror No knowledge o the dervatve s needed The uncton does not have to be derentable Dsadvantage Slow to converge Good ntermedate appromatons may be dscarded 44
Newton-Raphson Method Also known as Newton s Method Gven an ntal guess o the root, Newton-Raphson method uses normaton about the uncton and ts dervatve at that pont to nd a better guess o the root. Assumptons: s contnuous and the rst dervatve s known An ntal guess such that s gven 45
Newton Raphson Method - Graphcal Depcton - I the ntal guess at the root s, then a tangent to the uncton o that s s etrapolated down to the -as to provde an estmate o the root at. 46
Dervaton o Newton s Method Gven: Queston Taylor Therorem : Fnd h h : such that ' A new guess an ntal How do we obtan a o guess the root : o h h the root o. better estmate ' h ' Newton Raphson Formula? 47
48 Newton s Method end n or Assumputon Gven ' : ', ', end X FP X F X X k or X PROGRAM MATLAB / :5 4 % X X FP X FP FP uncton X X F X F F uncton 6* ^ 3* ] [ ^ 3* ^3 ] [ F.m FP.m
49 Eample.3 9.74.369.4375 ' Iteraton 3:.4375 6 9 3 ' Iteraton : 3 33 33 4 ' Iteraton : 4 3 ' 4, 3 the uncton zero o Fnd a 3 3
Eample k Iteraton k k k k k k 4 33 33 3 3 9 6.4375.565.4375.369 9.74.3.45 3.3.564 6.844.756.384 4.756.65 6.4969.746. 5
5 Convergence Analyss ' mn ' ' ma such that ests then there '. where r at be contnuous ' ' ', Let Theorem : C C -r -r -r r I r and -r -r k k δ δ δ δ >
Proo 5 ' '' '' ' ' '' '! : Raphson - Newton ;! ], [ : about o epanson Taylor seres The r r r r r r r r r r r r ξ ξ ξ ξ
Convergence Analyss Remarks When the guess s close enough to a smple root o the uncton then Newton s method s guaranteed to converge quadratcally. Quadratc convergence means that the number o correct dgts s nearly doubled at each teraton. 53
Problems wth Newton s Method I the ntal guess o the root s ar rom the root the method may not converge. Newton s method converges lnearly near multple zeros { r r }. In such a case, moded algorthms can be used to regan the quadratc convergence. 54
Multple Roots 3 has three zeros at zeros has two at - 55
Problems wth Newton s Method - Runaway - The estmates o the root s gong away rom the root. 56
Problems wth Newton s Method - Flat Spot - The value o s zero, the algorthm als. I s very small then wll be very ar rom. 57
Problems wth Newton s Method - Cycle - 3 5 4 The algorthm cycles between two values and 58
59 Newton s Method or Systems o Non Lnear Equatons [ ] M M M ',,...,,..., ' ' root o the o guess an ntal : X F X F X F X F X X Iteraton s Newton F X Gven k k k k
6 Eample Solve the ollowng system o equatons:, guess Intal 5 5 y y y. y, 5 5 ', 5 5 X y F y y. y F
6 Soluton Usng Newton s Method.6.33 -.5.65 7.5.5.5.5.5 7.5.5.5 ', -.5.65 : Iteraton.5.5 5 6 6 5 5 ', 5 5 5 : Iteraton X F F. X y F. y y. y F
6 Eample Try ths Solve the ollowng system o equatons:, Intal guess y y y y, 4 ', X y F y y y F
63 Eample Soluton.98.557.98.557.969.587..6 5 4 3 X k Iteraton
Newton s Method Revew Assumptons :, ', Newton' s Method new estmate: Problem : ' ' s not avalable, or dcult to obtan analytcally. ' are avalable, 64
65 Secant Method ' ponts : are two ntal ' and h h
66 Secant Method New estmate Secant Method : ponts ntal Two Assumptons : that such and
67 Secant Method.5
68 Secant Method - Flowchart ;,, <ε Stop NO Yes
69 Moded Secant Method the method may dverge. properly, not selected I? How to select Problem : ' needed : guess s only one ntal moded Secant method, ths In δ δ δ δ δ δ δ
Eample 5 Fnd the roots o : Intal ponts 5 and 3 3. 4 3 - wth error <. - -3-4 - -.5 - -.5.5.5 7
Eample - -.. -.. -..585 -.6. 6 -.6. -.5.9 -.5. -.5. 7
Convergence Analyss The rate o convergence o the Secant method s super lnear: r r α C, α.6 r : root : estmate o the root at the th teraton. It s better than Bsecton method but not as good as Newton s method. 7
Summary Method Pros Cons Bsecton Newton Secant - Easy, Relable, Convergent - One uncton evaluaton per teraton - No knowledge o dervatve s needed - Fast near the root - Two uncton evaluatons per teraton - Fast slower than Newton - One uncton evaluaton per teraton - No knowledge o dervatve s needed - Slow - Needs an nterval [a,b] contanng the root,.e., ab< - May dverge - Needs dervatve and an ntal guess such that s nonzero - May dverge - Needs two ntal ponts guess, such that - s nonzero 73
74 Eample.5 ponts ntal Two : root o the nd to Secant method Use 6 and
Soluton k k k. -..5 8.896.56 -.76 3.836 -.4645 4.47.3 5.33 -.65 6.347 -.5 75
76 Eample.. or., or teratons, three ater Stop. : pont ntal the Use : root o a nd to Method Newton's Use 3 < < k k k
Fve Iteratons o the Soluton k k k k ERROR. -...5.875 5.75.5.3478.7 4.4499.6 3.35. 4.685.5 4.347. 4.646. 5.347. 4.646. 77
78 Eample.. or., or teratons, three ater Stop. : pont ntal Use the : root o a nd to Method Newton's Use < < k k k e
79 Eample -. -.567..567 -. -.567..567 -.9 -.584.46.5379.46 -.3679 -.63. ' ' ', : root o a nd to Method Newton's Use k k k k k e e
Eample Estmates o the root o: -cos..6 Intal guess.74473944598 correct dgt.73994768864 4 correct dgts.739853347 correct dgts.739853356 4 correct dgts 8
Eample In estmatng the root o: -cos, to get more than 3 correct dgts: 4 teratons o Newton.8 43 teratons o Bsecton method ntal nterval [.6,.8] 5 teratons o Secant method.6,.8 8