Professional Documents
Culture Documents
Example:
Find one of the roots of the following equation using the Secant method
𝑓 𝑥 = 𝑥 4 +3𝑥 3 − 2𝑥 2 − 4𝑥 − 4 = 0 𝜀 = 0,01
1. choose any two initial values ( 𝑥1 𝑎𝑛𝑑 𝑥2 ) 1. choose any two initial values ( 𝑥1 𝑎𝑛𝑑 𝑥2 )
2. substitute the value of 𝑥1 𝑎𝑛𝑑 𝑥2 into the 2. substitute the value of 𝑥1 𝑎𝑛𝑑 𝑥2 into the
equation 𝑓 𝑥𝑛 equation 𝑓 𝑥𝑛
𝑓 𝑥1 = 14 + 3 . 13 − 2 .12 − 4 .1 − 4 = −6 𝑓 𝑥1 = 24 + 3 . 23 − 2 .22 − 4 .2 − 4 = 20
𝑓 𝑥2 𝑥2 −𝑥1 𝑓 𝑥2 𝑥2 −𝑥1
3. 𝑥3 = 𝑥2 −
𝑓 𝑥2 −𝑓 𝑥1
3. 𝑥3 = 𝑥2 −
𝑓 𝑥2 −𝑓 𝑥1
𝟒, 𝟎𝟔𝟐 > 𝟎, 𝟎𝟏 then the iteration is continued 𝟏𝟎, 𝟗𝟑𝟑 > 𝟎, 𝟎𝟏 then the iteration is continued
7. substitute the value of 𝑥1 𝑎𝑛𝑑 𝑥2 into the 7. substitute the value of 𝑥1 𝑎𝑛𝑑 𝑥2 into the
equation 𝑓 𝑥𝑛 equation 𝑓 𝑥𝑛
𝑓 𝑥1 = 24 + 3 . 23 − 2 .22 − 4 .2 − 4 = 20 𝑓 𝑥1 = 34 + 3 . 33 − 2 .32 − 4 .3 − 4 = 20
𝑓 𝑥2 = 1,2314 + 3 .1,231 − 2 .1,2312 𝑓 𝑥2 = 1,2314 + 3 .1,231 − 2 .1,2312
− 4 .1,231 − 4 − 4 .1,231 − 4
= −4,062 = −4,062
𝑓 𝑥2 𝑥2 −𝑥1 𝑓 𝑥2 𝑥2 −𝑥1
8. 𝑥3 = 𝑥2 − 8. 𝑥3 = 𝑥2 −
𝑓 𝑥2 −𝑓 𝑥1 𝑓 𝑥2 −𝑓 𝑥1
9. Substitute the value of 𝑥3 into the equation 9. Substitute the value of 𝑥3 into the equation
𝑓 𝑥𝑛 𝑓 𝑥𝑛
− 4 .1.361 − 4 − 4 .1.704 − 4
𝑓 𝑥3 = −2,159 𝑓 𝑥3 = 6,656
10. 𝑓 𝑥3 ≤𝜀 10. 𝑓 𝑥3 ≤𝜀
• If yes, 𝑥3 is one of the roots of the equation • If yes, 𝑥3 is one of the roots of the equation
• If No, continue iteration • If No, continue iteration
𝟐, 𝟏𝟓𝟗 > 𝟎, 𝟎𝟏 then the iteration is continued 𝟔, 𝟔𝟓𝟔 > 𝟎, 𝟎𝟏 then the iteration is continued
iterasi X1 X2 X3 F(X1) F(X2) F(X3)
1 1.000 2.000 1.231 -6.000 20.000 -4.0650
2 2.000 1.231 1.361 20.000 -4.065 -2.1596
3 1.231 1.361 1.508 -4.065 -2.160 0.8786
4 1.361 1.508 1.465 -2.160 0.879 -0.1049
5 1.508 1.465 1.470 0.879 -0.105 -0.0042
Find one of the roots of the following equation using the Secant
method
𝑓 𝑥 = 𝑥 3 + 2𝑥 2 − 4𝑥 − 1 = 0 𝜀 = 0,01