You are on page 1of 9

Newton-Raphson Method

Simulasi Numerik

3/21/2020 1
Newton-Raphson Method

f(x)

f(xi) x f (x )
i, i f(xi )
xi +1 = xi -
f (xi )

f(xi-1)


xi+2 xi+1 xi X

Figure 1 Geometrical illustration of the Newton-Raphson method.


2
Derivation

f(x)

AB
f(xi) B tan( ) =
AC

f ( xi )
f ' ( xi ) =
xi − xi +1
C  A X f ( xi )
xi+1 xi xi +1 = xi −
f ( xi )

Figure 2 Derivation of the Newton-Raphson method.


3
Algorithm for Newton-Raphson Method

4
Step 1

Evaluate f (x) symbolically.

5
Step 2

Use an initial guess of the root, xi , to estimate the new


value of the root, xi +1 , as
f (xi )
xi +1 = xi -
f (xi )

6
Step 3

Find the absolute relative approximate error a as

xi +1- xi
a =  100
xi +1

7
Step 4

Compare the absolute relative approximate error with


the pre-specified relative error tolerance .  s

Go to Step 2 using new


Yes
estimate of the root.
Is a s ?

No Stop the algorithm

Also, check if the number of iterations has exceeded the


maximum number of iterations allowed. If so, one needs
to terminate the algorithm and notify the user.

8
THE END

You might also like