The Newton-Raphson Method

N-R graph

The Newton-Raphson Method is an iterative algorithm for finding a zero of a function given the estimate of the zero. The method uses the derivative of the function and iterates the current value to find the next value using the formula:


Then, the absolute relative approximate error is found using:


If the absolute relative approximate error is less than the pre-specified relative error tolerance, the iteration stops and the last iterated value is returned as the zero closest to the estimate.

While the Newton-Raphson method is a powerful root-finding algorithm , it has some shortcomings the most obvious of which is when the derivative of a particular iterate in the process equals zero.

The pre-specified relative error tolerance is taken as 0.00001 in my calculations.

Example 1:

Let's find a zero of the function, f(x)=x^3-1, starting with a guess of 6.

Starting with an initial guess of 6, we get: x_(1)=x_(0)-f(x_0)/(f'(x_0))=6-215/108=4.00 bar(925)

The subsequent estimates are found as:
x_(8)=x_(7)-f(x_7)/(f'(x_7))$\approx$1.000000 leading us to the correct root, 1 , after eight iterations.

Click here for graphs captured from the Newton-Raphson algorithm in example 1.

The animation of the geometric process and algebraic values for example 1:

x^3-1 movie

Download the MATLAB file, newtonraphson.m that solved example 1 and test it with any function!

Click here for a short analysis of the method and more examples. endamath