Solvi Noliear Equatio oot r
Noliear Equatios Give uctio, we id value or which Solutio is root o equatio, or zero o uctio So problem is kow as root idi or zero idi Numerical Methods We-Chieh Li
Noliear Equatios: two cases Sile oliear equatio i oe ukow, where Solutio is scalar or which = System o coupled oliear equatios i ukows, where Solutio is vector or which all compoets o are zero simultaeously, = Numerical Methods We-Chieh Li 3
Eamples: Noliear Equatios Eample o -D oliear equatio 3 si e or which =.364 is oe approimate solutio Eample o system o oliear equatios i two dimesios 4 e or which = [-.8,.8] is oe approimate solutio vector Numerical Methods We-Chieh Li 4
Multiplicity I = = = = m- = but m, the root has multiplicity m I m = =,, the is simple root Numerical Methods We-Chieh Li 5
Iterval Halvi Bisectio Bisectio method beis with iitial bracket ad repeatedly halves its leth util solutio has bee isolated as accurately as desired while b-a > tol, m = a + b-/; I a*m <, b = m; else a = m; a m b ed; ed; http://www.cse.uiuc.edu/iem/oliear_eqs/bisectio/ Numerical Methods We-Chieh Li 6
Bisectio cot. Simple ad uarateed to work i is cotiuous i [a, b] [a, b] brackets a root Needed iteratios to achieve a speciied accuracy is kow i advace Error ater iteratios < b - a / Slow to covere Good or iitial uess or other root idi alorithms Fidi the iitial bracket may be a problem i is ot ive eplicitly Numerical Methods We-Chieh Li 7
Use raphi to assist root idi Set the iitial bracket Detect multiple roots Numerical Methods We-Chieh Li 8
Ca we id a root i a better way? Bisectio oly utilizes uctio values We ca id a root with ewer iteratios i other iormatio is used liear approimatio o Secat lie secat method Taet lie Newto s method Polyomial approimatio o Muller s method Numerical Methods We-Chieh Li 9
Numerical Methods We-Chieh Li Secat Method Approimate a uctio by a straiht lie Compute the itersectio o the lie ad -ais oot r
Secat Method cot. Update edpoits i, swap with epeat Numerical Methods We-Chieh Li oot r
Eample = 3 + si ep Fid the root i [, ] http://www.cse.uiuc.edu/iem/oliear_eqs/secat/.5.5 -.5 -.5.5 Numerical Methods We-Chieh Li
Method o False Positio Problem o secat method emedy Always bracket a root i the iterval [, ] How to do this? Numerical Methods We-Chieh Li 3
Numerical Methods We-Chieh Li 4 Newto s method Better approimatio usi the irst derivative ' ta ' '
Iterpretatio o Newto s method Trucated Taylor series h h ' is a liear uctio o h approimati ear eplace oliear uctio by this uctio, whose zero is h = - / Zeros o oriial uctio ad liear approimatio are ot idetical, so repeat process ' Numerical Methods We-Chieh Li 5
Eample: Newto s method http://www.cse.uiuc.edu/iem/oliear_eqs/newto/ Numerical Methods We-Chieh Li 6
Numerical Methods We-Chieh Li 7 Compariso o Secat ad Newto s methods ' Secat method Newto s method
Pros ad Cos o Newto s method Pros eiciet Cos Need to kow the derivative uctio Numerical Methods We-Chieh Li 8
Whe will Newto s method ot covere? ' passi maimum/miimum = 6, loop Numerical Methods We-Chieh Li 9
Muller s method Istead o liear approimatio, Muller s method uses quadratic approimate Evaluatio o derivatives are ot required See the tetbook or details Numerical Methods We-Chieh Li
Fied-poit Iteratio Method earrae = ito a equivalet orm = = = I r is a root o, the r = r-r = r=r I iterative orm, Also called uctio iteratio For ive equatio =, there may be may equivalet ied-poit problems = with dieret choice o Will the method always covere? Numerical Methods We-Chieh Li
Eample: Fied-poit Iteratio 3 3 3 Numerical Methods We-Chieh Li
Eample: Fied-poit Iteratio cot. 3 Divere! 3 3 Numerical Methods We-Chieh Li 3
Coverece ate For eeral iterative methods, deie error at iteratio by e = where is approimate solutio ad is true solutio For methods that maitai iterval kow to cotai solutio, rather tha speciic approimate value or solutio, take error to be leth o iterval cotaii solutio Numerical Methods We-Chieh Li 4
Coverece ate cot. Sequece coveres with rate r i lim or some iite ozero costat C Some cases o iterest r=: liear C< r>: superliear r=: quadratic e e r C Numerical Methods We-Chieh Li 5
Coverece ate o Bisectio Leth o iterval cotaii solutio reduced by hal at each iteratio Liearly coveret r = C =.5 Numerical Methods We-Chieh Li 6
Coverece o Fied-poit Iteratio I = ad <, the there is a iterval cotaii such that iteratio + = coveres to i started withi that iterval I >, the iterative scheme diveres Numerical Methods We-Chieh Li 7
Numerical Methods We-Chieh Li 8 Proo o Coveret Coditio e e ' ' Mea Value Theorem, C e e r lim Fied-poit iteratio is liearly coveret C '
Coverece o Newto s Method epreset Newto s method i ied-poit iteratio orm ' Coditio or coverece " ' [ ' ] Numerical Methods We-Chieh Li 9
Numerical Methods We-Chieh Li 3 Coverece rate o Newto s method " ' ' ] ' [ " ' " " e e C e e r lim Newto s method is quadratically coveret! ecall that
Questio rom the last class Is the iitial solutio importat or the coverece o ied-poit iteratio? Numerical Methods We-Chieh Li 3
Aswer to the coverece problem o ied-poit Iteratio < is a ecessary coditio i >, the ied-poit iteratio will divere eve i the iitial coditio is very close to a root sice the iteratio will evetually reach the reio causi diverece Iitial solutio is importat but less critical The alorithm may ot covere i the iitial solutio is ar rom the true solutio ecall the coditios that Newto s method does ot covere? Numerical Methods We-Chieh Li 3
Eample: Newto s Method or Fidi = 3 + + 5 Comple oots Numerical Methods We-Chieh Li 33
Start Newto s method with a comple value 3 5 ' 3 4 i 5 i ' 3 i 5 i i.48638. 4587i ' 3 i.44839. 3665i ' Numerical Methods We-Chieh Li 34
Numerical Methods We-Chieh Li 35 Newto s Methods or Multiple oots Quadratically coveret or simple root, Liearly coveret or multiple roots as ' ] ' [ " ' ] ' [ " '
emedies or Multiple oots with Newto s method I has a root o multiplicity k at =, we ca actor out - k rom to et k Q With a slihtly modiied Newto s method ' It ca be proved that ' k ad Newto s method still coveres quadratically k k Numerical Methods We-Chieh Li 36
emedies or Multiple oots with Newto s method cot. I practice, we do t kow k i advace emedies Try ad error Delate /-s where s is a approimate Be wared that a idetermiate orm at = is created Numerical Methods We-Chieh Li 37
Systems o Noliear Equatios Solvi systems o oliear equatios is much more diicult tha scalar case because Wide variety o behavior is possible, so determii eistece ad umber o solutios or ood starti uess is much more comple I eeral, there is o simple way to uaratee coverece to desired solutio or to bracket solutio to produce absolutely sae method Computatioal overhead icreases rapidly with dimesio o problem Numerical Methods We-Chieh Li 38
Eample: Systems i Two Dimesios From Michael T. Heath Numerical Methods We-Chieh Li 39
Numerical Methods We-Chieh Li 4 Newto s Method I dimesios, Newto s method has orm where J is Jacobia matri o I practice, we do ot eplicitly ivert J, but istead solve liear system or Newto step s, the take as et iterate J s J s
Numerical Methods We-Chieh Li 4 Eample: Newto s Method 4,, e e J T.7 83...783 3.4 J s J.83..783 3.4 s T.798] [.43 s
Numerical Methods We-Chieh Li 4 Eample: Newto s Method 4,, e e J T.798.43 4.965 4 8.653 e e.73 3.4596.86 J s J 4.965 4 8.653.73 3.4596.86 e e s T.79637] [.469 s
Fied-Poit Iteratio Fied-poit problem or vector such that Correspodi ied-poit iteratio is Coveres i starts close eouh to solutio J : is to id J : Jacobia matri : true solutio A : maimum comple orm o the eievalues o a matri A Numerical Methods We-Chieh Li 43
Fied-Poit Iteratio cot. Coverece rate is ormally : liear, with costat C ive by J I J the coverece rate is at least quadratic, e.., Newto s method Numerical Methods We-Chieh Li 44
Numerical Methods We-Chieh Li 45 Eample: Fied-poit Iteratio 4,, e 4 l T.7. -.7358756888.555387438 -.79388579.398634834 -.79746479957.48743976 -.796466478.463985 -.796466783
Net Moday Itroductio to Matlab/Octave Matlab oers a studet versio with discouted price Octave is a shareware that has similar eviromet as Matlab! You are ecouraed to bri your laptop with Octave or Matlab istalled et Moday Numerical Methods We-Chieh Li 47