Pages

Saturday, September 19, 2015

Newton-Raphson Method to find the root of the non-linear equation



Newton-Raphson Algorithm [Quadratic convergence]
  
1.      Assign an initial value to x; say x0 and accuracy level E.
2.      Calculate the f(x0) and f'(x0) [f'(x0) is derivative of f(x0)].
3.      Find the improved estimate of x0.
x1 = x0 - ( f(x0) / f'(x0) )
4.      Check the accuracy level of the improved estimation.
If absolute value of (x1 - x0) / x1 < E
            Write improved estimation as the root of the equation and stop.
Otherwise
            Continue.
5.      Set x0 = x1 and repeat steps 3.
Example: Find the root of the equation x2-4x-10 = 0, using Newton-Raphson method.
Soln: Here given, f(x) = x2-4x-10.
Step 1: Since initial value of x is not provided so we can assume any value as initial value for x. say x = 0, i.e. x0 = 0.
And accuracy level E = 0.01.      
Step 2: Computing f(x0) and f'(x0)
            Here f(x) = x2-4x-10 and f'(x) = 2x – 4
            So, f(x0) = f(0) = 02 - 4*0 – 10 = -10
            And f'(x0) = 2*0 – 4 = -4
Step 3: Iteration I:
Calculating improved estimation of x0, using
  x1 = x0 - ( f(x0) / f'(x0) ) = 0 – ( -10 / -4 ) = -2.5
Step 4: Checking the accuracy level of improved estimation using,
 Absolute value of (x1 - x0) / x1 < E
(x1 - x0) / x1 = (-2.5 – 0) / -2.5 = 1.
Or 1 < 0.01 [Which is false.]
Error criteria not satisfied.
Step 5: Set x0 = x1 and go to step 3.
Iteration II: Calculating improved estimation of x0, using
            x1 = x0 - ( f(x0) / f'(x0) ) =
Repeat the iterations until error criteria satisfied.
If error criteria is satisfied then,
Write improved estimation as the root of the equation and stop.


Limitations of Newton-Raphson Method
1.      Division by zero may occur if f'(xi) is zero or very close to zero
2.      If the initial assumption is too far away from the required root, the process may converge to some other root.
3.      A particular value in the iteration sequence may repeat, resulting in an infinite loop. This occurs when the tangent to the curve f(x) at x = xi+1 cuts the x-axis again at x = xi.

No comments:

Post a Comment