CHAPTER 4d. ROOTS OF EQUATIONS A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng by Dr. Ibrahm A. Assakka Sprng 00 ENCE 03 - Computaton Methods n Cvl Engneerng II Department o Cvl and Envronmental Engneerng Unversty o Maryland, College Park A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Although the bsecton method wll always converge on the root, the rate o convergence s very slow. A aster method or convergng on a sngle root o a uncton s the Newton- Raphson method. Perhaps t s the most wdely used method o all locatng ormulas. Assakka Slde No. 03
A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Dervaton o ( Lne tangent to the curve at pont slope ( ( slope tanθ + ( ( Root θ + - + Assakka Slde No. 04 A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Dervaton o Graphcal Dervaton From the prevous gure, d Slope ( d or or + + ( ( ( ( ( ( Assakka Slde No. 05 + 0
A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Dervaton o Dervaton usng Taylor Seres Recall Taylor seres epanson, h! ( ( ( ( ( ( 3 ( ( n ( 0 + h 0 + h 0 + 0 + 0 +... + ( 0 + Rn+ 3 h 3! n h n! I we let 0 + h +h + and termnate the seres at ts lnear term, then or ( ( ( ( + h + ( ( ( + ( ( + + + Assakka Slde No. 06 A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Dervaton o Dervaton usng Taylor Seres ( h 0 X Assakka Slde No. 07 3
A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Dervaton o Dervaton usng Taylor Seres ( + X Assakka Slde No. 08 A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Dervaton o Note that snce the root o the uncton relatng ( and s the value o when ( + 0 at the ntersecton, hence, or or ( 0 ( + ( ( + ( ( - ( + + ( ( + Assakka Slde No. 09 4
A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Newton-Raphson Iteraton where + ( ( value o the root at teraton + a revsed value o the root at teraton + ( value o the uncton at teraton ( dervatve o ( evaluated at teraton Assakka Slde No. 0 A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Eample Use the Newton-Raphson teraton method to estmate the root o the ollowng uncton employng an ntal guess o 0 0: ( e Let s nd the dervatve o the uncton rst, ( ( d d e Assakka Slde No. 5
A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Eample (cont d The ntal guess s 0 0, hence, 0: (0 e -(0-0 (0 -e -(0 - --- ( ( + ( 0 ( 0 ( 0 0 0.5 ( e ( d d e Assakka Slde No. A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Eample (cont d Now 0.5, hence, (0 e -(0.5 (0.5 0.065 (0 -e -(0.5 - -.6065 ( + ( ( ( 0.5 0.065.6065 ( 0.5663 ( e ( d d e Assakka Slde No. 3 6
A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Eample (cont d Now 0.5663, hence, (0 e -(0.5663 (0.5663 0.003 (0 -e -(0.5663 - -.5676 ( + 3 ( ( ( 0.5663 ( 0.003.5676 ( e ( d d 0.567 e Assakka Slde No. 4 A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Eample (cont d Now 3 0.567, hence, d ( 3 d (0 e -(0.567 (0.567 0.00006784 (0 -e -(0.567 - -.5676784 ( + 4 3 ( ( 3 ( 0.567 3 0.00006784.5676784 ( e ( e 0.567 Assakka Slde No. 5 7
A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Eample (cont d Thus, the approach rapdly converges on the true root o 0.567 to our sgncant dgts. ( ' ( Percent ε r 0 0 - --- 0.5 0.0653 -.6065307 00 0.5663003 0.00305 -.567655.7099 3 0.5674365.96E-07 -.567434 0.46787 4 0.567439 4.44E-5 -.567433.06E-05 5 0.567439 0 -.567433 5.0897E-3 Hence, the root s 0.567. Assakka Slde No. 6 A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Eample The ollowng polynomal has a root wthn the nterval 3.75 5.00: I a tolerance o 0.00 (0.% s requred, nd ths root usng both the bsecton and Newton-Raphson methods. Compare the rate o convergence on the root between the two methods. 3 ( 0 8 0 Assakka Slde No. 7 8
A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Eample (cont d s m Bsecton Method: 3.75, + 3.75 + 5.00 4.375 3 ( s ( 3.75 ( 3.75 ( 3.75 0( 3.75 8 3 ( m ( 4.375 ( 4.375 ( 4.375 0( 4.375 3 ( e ( 5 ( 5 ( 5 0( 5 8 4.000 ( s ( m < 0 (negatve ( ( > 0 (postve m s e e 5.00 e 3 ( 0 8 0 Assakka Slde No. 8 6.88 8.850 A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Eample (cont d Bsecton Method: s m 3.75 + 4.375 3.75 + 4.375 4.063 ( s ( 3.75 6.88 ( m ( 4.063.98 ( ( 4.375. 850 e s e e 3 ( 0 8 0 ( ( < 0 (negatve s m Assakka Slde No. 9 9
A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Eample (cont d Bsecton Method: Iteraton s m e ( s ( m ( e ( s ( m ( m ( e error ε d error ε d 3.7500 4.3750 5.0000-6.88.8496 4.0000 - + --- --- 3.7500 4.065 4.3750-6.88.98.8496 - + 0.350 7.69 3 3.7500 3.9063 4.065-6.88 -.766.98 + - 0.565 4.00 4 3.9063 3.9844 4.065 -.766-0.466.98 + - 0.0783.96 5 3.9844 4.034 4.065-0.466 0.709.98 - + 0.03906 0.97 6 3.9844 4.0039 4.034-0.466 0.74 0.709 - + 0.0953 0.49 7 3.9844 3.994 4.0039-0.466-0.754 0.74 + - 0.00977 0.4 8 3.994 3.9990 4.0039-0.754-0.093 0.74 + - 0.00488 0. 9 3.9990 4.005 4.0039-0.093 0.0440 0.74 - + 0.0044 0.06 0 3.9990 4.000 4.005-0.093 0.0073 0.0440 - + 0.00 0.03 3.9990 3.9996 4.000-0.093-0.00 0.0073 + - 0.0006 0.0 3.9996 3.9999 4.000-0.00-0.008 0.0073 + - 0.0003 0.0 3 3.9999 4.000 4.000-0.008 0.007 0.0073 - + 0.0005 0.00 4 3.9999 4.0000 4.000-0.008 0.0005 0.007 - + 0.00008 0.00 5 3.9999 4.0000 4.0000-0.008-0.0007 0.0005 + - 0.00004 0.00 Assakka Slde No. 0 A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Eample (cont d Newton-Raphson Iteraton: The ntal guess s 0 3.75, hence, 0: (3.75 (3.75 3 (3.75 0(3.75-8 -6.88 (3.75 3(3.75 (3.75 0 4.6875 + 0 ( ( ( 0 ( 0 6.88 3.75 4.066 4.6875 3 ( 0 8 ( 3 0 Assakka Slde No. 0
A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Eample (cont d Newton-Raphson Iteraton: Now we have 4.066, hence, : (4.066 0.805 (4.066 30.5869 + ( ( ( ( 4.066 0.805 30.5869 3 ( 0 8 ( 3 0 4.0003 Assakka Slde No. A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Eample (cont d ( ' ( ε d Percent ε r 0 3.75-6.88 4.688 --- --- 4.066 0.8053 30.587 0.766 6.87 4.0003 0.0077 30.006 0.063 0.66 3 4 7E-07 30 0.0003 0.0 4 4 3E-4 30 0.0000 0.00 5 4 0 30 0.0000 0.00 The rate o convergence wth Newton-Raphson teraton s much aster than the bsecton method. N-R method converges to the eact root n 3 teratons. Assakka Slde No. 3
A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Ptalls o the Nonconvergence Nonconvergence can occur the ntal estmate s selected such that the dervatve o the uncton equals zero. In such case, ( would be zero and ( / ( would go to nnty. + ( ( ( 0 Assakka Slde No. 4 A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Ptalls o the Nonconvergence ( Zero Slope, ( 0 0 Assakka Slde No. 5
A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Ptalls o the ( Nonconvergence Nonconvergence can also occurs ( / ( equals -( + / ( + as shown 0 0 Assakka Slde No. 6 A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Ptalls o the Ecessve Iteraton A large number o teratons wll be requred the value o ( s much larger than (. In ths case, ( / ( s small, whch leads to a smaller adjustment at each teraton. Ths stuaton can occur, or eample, when the root o a polynomal s near zero. ( + small number ( Assakka Slde No. 7 3
Secant Method A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng A potental problem n utlzng Newton- Raphson method s the evaluaton o the dervatve. Although ths s not true or polynomals and many other unctons, there are certan unctons whose dervatves may be etremely dcult or nconvenent to evaluate. Assakka Slde No. 8 Secant Method A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng The secant method s smlar to the Newton-Raphson method wth the derence that the dervatve ( s numercally evaluated, rather computed analytcally. Assakka Slde No. 9 4
Secant Method ( - ( A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Development o the Secant Method ( ( ( Root + + ( + X - + Assakka Slde No. 30 Secant Method A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Development o the Secant Method Usng the geometrc smlartes o two trangles o the prevous gure, Hence ( ( or + + + ( [ ] ( ( Assakka Slde No. 3 5
Secant Method A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng The Secant Method A new estmate o the root can be obtaned usng values o the uncton ( and ( - at two other estmates and - o the root, and applyng the ollowng teratve procedure: + ( [ ] ( ( Assakka Slde No. 3 Secant Method A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Eample Use the secant method to estmate the root o the ollowng uncton: ( e Start wth ntal estmates o - 0 and. Assakka Slde No. 33 6
Secant Method A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Eample (cont d Frst teraton, : 0 0 (0 ( 0 e ( ( e ( [ 0 ] ( ( 0 (0 0.63 [ ] ( 0.63 0.63 0 0.670 Assakka Slde No. 34 Secant Method 3 A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Eample (cont d Second teraton, :, 0.670, ( 0.63 ( 0.670 ( [ ] ( ( 0.0708 0.0708 0.670 0.63 [ 0.670] ( 0.0708 0.56384 Assakka Slde No. 35 7
Secant Method A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Eample (cont d Thrd teraton, 3: 0.670, ( 0.0708 0.56384, ( 0.56384 0.0058 ( 3[ 3] 3 0.56384 ( ( 3 ( 0.5677 0. 00004 3 4 [ 0.56384] 0.0058 0.670 0.0708 0.0058 Hence, the root s 0.5677 to 4 sgncant dgts. 0.5677 Assakka Slde No. 36 Polynomal Reducton A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Ater one root o a polynomal has been ound, the process can be repeated usng a new estmate. However, proper consderaton s not gven to the selecton o the new ntal estmate o the second root, then applcaton o some method mght result n the same root beng ound. Assakka Slde No. 37 8
Polynomal Reducton A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Denton Polynomal reducton states that the polynomal ( equals zero and root s the root o (, then there s a reduced polynomal * ( such that ( * ( 0, where * ( ( I ( s a polynomal o order n, the reduced polynomal s o order n. Assakka Slde No. 38 Polynomal Reducton A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Eample Usng Newton-Raphson teraton, a root o 4 was ound or the ollowng polynomal: 3 0 8. Reduce ths polynomal. + 3 + 88888888-4 3 0 8 3 4 *********** 3 0 3 ****** 8 8*** 0 error Assakka Slde No. 39 9
Polynomal Reducton A. J. Clark School o Engneerng Department o Cvl and Envronmental Engneerng Eample The reduced polynomal + 3 + can be used to nd addtonal roots or the orgnal polynomal 3 0 8. Any other method then can be used to nd a root o the reduced polynomal, and the polynomal can be reduced agan usng polynomal reducton untl all o the roots are ound. Assakka Slde No. 40 0