The Islamc Unversty o Gaza Faculty o Engneerng Cvl Engneerng Department Numercal Analyss ECIV 3306 Chapter 6 Open Methods & System o Non-lnear Eqs Assocate Pro. Mazen Abualtaye Cvl Engneerng Department, The Islamc Unversty o Gaza
PART II: ROOTS OF EQUATIONS Bsecton method Bracketng Methods False Poston Method Roots o Equatons Open Methods System o Nonlnear Equatons Roots o polynomals Smple ed pont teraton Newton Raphson Secant Moded Newton Raphson Muller Method
Open Methods Bracketng methods are based on assumng an nterval o the uncton whch brackets the root. The bracketng methods always converge to the root. Open methods are based on ormulas that requre only a sngle startng value o or two startng values that do not necessarly bracket the root. These method sometmes dverge rom the true root.
Open Methods- Convergence and Dvergence Concepts + + Dvergng ncrements Convergng ncrements
6. Smple Fed-Pont Iteraton Rearrange the uncton =0 so that s on the let sde o the equaton: 0 g g Bracketng methods are convergent. Fed-pont methods may sometme dverge, dependng on the statng pont ntal guess and how the uncton behaves.
6. Smple Fed-Pont Iteraton Eamples:. 2. = 2-2+3 = g= 2 +3/2 3. = sn = g= sn + 3. = e - - = g= e - g or g or g 2 2 2 0 2 2 2
Smple Fed-Pont Iteraton Convergence = g can be epressed as a par o equatons: y = y 2 = g. component equatons Plot them separately.
Smple Fed-Pont Iteraton Convergence to compute a new estmate + as epressed by the teratve ormula g Suppose that the true root: r g r Subtractng rom 2 2 g g 3 r r
Smple Fed-Pont Iteraton Convergence Dervatve mean value theorem: I g are contnuous n [a,b] then there est at least one value o = wthn the nterval such that: g ' g b g a b a.e. there est one pont where the slope parallel to the lne jonng a & b
Smple Fed-Pont Iteraton Convergence g g r r Let g ' a and b g r r ' r r ' ', t, ' g t ' g r r g g g then g E g E I I g r ' g b g a.0 the error decreases wth each teraton.0 the error ncreases wth each teraton g b a
Smple Fed-Pont Iteraton Convergence Fed-pont teraton converges : g slope o the lne When the method converges, the error s roughly proportonal to or less than the error o the prevous step, thereore t s called lnearly convergent.
Smple Fed-Pont Iteraton-Convergence
Eample 6.: Smple Fed-Pont Iteraton = e - -. s manpulated so that we get =g g = e - 2. Thus, the ormula predctng the =e - - Root new value o s: + = e - 3. Guess 0 = 0 4. The teratons contnues tll the appro. error reaches a certan lmtng value
Eample 6.: Smple Fed-Pont Iteraton g = e - Recall true root s 0.5674329 g e a % e t % 0 0.0.0 0.367879 00.0 76.3 2 0.367879 0.69220 7.8 35. 3 0.69220 0.500473 46.9 22. 4 0.500473 0.606244 38.3.8 5 0.606244 0.545396 7.4 6.89 6 0.545396 0.57962.2 3.83 7 0.57962 0.5605 5.90 2.2 8 0.5605 0.5743 3.48.24 9 0.5743 0.564879.93 0.705 0 0.564879. 0.399
Flow Chart Fed Pont Start Input: o, e s, ma =0 e a =.e s
whle e a < e s & >ma False n g 0 Prnt: o, o,e a, = or n =0 Stop True e a n n o 00% 0 = n
6.2 The Newton-Raphson Method Most wdely used method. Based on Taylor seres epanson: 0 Rearrangn g, 0 when the value o The root s... 2! 2 Solve or Newton-Raphson ormula
6.2 The Newton-Raphson Method A tangent to at the ntal pont s etended tll t meets the -as at the mproved estmate o the root +. The teratons contnues tll the appro. error reaches a certan lmtng value. Slope / Root / + 0 /
Eample 6.3: The Newton Raphson Method / e e e e Fnd the root o = e - -= 0 = e - - and ` = -e - -; thus Iter. X + e t % 0 0 00 0.5.8 2 0.5663003 0.47 3 0.5674365 0.00002 4 0.56743290 <0-8 Recall true root s 0.5674329
Flow Chart Newton Raphson Start Input: o, e s, ma =0 e a =.e s
whle e a >e s & <ma False n 0 ' = or n =0 0 0 Prnt: o, o,e a, Stop True e a n n o 00% 0 = n
Ptalls o The Newton Raphson Method
6.3 The Secant Method The dervatve s replaced by a backward nte dvded derence Thus, the ormula predctng the + s: / / /
6.3 The Secant Method Requres two ntal estmates o, e.g, o,. However, because s not requred to change sgns between estmates, t s not classed as a bracketng method. The secant method has the same propertes as Newton s method. Convergence s not guaranteed or all o,,.
6.3 Secant Method: Eample Use the Secant method to nd the root o e - -=0; = e - - and - =0, = to get + o the rst teraton usng: Recall true root s 0.5674329 - + Iter - - + e t % 0.0.0-0.632 0.63 8.0 2.0-0.632 0.63-0.0708 0.5638 0.58 3 0.63-0.0708 0.5638 0.0058 0.5672 0.0048
Comparson o convergence o False Poston and Secant Methods False Poston Secant Method r u u l u l u Use two estmate l and u Use two estmate and - must changes sgns between l and u X r replaces whchever o the orgnal values yelded a uncton value wth the same sgn as r Always converge s not requred to change sgns between and - X + replace X replace - May be dverge
Comparson o convergence o False Poston and Secant Methods Use the alse-poston and secant methods to nd the root o = ln. Start computaton wth l = - =0.5, u = = 5.. False poston method 2. Secant method
False Poston and Secant Methods Although the secant method may be dvergent, when t converges t usually does so at a qucker rate than the alse poston method l u -
Comparson o the true percent relatve Errors E t or the methods to the determne the root o =e - -
Flow Chart Secant Method Start Input: -, 0,e s, ma =0 e a =.e s
whle e a >e s & < ma False Prnt:,,e a, = or X + =0 Stop True e a 00% X - = X = +
6.3.3 Moded Secant Method Rather than usng two ntal values, an alternatve approach s usng a ractonal perturbaton o the ndependent varable to estmate / s a small perturbaton racton /
Moded Secant Method: Eample 6.8 Use moded secant method to nd the root o = e - -, 0 = and = 0.0. Recall true root s 0.5674329
6.5 Multple Roots = -3-- = 3-5 2 +7-3 = -3--- = 4-6 3 + 25 2-0+3 Double roots 3 trple roots 3
6.5 Multple Roots Multple root corresponds to a pont where a uncton s tangent to the -as. Dcultes - Functon does not change sgn wth double or even number o multple root, thereore, cannot use bracketng methods. - Both and =0, dvson by zero wth Newton s and Secant methods whch may dverge around ths root.
Moded Newton-Raphson Method or Multple Roots Another alternatve s ntroduced such new u=/ / ; Gettng the roots o u usng Newton-Raphson technque: ] [ // 2 / / 2 / // / / / / u u u Ths uncton has roots at all the same locatons as the orgnal uncton Derentate u=/ /
Usng the Newton-Raphson and Moded Newton-Raphson to evaluate the multple roots o = 3-5 2 +7-3 wth an ntal guess o 0 =0 0 36 7 5 7 0 3 7 0 33 7 5 2 3 2 2 2 2 3 // 2 / / 7 0 3 3 7 5 2 2 3 / Newton Raphson ormula: Moded Newton Raphson ormula: Eample 6.0 Moded Newton-Raphson Method or Multple Roots
Moded Newton Raphson Method: Eample Newton Raphson Moded Newton-Raphson Iter e t % ter e t % 0 0 00 0 0 00 0.4286 57.0526 2 0.6857 3 2.00308 0.3 3 0.83286 7 3.000002 00024 4 0.9332 8.7 5 0.95578 4.4 6 0.97766 2.2 Newton Raphson technque s lnearly convergng towards the true value o.0 whle the Moded Newton Raphson s quadratcally convergng. For smple roots, moded Newton Raphson s less ecent and requres more computatonal eort than the standard Newton Raphson method.
6.6 Systems o Nonlnear Equatons Roots o a set o smultaneous equatons:, 2,., n =0 2, 2,., n =0.. n, 2,., n =0 The soluton s a set o values that smultaneously get the equatons to zero.
6.6 Systems o Nonlnear Equatons Eample: 2 + y = 0 and y + 3y 2 = 57 u,y = 2 + y -0 = 0 v,y = y+ 3y 2-57 = 0 The soluton wll be the value o and y whch makes u,y=0 and v,y=0 These are =2 and y=3 Numercal methods used are etenson o the open methods or solvng sngle equaton; Fed pont teraton and Newton-Raphson.
6.6 Systems o Nonlnear Equatons. Use an ntal guess =.5 and y =3.5 2. The teraton ormulae: + =0-2 /y and y + =57-3 y 2 3. Frst teraton, =0-.5 2 /3.5 = 2.2429 y=57-32.24293.5 2 = -24.3756 4. Second teraton:. Fed Pont Iteraton =0-2.2429 2 /-24.3756 = -0.209 y=57-3-0.209-24.3756 2 = 429.709 2 + y = 0 y + 3y 2 = 57 5. Soluton s dvergng so try another teraton ormula
6.6 Systems o Nonlnear Equatons. Usng teraton ormula:. Fed Pont Iteraton + =0- y /2 and y + =[57-y /3 ] /2 Frst guess: =.5 and y=3.5 2. st teraton: =0-.53.5 /2 =2.7945 y=57-3.5/32.7945 /2 =2.8605 3. 2nd teraton: =0-2.79452.8605 /2 =.94053 y=57-2.8605/3.94053 /2 = 3.04955 2 + y = 0 y + 3y 2 = 57 4. The approach s convergng to true root, =2 and y=3
6.6 Systems o Nonlnear Equatons. Fed Pont Iteraton The sucent condton or convergence or the two-equaton case u,y=0 and v,y=0 are: u v and u y v y
MS Ecel: Solver u,y= 2 +y-0 =0 v,y=y+3y 2-57=0