Muller's Method (Exercise 6
Muller's Method (Exercise 6
Solve the following problems using Muller’s method and show the graph of a function.
1. Find a root of a function f ( x )=cos x−x e x, let the initial guess be 1.0, 2.0 and 3.0.
f ( x )=cos x−x e x
First Iteration
x0 = 1 f (x¿ ¿ 0) ¿= -2.177979523
x1 = 2 f (x¿ ¿1) ¿= -15.19425903
x2 = 3 f (x¿ ¿2)¿= -61.24660327
2
( x 0−x 2 ) x 0−x 2 x
[ 2
( x 1−x 2 ) x 1−x 2 y ][ ] = ¿
[ 41 −2 ]
−1 y [ x
] [ 59.06862374
46.05234423 ]
=
Let:
a=4 c = -2 e = 59.06862374
b=1 d = -1 f = 46.05234423
It takes the form of
[ ab cd ] [ xy ] [ ef ]
=
ed−fc af −be
Where: determinant of x = , and determinant of y =
ad−bc ad−bc
ed−fc ( 59.06862374 ) (−1 )−( 46.05234423 )(−2 )
x= = =−16.51803236
ad−bc ( 4 )(−1 ) −( 1 )(−2 )
af −be ( 4 ) ( 46.05234423 )−( 1 ) ( 59.06862374 )
y= = =−62.57037569
ad−bc ( 4 ) (−1 )−( 1 ) (−2 )
z=f (x ¿¿ 2)¿= -61.24660327
y 2−4 xz=(−62.57037569 )2 −4 (−16.51803236 )(−61.24660327 ) =−131.6414719
y + √ y 2−4 xz = −62.57037569 + √ −131.6414719 = 63.61362668 (greater magnitude,
y− √ y 2−4 xz = −62.57037569 −√−131.6414719 = 63.61362668 + angle)
2z −2 (−61.24660327 )
x 3=x 2− 2 =3 =¿1.105997881-0.3473026182i
y+ √ y −4 xy 63.61362668
x 3=¿1.105997881-0.3473026182i
Second Iteration
x0 = 2 f (x¿ ¿ 0) ¿= -15.19425903
x1 = 3 f (x¿ ¿1) ¿= -61.24660327
x 2 = 1.105997881-0.3473026182i f (x¿ ¿2)¿= -2.310213598 + 2.441392192i
2
( x 0−x 2 ) x 0−x 2 x
[ 2
][ ]
( x 1−x 2 ) x 1−x 2 y
= ¿
i
[−12.88404543−2.441392192
−58.93638967−2.441392192 i ]
Let:
a = 0.6786206802+0.6209785532i d = 1.894002119+0.3473026182 i
b = 3.466624918+1.31558379 i e = −12.88404543−2.441392192 i
c = 0.894002119+ 0.3473026182i f = −58.93638967−2.441392192i
x=−16.89013676+1.781542196 i
y=2.274897158+ 6.765030252i
z=f (x ¿¿ 2)¿= -2.310213598 + 2.441392192i
y 2−4 xz=277.7779867 angle 2.27231529
y + √ y 2−4 xz = 23.77359796 angle 1.1691942 (greater magnitude)
y− √ y 2−4 xz = 9.604873572 angle−2.087282242
2z −2 (−2.310213598+ 2.441392192i )
x 3=x 2− 2 = 1.105997881-0.3473026182i =¿
y+ √ y −4 xy 23.77359796 angle1.1691942
0.9929230674-0.6064748232i
x 3=¿0.9929230674-0.6064748232i
Third Iteration
x0 = 3 f (x¿ ¿ 0) ¿= -61.24660327
x 1 = 1.105997881-0.3473026182i f (x¿ ¿1) ¿= -2.310213598 + 2.441392192i
x 2 = 0.9929230674-0.6064748232i f (x¿ ¿2)¿= -0.6192639184+3.412307804i
2
( x 0−x 2 ) x 0−x 2 x
[ 2
][ ]
( x 1−x 2 ) x 1−x 2 y
= ¿
3.660515568+2.434474029 i 2.007069326+0.6064748232 i x
[−0.0538603855+0.0586077547 i 0.113067207 +0.259172205i y
=][ ]
i
[−60.62733935−3.412307804
−1.69094968−0.970915612i ]
Let:
a = 3.660515568+2.434474029 i d = 0.113067207 +0.259172205i
b = −0.0538603855+0.0586077547 i e = −60.62733935−3.412307804i
c = 2.007069326+0.6064748232 i f = −1.69094968−0.970915612
x=−11.297549642+3.496041733 i
y=−3.355006869+ 6.640931187 i
z=f (x ¿¿ 2)¿= -0.6192639184+3.412307804i
y 2−4 xz=119.0271109 angle 1.68118342
y + √ y 2−4 xz = 15.28118212 angle 1.31122432 (greater magnitude)
y− √ y 2−4 xz = 10.73572407 angle−3.002598865
2z −2 (−0.6192639184+3.412307804 i )
x 3=x 2− 2 = 0.9929230674-0.6064748232i =¿
y+ √ y −4 xy 15.28118212 angle 1.31122432
0.582091954-0.7994369969i
x 3=¿0.582091954-0.7994369969i
Fourth Iteration
x 0 = 1.105997881-0.3473026182i f (x¿ ¿ 0) ¿= -2.310213598 + 2.441392192i
x 1 = 0.9929230674-0.6064748232i f (x¿ ¿1) ¿= -0.6192639184+3.412307804i
x 2 = 0.582091954−0.7994369969 i f (x¿ ¿2)¿= 1.416343137+2.232222841i
2
( x 0−x 2 ) x 0−x 2 x
[ 2
][ ]
( x 1−x 2 ) x 1−x 2 y
= ¿
[ 0.07005192394+0.4737517616
0.1315540534+0.1585526649 i
i 0.523905927+ 0.4521343787i
0.410838721+0.1929621737 i ] [ xy ] =
i
[−3.726556735+0.2091693507
−2.035607056+1.180084963 i ]
Let:
a = 0.07005192394+ 0.4737517616i d = 0.410838721+0.1929621737 i
b = 0.1315540534+ 0.1585526649i e = −3.726556735+0.2091693507 i
c = 0.523905927+0.4521343787 i f = −2.035607056+1.180084963 i
x=−2.970467992+2.274127925 i
y=−1.294810266+ 3.898705643i
z=f (x ¿¿ 2)¿= 1.416343137+2.232222841i
y 2−4 xz=23.87523014 angle 0.1489481176
y + √ y 2−4 xz = 5.564898951 angle 0.872470832
y− √ y 2−4 xz = 7.108814147 angle 2.621119899 (greater magnitude)
2z −2 ( 1.416343137+2.232222841 i )
x 3=x 2− 2 =0.582091954-0.7994369969i =¿
y+ √ y −4 xy 7.108814147 angle 2.621119899
0.6154966894-0.05642277796i
x 3=¿0.6154966894-0.05642277796i
Fifth Iteration
x 0 = 0.9929230674-0.6064748232i f (x¿ ¿ 0) ¿= -0.6192639184+3.412307804i
x 1 = 0.582091954−0.7994369969 i f (x¿ ¿1) ¿= 1.416343137+2.232222841i
x 2 = 0.6154966894−0.05642277796 i f (x¿ ¿2)¿= -0.3135355237+0.2010749832i
2
( x 0−x 2 ) x 0−x 2 x
[ 2
][ ]
( x 1−x 2 ) x 1−x 2 y
= ¿
−0.1601008399−0.4152166705 i 0.3774339846−0.5500520454 i x
[−0.5509542534+0.04964038678 i −0.0334047354−0.743014219 i y
=][ ]
i
[−0.3057283947+3.21123282
1.729878661+ 2.031147858 i ]
Let:
a = −0.1601008399−0.4152166705i d = −0.0334047354−0.743014219 i
b = −0.5509542534+ 0.04964038678i e = −0.3057283947+3.21123282 i
c = 0.3774339846−0.5500520454 i f = 1.729878661+2.031147858 i
x=−2.647936326+1.596235744 i
y=−4.107085248+0.2867085682 i
z=f (x ¿¿ 2)¿= -0.3135355237+0.2010749832i
y 2−4 xz=14.85552356 angle 0.1198766592
y + √ y 2−4 xz = 0.5790973673 angle 2.03587319
y− √ y 2−4 xz = 7.954646153 angle 3.134574385 (greater magnitude)
2z
x 3=x 2− =
y+ √ y2 −4 xy
2 (−0.3135355237+ 0.2010749832i )
0.6154966894−0.05642277796 i− =0.536313018−6.421918362 x 10−3 i
7.954646153 angle 3.134574385
x 3=0.536313018−6.421918362 x 10−3 i
Sixth Iteration
x 0 = 0.582091954−0.7994369969 i f (x¿ ¿ 0) ¿= 1.416343137+2.232222841i
x 1 = 0.6154966894−0.05642277796 i f (x¿ ¿1) ¿= -0.3135355237+0.2010749832i
x 2 = 0.536313018−6.421918362 x 10−3 i f (x¿ ¿2)¿=
-0.05722431921+0.02014911356i
2
( x 0−x 2 ) x 0−x 2 x
[ 2
][ ]
( x 1−x 2 ) x 1−x 2 y
= ¿
−0.6267772051−0.07260675117 i 0.0457789222−0.7930150785 i x
[ 3.76996567 x 10 −7.918501892 x 10 i 0.0791836576−0.0500008596 i y
−3 −3 = ][ ]
1.473567456+ 2.212073727i
[−0.2563112045+0.1809258696 i]
Let:
a = −0.6267772051−0.07260675117 i d = 0.0791836576−0.0500008596 i
b = 3.76996567 x 10−3−7.918501892 x 10−3 i e = 1.473567456+2.212073727 i
c = 0.0457789222−0.7930150785 i f = −0.2563112045+ 0.1809258696i
x=−2.54236105+ 0.7920293865i
y=−3.186348058−0.01609336598 i
z=f (x ¿¿ 2)¿= -0.05722431921+0.02014911356i
y 2−4 xz=9.653575562 angle 0.05040048128
y + √ y 2−4 xz = 9.653575562 angle 0.05040048128
y− √ y 2−4 xz = 6.293089726 angle 2.482652158 (greater magnitude)
2z
x 3=x 2− =
y+ √ y2 −4 xy
2 (−0.05722431921+ 0.02014911356 i )
0.536313018−6.421918362 x 10−3 i− =0.5182247045+2.53685524 x 10−
6.293089726 angle2.482652158
x 3=0.5182247045+2.53685524 x 10−4 i
Seventh Iteration
x 0 = 0.6154966894−0.05642277796 i f (x¿ ¿ 0) ¿= -0.3135355237+0.2010749832i
x 1 =0.536313018−6.421918362 x 10−3 i f (x¿ ¿1) ¿= -0.05722431921+0.02014911356i
x 2 =0.5182247045+2.53685524 x 10−4 i
f (x¿ ¿2)=−1.422100988 x 10−3−7.723468591 x 10− 4 i ¿
2
( x 0−x 2 ) x 0−x 2 x
[ 2
][ ]
( x 1−x 2 ) x 1−x 2 y
= ¿
−0.3121134227+ 0.2018473301i
[−0.05580221822+ 0.02092146042i ]
Let:
a = 6.249617533 x 10−3 −0.0110260642 i d = 0.0180883135−6.675603886 x 10−3 i
Seventh Iteration
x 0 = 0.536313018−6.421918362 x 10−3 i f (x ¿¿ 0) ¿= -0.05722431921+0.02014911356i
x 1 =0.5182247045+2.53685524 x 10−4 i f (x¿ ¿1) ¿=
−3 −4
−1.422100988 x 10 −7.723468591 x 10 i
x 2 = 0.5178101241−1.299069717 x 10−5 i
f (x¿ ¿2)=−1.60103777 x 10−4 +3.952279956 x 10−5 i ¿
2
( x 0−x 2 ) x 0−x 2 x
[ 2
][ ]
( x 1−x 2 ) x 1−x 2 y
= ¿
−0.05706380883+0.02010959076 i
[ −1.526159061 x 10−3−8.118696587 x 10− 4 i ]
Let:
a = 3.012827289 x 10−4−2.341674172 x 10−4 i d = 4.145784 x 10− 4 +2.66672212 x 10−4 i
x=−2.563939269+5.428822042 x 10−3
y=−3.042394654+7.485468976 x 10−5 i
z=f (x ¿¿ 2)¿=−1.60103777 x 10−4 +3.952279956 x 10−5 i
y 2−4 xz=9.254519929 angle −5.041131893 x 106
y + √ y 2−4 xz = 2.78625826 angle 2.89805964
y− √ y 2−4 xz = 6.084518901 angle 3.141579091 (greater magnitude)
2z
x 3=x 2− =
y+ √ y2 −4 xy
2 (−1.60103777 x 10−4 +3.952279956 x 10−5 i )
−5
0.5178101241−1.299069717 x 10 i− =0.5177573637−1.474655
6.084518901 angle3.141579091
x 3=0.5177573637−1.47465513 x 10−10 i
Thus, our root converges to 3 decimal places, and as we can see, our imaginary part converges to
zero. Therefore, our approximate root is equal to 0.517.
2. Find the root of a function f ( x )=x 4 −x−10, let the initial guess be 1.0, 2.0 and 3.0
f ( x )=x 4 −x−10
First Iteration
x0 = 1 f (x¿ ¿ 0) ¿= -10
x1 = 2 f (x¿ ¿1) ¿= 4
x2 = 3 f (x¿ ¿2)¿= 68
2
( x 0−x 2 ) x 0−x 2 x
[ 2
][ ]
( x 1−x 2 ) x 1−x 2 y
= ¿
[ 41 −2 x −78
−1 ] [ y ] [ −64 ]
=
Let:
a=4 c = -2 e = -78
b=1 d = -1 f = -64
ed−fc (−78 ) (−1 )−(−64 )(−2 )
x= = =25
ad−bc ( 4 )(−1 )−( 1 )(−2 )
af −be ( 4 ) (−64 ) −( 1 )(−78 )
y= = =89
ad−bc ( 4 )(−1 )− (1 ) (−2 )
z=f (x ¿¿ 2)¿= 68
y 2−4 xz=( 89 )2−4 (25)(68)=1121
y + √ y 2−4 xz = 89 + √ 1121 = 122.48 (greater magnitude)
y− √ y 2−4 xz = 89 −√ 1121 = 55.518
2z −2 ( 68 )
x 3=x 2− 2 =3 2
=¿1.889626762
y+ √ y −4 xy ( 89 ) + √ ( 89 ) −4 ( 89 ) ( 68 )
x 3=1.889626762
Second Iteration
x0 = 2 f (x¿ ¿ 0) ¿= 4
x1 = 1 f (x¿ ¿1) ¿= 68
x 2 = 1.889626762 f (x¿ ¿2)¿= 0.8601953128
2
( x 0−x 2 ) x 0−x 2 x
[ 2
][ ]
( x 1−x 2 ) x 1−x 2 y
= ¿
[ 0.01218225167
1.23298728
0.110373238
1.110373238 ] [ xy ] [ 3.139804687
=
67.13980469 ]
Let:
a = 0.01218225167 c = 0.110373238 e = 3.139804687
b = 1.23298728 d = 1.110373238 f = 67.13980469
ed−fc ( 3.139804687 ) (1.110373238 )−( 67.13980469 ) ( 0.110373238 )
x= = =32.01882456
ad−bc ( 0.01218225167 ) (1.110373238 )−( 1.23298728 ) ( 0.110373238 )
af −be ( 0.01218225167 4 ) ( 67.13980469 )−( 1.23298728 )( 3.139804687 )
y= = =24.9131329
ad−bc ( 0.01218225167 ) ( 1.110373238 )− (1.23298728 )( 0.110373238 )
z=f (x ¿¿ 2)¿= 0.8601953128
y 2−4 xz=( 24.9131329 )2−4(32.01882456)( 0.8601953128)=510.4944197
y + √ y 2−4 xz = 24.9131329 + √ 510.4944197 = 47.50725646 (greater magnitude)
y− √ y 2−4 xz = 24.9131329 −√ 510.4944197 = 2.319009336
2z 2 ( 0.8601953128 )
x 3=x 2− 2 = 1.889626762− =¿1.853413544
y+ √ y −4 xy 47.507
x 3=1.853413544
Third Iteration
x0 = 1 f (x¿ ¿ 0) ¿= 68
x 1 = 1.889626762 f (x¿ ¿1) ¿= 0.8601953128
x 2 = 1.853413544 f (x¿ ¿2)¿= -0.05321459779
2
( x 0−x 2 ) x 0−x 2 x
[ 2
][ ]
( x 1−x 2 ) x 1−x 2 y
= ¿
−6
af −be ( 12.29497328 ) (−0.05395124802 )−( 4.844321764 x 10 ) ( 0.8594586626 )
y= = =24.51235774
ad−bc ( 12.29497328 ) (−2.200982 x 10−3 )−( 4.844321764 x 10−6 ) ( 0.034012236 )
2z 2 ( 7.36650227 x 10−3 )
x 3=x 2− = 1.855614526− =¿1.855584474
y+ √ y2 −4 xy 49.02471535
x 3=1.855584474
Fifth Iteration
x 0 = 1.853413544 f (x¿ ¿ 0) ¿= -0.05321459779
x 1 = 1.855614526 f (x¿ ¿1) ¿= 7.36650227 x 10−3
x 2 = 1.855584474 f (x¿ ¿2)¿= −1.3417928 x 10−6
2
( x 0−x 2 ) x 0−x 2 x
[ 2
][ ]
( x 1−x 2 ) x 1−x 2 y
= ¿
4.71293065 x 10−6 −2.17093 x 10−3 x
[ 9.03122704 x 10−10 3.0052 x 10−5 ][ ] [
y
=
−0.03214463611
7.379920198 x 10−4 ]
Let:
a = 4.71293065 x 10−6 c = −2.17093 x 10−3 e = −0.03214463611
2z 2 (−1.3417928 x 10−6 )
x 3=x 2− = 1.855584474− =¿1.855584529
y+ √ y2 −4 xy 48.84856338
x 3=1.855584529
Thus our approximate root converges to 6 decimal places, our root is approximately equal to
1.85554.
3. Find a root of a function f ( x )=x−e−x ,let the initial guess be 1.0, 2.0 and 3.0
f ( x )=x−e−x
First Iteration
x0 = 1 f (x¿ ¿ 0) ¿= 0.6321205588
x1 = 2 f (x¿ ¿1) ¿= 1.864664717
x2 = 3 f (x¿ ¿2)¿= 2.950212932
2
( x 0−x 2 ) x 0−x 2 x
[ 2
][ ]
( x 1−x 2 ) x 1−x 2 y
= ¿
[ 41 −2 x −2.318092373
−1 ] [ y ] [−1.085548215 ]
=
Let:
a=4 c = -2 e = −2.318092373
b=1 d = -1 f = −1.085548215
ed−fc (−2.318092373 ) (−1 )−(−1.085548215 ) (−2 )
x= = =−0.0734979715
ad−bc ( 4 ) (−1 )−( 1 ) (−2 )
af −be ( 4 ) (−1.085548215 )−( 1 ) (−2.318092373 )
y= = =1.012050244
ad−bc ( 4 ) (−1 )−( 1 ) (−2 )
z=f (x ¿¿ 2)¿= 2.950212932
y 2−4 xz=( 1.012050244 )2−4 (−0.0734979715)(2.950212932)=1.891584359
y + √ y 2−4 xz = 1.012050244 + √ 1.891584359 = 2.387399058 (greater magnitude)
y− √ y 2−4 xz = 1.012050244 −√ 1.891584359 = -0.3632985696
2z −2 ( 2.950212932 )
x 3=x 2− 2 =3 =¿0.5285129454
y+ √ y −4 xy 2.387399058
x 3=0.5285129454
Second Iteration
x0 = 2 f (x¿ ¿ 0) ¿= 1.864664717
x1 = 3 f (x¿ ¿1) ¿= 2.950212932
x 2 = 0.5285129454 f (x¿ ¿2)¿= -0.06096796313
2
( x 0−x 2 ) x 0−x 2 x
[ 2
][ ]
( x 1−x 2 ) x 1−x 2 y
= ¿
[ 2.165274152
6.108248261
1.471487055
2.471487055 ] [ xy ] [ 3.011180895
=
1.92563268
]
Let:
a = 2.165274152 c = 1.471487055 e = 1.92563268
b = 6.108248261 d = 2.471487055 f = 3.011180895
ed−fc ( 1.92563268 ) ( 2.471487055 )−( 3.011180895 ) (1.471487055 )
x= = =−0.09026232829
ad−bc ( 2.165274152 )( 2.471487055 )− ( 6.108248261) ( 1.471487055 )
af −be ( 2.165274152) ( 3.011180895 )−( 6.108248261 ) (1.92563268 )
y= = =1.441450238
ad−bc ( 2.165274152 )( 2.471487055 ) −( 6.108248261 )( 1.471487055 )
z=f (x ¿¿ 2)¿= -0.06096796313
2 2
y −4 xz=( 1.441450238 ) −4(−0.09026232829)(−0.06096796313)=2.055766349
y + √ y 2−4 xz = 1.441450238 + √ 2.055766349 = 2.875244627 (greater magnitude)
y− √ y 2−4 xz = 1.441450238− √ 2.055766349=7.655849324 x 10
−3
2z −2 (−0.06096796313 )
x 3=x 2− 2 = 0.5285129454 =¿0.5790921833
y+ √ y −4 xy 2.875244627
x 3=0.5790921833
Third Iteration
x 0=3 f (x¿ ¿ 0)=¿ ¿2.950212932
x 1=0.5285129454 f (x¿ ¿1)=−0.06096796313¿
x 2=0.5790921833 f (x¿ ¿2)=5.917474101 x 10−3 ¿
2
( x 0−x 2 ) x 0−x 2 x
[ 2
][ ]
( x 1−x 2 ) x 1−x 2 y
= ¿
2z 2 ( 5.917474101 x 10−3 )
x 3=x 2− = 0.5790921833− =¿0.567156215
y+ √ y2 −4 xy 3.142896626
x 3=0.567156215
Fourth Iteration
x 0=0.5285129454 f (x¿ ¿ 0)=−0.06096796313 ¿
x 1=0.5790921833 f (x¿ ¿1) ¿ = 5.917474101 x 10−3
x 2=0.567156215 f (x¿ ¿2)=¿¿ 2.025463747 x 10−5
2
( x 0−x 2 ) x 0−x 2 x
[ 2
][ ]
( x 1−x 2 ) x 1−x 2 y
= ¿
Fifth Iteration
x 0=0.5790921833 f (x¿ ¿ 0)=5.917474101 x 10−3 ¿
x 1=0.567156215 f (x¿ ¿1) ¿ = 2.025463747 x 10−5
x 2=¿0.5671432907 f (x¿ ¿2)=4.5481 x 10−10 ¿
2
( x 0−x 2 ) x 0−x 2 x
[ 2
][ ]
( x 1−x 2 ) x 1−x 2 y
= ¿
2z 2 ( 4.5481 x 10−10 )
x 3=x 2− = 0.5671432907− =¿0.5671432
y+ √ y2 −4 xy 3.134286572
x 3=0.5671432
Thus, our approximate root converges to 7 decimal places, our root is approximately equal to
0.5671432.
4. Find a root of a function f ( x )=e−x ( x 2 +5 x+ 2 ) +1, let the initial guess be -2.0, 0 and -1.0
f ( x )=e−x ( x 2 +5 x+ 2 ) +1
First Iteration
x 0 = -2 f (x¿ ¿ 0) ¿= -28.5562244
x1 = 0 f (x¿ ¿1) ¿= 3
x 2 = -1 f (x¿ ¿2)¿= -4.436563657
2
( x 0−x 2 ) x 0−x 2 x
[ 2
][ ]
( x 1−x 2 ) x 1−x 2 y
= ¿
[ 11 −11 ] [ xy ] [−24.11966074
=
7.436563657 ]
Let:
a=1 c = -1 e = −24.11966074
b=1 d=1 f = 7.436563657
ed−fc (−24.11966074 )( 1 )− (7.436563657 )(−1 )
x= = =−8.341548542
ad−bc ( 1 )( 1 ) −( 1 )(−1 )
af −be ( 1 ) (7.436563657 )−( 1 ) (−24.11966074 )
y= = =15.7781122
ad−bc ( 1 ) (1 )−( 1 )(−1 )
z=f (x ¿¿ 2)¿= -4.436563657
y 2−4 xz=( 15.7781122 )2−4 (−8.341548542)(−4.436563657)=100.9175801
y + √ y 2−4 xz = 15.7781122 + √ 100.9175801 = 25.82388644 (greater magnitude)
y− √ y 2−4 xz = 15.7781122−√ 100.9175801 = 5.732337959
2z −2 (−4.436563657 )
x 3=x 2− 2 = -1 =¿-0.6563984537
y+ √ y −4 xy 2.387399058
x 3=−0.6563984537
Second Iteration
x0 = 0 f (x¿ ¿ 0) ¿= 3
x1 = 1 f (x¿ ¿1) ¿= -4.436563657
x 2 = -0.6563984537 f (x¿ ¿2)¿= -0.6408460213
2
( x 0−x 2 ) x 0−x 2 x
[ 2
][ ]
( x 1−x 2 ) x 1−x 2 y
= ¿
0.43085893 0.6563984537
[ 0.1180620226 −0.3436015463 ] [ xy ] [−3.795717636
=
3.6408460213
]
Let:
a = 0.43085893 c = 0.6563984537 e = 3.6408460213
b = 0.1180620226 d = −0.3436015463 f = −3.795717636
ed−fc ( 3.6408460213 )(−0.3436015463 )−(−3.795717636 ) ( 0.6563984537 )
x= = =−5.500157329
ad−bc ( 0.43085893 ) (−0.3436015463 )−( 0.1180620226 ) ( 0.6563984537 )
af −be ( 0.43085893 ) (−3.795717636 )− ( 0.1180620226 ) ( 3.6408460213 )
y= = =9.15699586
ad−bc ( 0.43085893 ) (−0.3436015463 )−( 0.1180620226 ) ( 0.6563984537 )
z=f (x ¿¿ 2)¿= -0.6408460213
y 2−4 xz=( 9.15699586 )2−4 (−5.500157329)(−0.6408460213)=69.75155741
y + √ y 2−4 xz = 9.15699586 + √ 69.75155741 = 17.50873564 (greater magnitude)
y− √ y 2−4 xz = 9.15699586−√ 69.75155741 = 0.8052560766
2z −2 (−0.6408460213 )
x 3=x 2− 2 = -0.6563984537 =¿-0.5831954499
y+ √ y −4 xy 2.387399058
x 3=−0.5831954499
Third Iteration
x0 = 1 f (x¿ ¿ 0) ¿= -4.436563657
x 1 = -0.6563984537 f (x¿ ¿1) ¿= -0.6408460213
x 2 = -0.5831954499 f (x¿ ¿2)¿= -0.03180046088
2
( x 0−x 2 ) x 0−x 2 x
[ 2
][ ]
( x 1−x 2 ) x 1−x 2 y
= ¿
0.173726033 −0.4168045501 x
[ 5.358679765 x 10−3
−0.0732030038 y
= ][ ] [
−4.404763196
−0.6090455604 ]
Let:
a = 0.173726033 c = −0.4168045501 e = −4.404763196
b = 5.358679765 x 10−3 d = −0.0732030038 f = −0.6090455604
Fourth Iteration
x 0 = -0.6563984537 f (x¿ ¿ 0) ¿= -0.6408460213
x 1 = -0.5831954499 f (x¿ ¿1) ¿= -0.03180046088
x 2 = -0.5791263516 f (x¿ ¿2)=2.557296009 x 10−4 ¿
2
( x 0−x 2 ) x 0−x 2 x
[ 2
][ ]
( x 1−x 2 ) x 1−x 2 y
= ¿
5.97097763 x 10−3 x
[ 1.655756098 x 10 −8
−0.0772721021
−4.0690986 x 10 −3
y
=
][ ] [
−0.6411014509
−0.03205619048 ]
Let:
a = 5.97097763 x 10−3 c = −0.0772721021 e = −0.6411014509
2z −2 ( 2.557296009 x 10−4 )
x 3=x 2− = -0.5791263516 =¿-0.5791589084
y+ √ y2 −4 xy 15.70974067
x 3=−0.5791589084
Thus, our root converges to 4 decimal places, our root is approximately equal to -0.5791.
1
5. Find a root of a function f ( x )=x−sin x − , let the initial guess be 1.0, 2.0 and 3.0
2
1
f ( x )=x−sin x −
2
First Iteration
x0 = 1 f (x¿ ¿ 0) ¿= -0.3414709848
x1 = 2 f (x¿ ¿1) ¿= 0.5907025732
x2 = 3 f (x¿ ¿2)¿= 2.358879992
2
( x 0−x 2 ) x 0−x 2 x
[ 2
][ ]
( x 1−x 2 ) x 1−x 2 y
= ¿
[ 41 −2 x −2.700350977
−1 ] [ y ] [−1.768177419 ]
=
Let:
a=4 c = -2 e =−2.700350977
b=1 d = -1 f = −1.768177419
ed−fc (−2.700350977 ) (−1 )−(−1.768177419 ) (−2 )
x= = =0.4180019304
ad−bc ( 4 )(−1 )− (1 ) (−2 )
af −be ( 4 ) (−1.768177419 )−( 1 ) (−2.700350977 )
y= = =2.186179349
ad−bc ( 4 ) (−1 )−( 1 ) (−2 )
z=f (x ¿¿ 2)¿= 2.358879992
y 2−4 xz=( 2.186179349 )2−4(0.4180019304)(2.358879992)=0.8353145859
y + √ y 2−4 xz = 2.186179349 + √ 0.8353145859 = 3.100134811 (greater magnitude)
y− √ y 2−4 xz = 2.186179349− √0.8353145859 = 1.272223887
2z −2 ( 2.358879992 )
x 3=x 2− 2 =3 =¿1.478208119
y+ √ y −4 xy 3.100134811
x 3=1.478208119
Second Iteration
x0 = 2 f (x¿ ¿ 0) ¿= 0.5907025732
x1 = 3 f (x¿ ¿1) ¿= 2.358879992
x 2 = 1.478208119 f (x¿ ¿2)¿= -0.01750865406
2
( x 0−x 2 ) x 0−x 2 x
[ 2
][ ]
( x 1−x 2 ) x 1−x 2 y
= ¿
[ 0.2722667671
2.315850529
0.521791881 x
1.521791881 y
=
0.6082112272
][ ] [
2.376388646 ]
Let:
a = 0.2722667671 c = 0.521791881 e =0.6082112272
b = 2.315850529 d = 1.521791881 f = 2.376388646
ed−fc ( 0.6082112272 ) ( 1.521791881 )−( 2.376388646 ) ( 0.521791881 )
x= = =0.395952358
ad−bc ( 0.2722667671 )( 1.521791881 )−( 2.315850529 ) ( 0.521791881 )
af −be ( 0.2722667671 ) (2.376388646 )−( 2.315850529 ) ( 0.6082112272 )
y= = =0.9590156094
ad−bc ( 0.2722667671 )( 1.521791881 )− (2.315850529 )( 0.521791881 )
z=f (x ¿¿ 2)¿= -0.01750865406
y 2−4 xz=( 0.9590156094 )2−4 (0.395952358)(−0.01750865406)=0.9474413106
y + √ y 2−4 xz = 0.9590156094 + √ 0.9474413106 =1.932381579 (greater magnitude)
2
y− √ y −4 xz = 0.9590156094−√ 0.9474413106 = -0.01435036007
2z −2 (−0.01750865406 )
x 3=x 2− 2 = 1.478208119 =¿1.496329441
y+ √ y −4 xy 1.932381579
x 3=1.496329441
Third Iteration
x0 = 3 f (x¿ ¿ 0) ¿= 2.358879992
x 1 = 1.478208119 f (x¿ ¿1) ¿= -0.01750865406
x 2 =1.496329441 f (x¿ ¿2)=−8.991818321 x 10−4 ¿
2
( x 0−x 2 ) x 0−x 2 x
[ 2
][ ]
( x 1−x 2 ) x 1−x 2 y
= ¿
2z −2 ( −8.991818321 x 10−4 )
x 3=x 2− = 1.496329441 =¿1.497301893
y+ √ y2 −4 xy 1.849308781
x 3=1.497301893
Fourth Iteration
x 0 = 1.478208119 f (x¿ ¿ 0) ¿= -0.01750865406
x 1 = 1.496329441 f (x¿ ¿1) ¿= −8.991818321 x 10−4
x 2 = 1.497301893 f (x¿ ¿2)=1.39373875 x 10−6 ¿
2
( x 0−x 2 ) x 0−x 2 x
[ 2
][ ]
( x 1−x 2 ) x 1−x 2 y
= ¿
2z −2 ( 1.39373875 x 10−6 )
x 3=x 2− 2 = 1.497301893 =¿1.497300389
y+ √ y −4 xy 1.853142166
x 3=1.497300389
Thus, our approximate root converges to 5 decimal places. Our root is equal to 1.49730
6. Find the root of a function f ( x )=e−x −3 log x , let the initial guess be 1.0, 2.0 and 3.0
f ( x )=e−x −3 log x
First Iteration
x0 = 1 f (x¿ ¿ 0) ¿= 0.3678794412
x1 = 2 f (x¿ ¿1) ¿= -0.7677547038
x2 = 3 f (x¿ ¿2)¿= -1.381576696
2
( x 0−x 2 ) x 0−x 2 x
[ 2
][ ]
( x 1−x 2 ) x 1−x 2 y
= ¿
[ 41 −2 ]
−1 y [ x
] [
=
1.749456137
0.613821992 ]
Let:
a=4 c = -2 e =1.749456137
b=1 d = -1 f = 0.613821992
ed−fc ( 1.749456137 )(−1 )−( 0.613821992 )(−2 )
x= = =0.2609060764
ad−bc ( 4 ) (−1 )−( 1 ) (−2 )
af −be ( 4 ) ( 0.613821992 )−( 1 )( 1.749456137 )
y= = =0.3529159156
ad−bc ( 4 ) (−1 )−( 1 )(−2 )
z=f (x ¿¿ 2)¿= -1.381576696
y 2−4 xz=( 0.3529159156 )2 −4 (0.2609060764)(−1.381576696)=1.566396664
y + √ y 2−4 xz = 0.3529159156 + √ 1.566396664 = 0.8986417792 angle 0
y− √ y 2−4 xz = 0.3529159156−√1.566396664 = 1.60447361 angle 180 (greater
magnitude)
2z −2 (−1.381576696 )
x 3=x 2− 2 =3 =¿1.277844289
y+ √ y −4 xy 1.60447361
x 3=1.277844289
Second Iteration
x0 = 2 f (x¿ ¿ 0) ¿= -0.7677547038
x1 = 3 f (x¿ ¿1) ¿= -1.381576696
x 2 = 1.277844289 f (x¿ ¿2)¿= -0.04079649399
2
( x 0−x 2 ) x 0−x 2 x
[ 2
][ ]
( x 1−x 2 ) x 1−x 2 y
= ¿
[ 0.5215088709
2.965820293
0.7222155711 x
1.722155711 y
=
−0.7269582098
][ ] [
−1.340780202 ]
Let:
a = 0.5215088709 c = 0.7222155711 e =−0.7269582098
b = 2.965820293 d = 1.722155711 f = −1.340780202
ed−fc (−0.7269582098 ) (1.722155711 )−(−1.340780202 )( 0.7222155711 )
x= = =0.2280054556
ad−bc ( 0.5215088709 )( 1.722155711 )−( 2.965820293 ) ( 0.7222155711 )
af −be ( 0.5215088709 ) (−1.340780202 )−( 2.965820293 ) (−0.7269582098 )
y= = =−1.171208586
ad−bc ( 0.5215088709 ) (1.722155711 )−( 2.965820293 ) ( 0.7222155711 )
z=f (x ¿¿ 2)¿= -0.04079649399
y 2−4 xz=(−1.171208586 )2 −4 (0.2280054556)(−0.04079649399)=1.408936844
y + √ y 2−4 xz = −1.171208586 + √ 1.408936844 = 0.01577786916 angle 0
y− √ y 2−4 xz = −1.171208586−√1.408936844 = 2.35819504 angle 180 (greater
magnitude)
2z −2 (−0.04079649399 )
x 3=x 2− 2 = 1.277844289 =¿1.243244527
y+ √ y −4 xy 2.35819504 angle180
x 3=1.243244527
Third Iteration
x0 = 3 f (x¿ ¿ 0) ¿= -1.381576696
x 1 = 1.277844289 f (x¿ ¿1) ¿= -0.04079649399
x 2 = 1.243244527 f (x¿ ¿2)=4.777156368 x 10−3 ¿
2
( x 0−x 2 ) x 0−x 2 x
[ 2
][ ]
( x 1−x 2 ) x 1−x 2 y
= ¿
3.086189792 1.756755473 x
[ 1.19714353 x 10−3
0.034599762 ][ ] [
y
=
−1.386353852
−0.04557365036 ]
Let:
a = 3.086189792 c = 1.756755473 e =−1.386353852
b = 1.19714353 x 10−3 d = 0.034599762 f = −0.04557365036