Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

SPCE-DCCN Numerical Methods Newton Raphson Method

Numerical Solutions of Algebraic and


Transcendental Equations

Newton Raphson’s Method


Let x0 be an approximate root of the equation f ( x) = 0 . Let x1 = x0 + h be the exact root
where h is very small (positive or negative).
 f ( x1 ) = 0
By Taylor’s series expansions, we have
h2 h3
f ( x1 ) = f ( x0 + h) = f ( x0 ) + hf '( x0 ) + f ''( x0 ) + f '''( x0 ) +
2! 3!
Since f ( x1 ) = 0 and h is very small, h 2 and higher powers of h can be neglected.
 f ( x1 ) = f ( x0 ) + hf '( x0 ) = 0
− f ( x0 )
h =
f '( x0 )
f ( x0 )
 x1 = x0 − is the first approximation to the root.
f '( x0 )
f ( x1 )
Similarly starting with x1 we get the next approximation to the root given by x2 = x1 −
f '( x1 )
f ( xn )
In general, xn +1 = xn −
f '( xn )
This formula is known as Newton-Raphson’s iteration formula

© 2020-SEAM by Prof. Satishkumar Barot Page 1


SPCE-DCCN Numerical Methods Newton Raphson Method

Solved Examples
1. Solve the equation 3x − cos x − 1 = 0 using Newton-Raphson method

2. Using Newton Raphson Method, find the approximate root of x3 − 2 x − 5 = 0

3. Perform three iterations of the Newton Raphson method to find the smallest positive root
of the equation f ( x ) = x3 − 5x + 1 = 0

4. Apply Newton Raphson’s method to determine a root of the equation


f ( x ) = cos x − xe x = 0 . Take the initial approximation as x0 = 1

Practice Examples
5. Find real root of the equation x3 − 3x + 1 = 0 lying between 1 and 2 correct to three decimal
places using Newton-Raphson method.
Answer: x = 1.5321

6. Find real root of the equation x3 − 5 x − 6 = 0 using Newton-Raphson method.


Answer: x = 2.6890

7. Find real root of the equation xe x − 2 = 0 correct to three decimal places using Newton-
Raphson method
Answer: x = 0.8526

8. Evaluate 12 correct to four decimal place by using Newton-Raphson method


Answer: x = 3.4641

© 2020-SEAM by Prof. Satishkumar Barot Page 2


SPCE-DCCN Numerical Methods Newton Raphson Method

Example 1: Solve the equation 3x − cos x − 1 = 0 using Newton-Raphson method

Solution: Let f ( x ) = 3x − cos x − 1 = 0


f  ( x ) = 3 + sin x
f ( 0 ) = 0 − 1 − 1 = −2 and f (1) = 3 − cos (1) − 1 = 1.4596
Thus, f ( 0 )  f (1)  0
 Root of the equation f ( x ) = 0 lies between 0 and 1.

Let x0 = 1 be the initial approximation to the root of f ( x ) = 0.


f ( xn )
By Newton Raphson's method, xn +1 = xn −
f  ( xn )
3 xn − cos ( xn ) − 1
 xn +1 = xn −
3 + sin ( xn )

3 xn − cos ( xn ) − 1
n xn xn +1 = xn − f ( xn +1 )
3 + sin ( xn )

3 1 − cos (1) − 1 f ( x1 ) = f ( 0.62001)


0 x0 = 1 x1 = 1 − = 0.62001
3 + sin (1) = 0.04615
3  0.62001 − cos ( 0.62001) − 1 f ( x2 ) = f ( 0.60712 )
1 x1 = 0.62001 x2 = 0.62001 −
3 + sin ( 0.62001) = 0.000065
= 0.60712
3  0.60712 − cos ( 0.60712 ) − 1
2 x2 = 0.60712 x3 = 0.60712 − f ( x3 ) = f ( 0.60710 )
3 + sin ( 0.60712 )
= −0.000005
= 0.60710
3  0.60710 − cos ( 0.60710 ) − 1
3 x3 = 0.60710 x4 = 0.60710 − f ( x4 ) = f ( 0.60710 )
3 + sin ( 0.60710 )
= −0.000005
= 0.60710

Thus, the approximate root of the equation f ( x ) = 3x − cos ( x ) − 1 = 0 correct to four decimal
place is x = 0.60710

© 2020-SEAM by Prof. Satishkumar Barot Page 3


SPCE-DCCN Numerical Methods Newton Raphson Method

Example 2: Using Newton Raphson Method, find the approximate root of x3 − 2 x − 5 = 0


Solution: f ( x ) = x3 − 2 x − 5 = 0
f  ( x ) = 3x 2 − 2
f ( 2 ) = 23 − 2(2) − 5 = −1 and f ( 3) = 33 − 2(3) − 5 = 16
Thus, f ( 2 )  f ( 3)  0
 Root of the equation f ( x ) = 0 lies between 2 and 3.

Let x0 = 2 be the initial approximation to the root of f ( x ) = 0.


f ( xn )
By Newton Raphson's method, xn +1 = xn −
f  ( xn )
xn 3 − 2 xn − 5
 xn +1 = xn −
3 xn 2 − 2

n xn xn 3 − 2 xn − 5 f ( xn +1 )
xn +1 = xn −
3 xn 2 − 2

0 x0 = 2 23 − 2(2) − 5 f ( x1 ) = f ( 2.1)
x1 = 2 − = 2.1
3(2) 2 − 2 = 0.061
1 x1 = 2.1 2.13 − 2(2.1) − 5 f ( x2 ) = f ( 2.0945 )
x2 = 2.1 − = 2.0945
3(2.1) 2 − 2 = −0.0005745
2 x2 = 2.0945 2.0945 − 2(2.0945) − 5
3
f ( x3 ) = f ( 2.0945 )
x3 = 2.0945 −
3(2.0945) 2 − 2 = −0.0005745
= 2.0945

Thus, the approximate root of the equation f ( x ) = x 3 − 2 x − 5 = 0 correct to four decimal


place is x = 2.0945

© 2020-SEAM by Prof. Satishkumar Barot Page 4


SPCE-DCCN Numerical Methods Newton Raphson Method

Example 3: Perform three iterations of the Newton Raphson method to find the smallest
positive root of the equation f ( x ) = x3 − 5x + 1 = 0
Solution: f ( x ) = x3 − 5x + 1 = 0
f  ( x ) = 3x 2 − 5
f ( 0 ) = 03 − 5(0) + 1 = 1 and f ( 3) = 13 − 5(1) + 1 = −3
Thus, f ( 0 )  f (1)  0
 Root of the equation f ( x ) = 0 lies between 0 and 1.

Let x0 = be the initial approximation to the root of f ( x ) = 0.


f ( xn )
By Newton Raphson's method, xn +1 = xn −
f  ( xn )
xn 3 − 5 xn + 1
 xn +1 = xn −
3 xn 2 − 5

n xn xn 3 − 5 xn + 1 f ( xn +1 )
xn +1 = xn −
3 xn 2 − 5

0 x0 = 0 x1 = f ( x1 ) =

1 x1 = x2 = f ( x2 ) =

2 x2 = 0.2016 x3 = 0.201639 f ( x3 ) = f ( 0.2016 )


= 0.000193

Thus, the approximate root of the equation f ( x ) = x 3 − 5 x + 1 = 0 correct to four decimal


place is x = 0.2016

© 2020-SEAM by Prof. Satishkumar Barot Page 5

You might also like