You are on page 1of 3

Lab 2 | ES 84 Numerical Methods

LAB 2 Newton-Raphson Method for Root Finding

Introduction

By neglecting the higher order terms, the Taylors series expansion of the function f(x) about an arbitrary
point x1 is approximated as

f ( x) = f ( x1 ) + ( x x1 ) f ' ( x1 ) (1)

In order to find the root of f(x) = 0, we set f(x) equal to zeros in Eq. (1) to obtain

f ( x1 ) + ( x x1 ) f ' ( x1 ) = 0 (2)

Since the higher order derivative terms were neglected in the approximation of f(x) in Eq. (1), the solution
of Eq. (2) yields the next approximation to the root (instead of the exact root) as

f ( x1 )
x = x 2 = x1 (3)
f ' ( x1 )

where x2 denotes an improved approximation to the root. To further improve the root, we use x2 in place of
x1 on the right-hand side of Eq. (3) to obtain x3. This iterative procedure can be generalized as

f ( xi )
xi +1 = xi : i = 1,2, . (4)
f ' ( xi )

The procedure is shown graphically in Fig.1. Assuming a real root for the equation f(x) = 0. If xi is the
initial guess for the root of f (xi) = 0, the point of intersection of the tangent to the curve at xi with the x axis
gives the next approximation to the root, xi+1. The convergence of the procedure to the exact root can also
be seen in Fig. 1.
f(x)

f(xi)
[x f (x )]
i, i

f(xi+1)


xi+2 xi+1 xi X

Figure 1. Geometrical illustration of the Newton-Raphson method

1
Lab 2 | ES 84 Numerical Methods

The iterative process can be stopped whenever the convergence criterion

xi +1 xi < or f ( xi +1 ) <

is satisfied, where is a small number on the order of 10-3 to 10-6.

Flowchart of Newton-Raphson Method

Start

iteration number = n
tolerance =

Set

Yes i=1

STOP i>n

i=i+1

No

f(xi), f(xi)

No
Yes
STOP abs (xi+1-xi) <

2
Lab 2 | ES 84 Numerical Methods

Algorithm
The steps to apply Newton-Raphson method to find the root of an equation f(x) = 0 are
1. Evaluate f ' ( x) symbolically

2. Use an initial guess of the root, xi, to estimate the new value of the root xi+1 as

f ( i x)
xi +1 = i -x
f ' (i )x
3. Find the absolute relative approximate , as
xi +1 xi < or f ( xi +1 ) <

4. Also check if the number of iterations has exceeded the maximum number of iterations

Exercise

Use Newton-Raphsons Method Find the root of the function y = x3 + 4x2 + 7 in the vicinity of x = 4

You might also like