You are used to solving equations using basic algebraic operations and perhaps the quadratic formula. However, some equations cannot be solved using these methods.
For example the equations: or cannot be solved using conventional methods. However they can be solved using numerical methods. The important aspect of equations and is that they can be re-arranged to That is, the problem can be transformed to finding the root of a function .1 A root of a function is the value of for which
Common numerical methods for root finding are:
Newton’s method (also called the Newton-Raphson method)
the Bisection method.
In this module we consider Newton’s method.
The Newton-Raphson method
Newton’s method (Newton-Raphson) can provide the value of such that .
It has the form: where starts at The method is iterative, you start at and continue by incrementing by one until you achieve the desired accuracy.
Note that:
is called the first estimate of the root, or the initial guess,
is the new estimate of the root, and is the old estimate of the root,
is the value of the function at and,
is the value of the derivative of at
Example 1
Find the solution of for to three decimal places.
Solution
First define the function:2 Note that you can also use as it is equal to zero at the same value of as We want to find where . To do this we need an initial guess of the root. This is easily done by graphing both and The point where the graphs intersect is the point where The graphs are shown below.
A suitable value for would be and
Using eqn , we can start the method There has been no change to the first four places so we stop and the answer is
Example 2
Find the solution of correct to five decimal places with an initial guess of
Solution
Define the function then In this case we have a value for so there is no need to graph the functions. But we do it anyway.3 It is a good idea to graph the functions because it allows us to get an idea of the answer. If Newton’s method gives a result that is different to what we see in the graph, we have to consider that a mistake has been made or Newton’s method has found another root that we did not see on our graph.
From the graph we see the answer should be about .
Using Newton’s method: As we have no change in the first five places after the decimal point we stop and take the answer as Note that we round up the fifth digit.
Convergence of the Newton-Raphson method
Convergence indicates how quickly you will get an acceptable value of . Slow convergence implies many iterations, while fast convergence means few iterations.
Convergence of the method depends on the function and the initial guess. If the initial guess is in an area where the gradient of is nearly zero, convergence can be slow.
Consider the function It is graphed below.
Obviously the solutions of are and . These can be obtained by basic algebra and there is no need to use Newton’s method. However we will use this function to see what happens with different guesses for . We assume an accuracy to two decimal places and a calculation tolerance of .
Let . In this region the gradient of is close to zero. Newton’s method takes 25 iterations to get the result
Let then it takes 15 iterations to get the result
Let then it takes 9 iterations to get the result
Let then it takes 6 iterations to get the result
So we see the number of iterations decrease (higher convergence) when the gradient of increases.
Convergence to another root
If the function has several roots, Newton’s method may converge to any of these. For example the function has three roots at and as shown below.
If we set we, perhaps, would think the method should find the root But Newton’s method finds the root at This is why it is important to graph the function if possible.