You are on page 1of 6

Newton Rapshon method

Start

choose any initial value (Xn)

𝑓 𝑋𝑛
𝑓′ 𝑋𝑛

𝑓 𝑥𝑛
𝑥𝑛+1 = 𝑥𝑛 −
𝑓′ 𝑥𝑛
𝑐ℎ𝑎𝑛𝑔𝑒𝑋𝑛 𝑤𝑖𝑡ℎ 𝑋𝑛+1
𝑓 𝑋𝑛+1

No
𝑓 𝑋𝑛+1 < 𝜀

Yes
Stop
Example:
Find one of the roots of the following equation using the Newton Rapshon
method
𝑓 𝑥 = 𝑥 4 +3𝑥 3 − 2𝑥 2 − 4𝑥 − 4 = 0 𝜀 = 0,01

1. choose any initial value 𝑥𝑛 1. choose any initial value 𝑥𝑛


𝑥𝑛 =1 𝑥𝑛 = 2
2. substitute the value of 𝑥𝑛 into the equation 2. substitute the value of 𝑥𝑛 into the equation
𝑓 𝑥𝑛 𝑓 𝑥𝑛

𝑓 𝑥𝑛 = 14 + 3 . 13 − 2 .12 − 4 .1 − 4 = −6 𝑓 𝑥𝑛 = 24 + 3 . 23 − 2 .22 − 4 .2 − 4 = 20

3. calculates the first orde differential 𝑓′ 𝑥𝑛 3. calculates the first orde differential 𝑓′ 𝑥𝑛
𝑓 ′ 𝑥𝑛 = 4𝑥 3 + 9𝑥 2 − 4𝑥 − 4 𝑓 ′ 𝑥𝑛 = 4𝑥 3 + 9𝑥 2 − 4𝑥 − 4

𝑓 ′ 𝑥𝑛 = 4 . 13 + 9 .12 − 4 .1 − 4 = 5 𝑓 ′ 𝑥𝑛 = 4 . 23 + 9 .22 − 4 .2 − 4 = 56
𝑓 𝑥𝑛 𝑓 𝑥𝑛
4. 𝑥𝑛+1 = 𝑥𝑛 −
𝑓′ 𝑥𝑛
4. 𝑥𝑛+1 = 𝑥𝑛 −
𝑓′ 𝑥𝑛

−6 20
𝑥𝑛+1 = 1 − = 2,2 𝑥𝑛+1 = 2 − = 1,6428
5 56
5. Hitung 𝑓 𝑥𝑛+1 5. Hitung 𝑓 𝑥𝑛+1

𝑓 𝑥 = 𝑥 4 +3𝑥 3 − 2𝑥 2 − 4𝑥 − 4 = 0 𝑓 𝑥 = 𝑥 4 +3𝑥 3 − 2𝑥 2 − 4𝑥 − 4 = 0

𝑓 𝑥𝑛+1 = 2,24 + 3 . 2,23 − 2 .2,22 𝑓 𝑥𝑛+1 = 1,64284 + 3 . 1,64283 − 2 .1,64282


− 4 .2,2 − 4 − 4 .1,6428 − 4

𝑓 𝑥𝑛+1 = 32,889 𝑓 𝑥𝑛+1 = 4,617

6. 𝑓 𝑥𝑛+1 ≤𝜀
6. 𝑓 𝑥𝑛+1 ≤𝜀
• If yes, 𝑥𝑛+1 is one of the roots of the equation
• If yes, 𝑥𝑛+1 is one of the roots of the equation
• If No replace 𝑥𝑛 with 𝑥𝑛+1 and go back to step 2
• If No replace 𝑥𝑛 with 𝑥𝑛+1 and go back to step 2

32,889> 𝟎, 𝟎𝟏 then the iteration is continued 4,6172> 𝟎, 𝟎𝟏 then the iteration is continued

𝑥𝑛 = 2,2 𝑥𝑛 =1,6428

2. substitute the value of 𝑥𝑛 into the equation 2. substitute the value of 𝑥𝑛 into the equation
𝑓 𝑥𝑛 𝑓 𝑥𝑛

𝑓 𝑥𝑛 = 2,24 + 3 . 2,23 − 2 .2,22 − 4 .2,2 − 4 𝑓 𝑥𝑛 = 1,64284 + 3 . 1,64283 − 2 .1,64282


− 4 .1,6428 − 4
𝑓 𝑥𝑛 = −32,889
𝑓 𝑥𝑛 = −4,617
3. calculates the first orde differential 𝑓′ 𝑥𝑛 3. calculates the first orde differential 𝑓′ 𝑥𝑛
𝑓 ′ 𝑥𝑛 = 4𝑥 3 + 9𝑥 2 − 4𝑥 − 4 𝑓 ′ 𝑥𝑛 = 4𝑥 3 + 9𝑥 2 − 4𝑥 − 4
𝑓 ′ 𝑥𝑛 = 4 . 2,23 + 9 .2,22 𝑓 ′ 𝑥𝑛 = 4 . 1,64283 + 9 .1,64282

− 4 .2,2 − 4 = 73,352 − 4 .1,6428 − 4 = 31,456


𝑓 𝑥𝑛 𝑓 𝑥𝑛
4. 𝑥𝑛+1 = 𝑥𝑛 −
𝑓′ 𝑥𝑛
4. 𝑥𝑛+1 = 𝑥𝑛 −
𝑓′ 𝑥𝑛
32,889 4,617
𝑥𝑛+1 = 2,2 − = 1,753 𝑥𝑛+1 = 1,6428 − = 1,496
73,352 31,456

5. Hitung 𝑓 𝑥𝑛+1 5. Hitung 𝑓 𝑥𝑛+1


𝑓 𝑥 = 𝑥 4 +3𝑥 3 − 2𝑥 2 − 4𝑥 − 4 = 0 𝑓 𝑥 = 𝑥 4 +3𝑥 3 − 2𝑥 2 − 4𝑥 − 4 = 0

𝑓 𝑥𝑛+1 = 1,7534 + 3 . 1,7533 − 2 . 1,7532 𝑓 𝑥𝑛+1 = 1,4964 + 3 .1,496 − 2 .1,4962


− 4 .1,753 − 4 − 4 .1,496 − 4

𝑓 𝑥𝑛+1 = 8,394 𝑓 𝑥𝑛+1 = 0,595


6. 𝑓 𝑥𝑛+1 ≤𝜀 6. 𝑓 𝑥𝑛+1 ≤𝜀
• If yes, 𝑥𝑛+1 is one of the roots of the equation • If yes, 𝑥𝑛+1 is one of the roots of the equation
• If No replace 𝑥𝑛 with 𝑥𝑛+1 and go back to step 2 • If No replace 𝑥𝑛 with 𝑥𝑛+1 and go back to step 2

8,𝟑𝟗𝟒 > 𝟎, 𝟎𝟏 then the iteration is continued 0,595 > 𝟎, 𝟎𝟏 then the iteration is continued

𝑥𝑛 = 1,753 𝑥𝑛 = 1496
iterasi Xn Xn+1 F(Xn) F'(Xn+1) F(Xn+1) iterasi Xn Xn+1 F(Xn) F'(Xn+1) F(Xn+1)
1 1.000 2.200 -6.000 5.000 32.8896 1 2.000 1.643 20.000 56.000 4.6172
2 2.200 1.752 32.889 73.352 8.394 2 1.643 1.496 4.6172 31.456 0.5946
3 1.752 1.531 8.394 38.104 1.4566 3 1.496 1.471 0.595 23.554 0.0157
4 1.531 1.474 1.457 25.344 0.0837 4 1.471 1.470 0.016 22.314 0.0000

5 1.474 1.470 0.084 22.462 0.0003


exercises:
Find one of the roots of the following equation using the Newton Rapshon
method
𝑓 𝑥 = 𝑥 4 −2𝑥 3 + 𝑥 2 + 3𝑥 − 5 = 0 𝜀 = 0,01

You might also like