Newton-Raphson Method (a.k.a Newton Method) is a method that can be used to find the root of a equation. In other words, the Newton Method helps us find the the input to a function at which the value of the function will be 0, e.g. if we have a function , we want to find a value of where or .

The general formula for the newton method is:

Therefore, we can find the value of with one iteration by:

The way the Newton Method works is that we start with an initial input value for , this value can be any number but we want to come up with a good starting value so that we get to the root in less number of iterations. After picking an initial value for , and inserting it into the Newton formula we get a value which is supposed to be closer to the root of the equation (NOTE: there are some weaknesses to this method, please see the section "Weakness of the method").

After doing one iteration of the newton formula, the value might not be very close to the root of the equation. Therefore, we would want to repeat the newton formula with the value of . This will get us a new value . We keep on repeating this until we get a result that satisfies our precision condition. The precision is in the number of decimal positions we want to remain unchanged after repeating the iterations. In other words, when we repeat the iterations we see that the new value of changes only after a few number of decimal position. Say we want to have precision till 4 places of decimal, this means that we will stop iterating as soon as we see that the value of does not change till 4 places of decimal.

## Example

Let's work on an example to see how the method works. Let's find the root of the following equation with a precision of 9 decimal places.

[1] | ||

### Solution

The first step is to find the first derivative of equation . This results in:

[2] | ||

Now that we have and all have to do is plug in the values in the formula: and iterate. As a starting point I am choosing the value of . Following is a table of the iterations that were done using excel.

Please see Appendix A to download the excel file with the example

iteration |
x |
f(x) |
f'(x) |
x' |

1 | 20 | 8051 | 1203 | 13.30756442 |

2 | 13.30756442 | 2387.576189 | 534.2738126 | 8.838739388 |

3 | 8.838739388 | 708.0278304 | 237.3699419 | 5.855936154 |

4 | 5.855936154 | 209.3795021 | 105.8759647 | 3.878343763 |

5 | 3.878343763 | 60.97133425 | 48.12465103 | 2.61139776 |

6 | 2.61139776 | 16.64235463 | 23.45819479 | 1.901950389 |

7 | 1.901950389 | 3.585995569 | 13.85224585 | 1.643075719 |

8 | 1.643075719 | 0.365035093 | 11.09909346 | 1.610186989 |

9 | 1.610186989 | 0.005296215 | 10.77810642 | 1.609695602 |

10 | 1.609695602 | 1.16627E-06 | 10.7733598 | 1.609695494 |

11 | 1.609695494 | 5.68434E-14 | 10.77335875 | 1.609695494 |

Notice that we stop at iteration *11*, that is because our condition of having the decimal precision of 9 places is satisfied (see x' values for 10 and 11 don't change with 9 decimal places precision).

So, what was the benefit of doing all this? Notice how the value of has gone very close to on the 11th iteration and the value of for which is the root (or solution) of the equation. Ofcourse 5.68434E-14 is not equal to 0 but its very close to 0 and is acceptable given the conditions of the example.

## Weakness of the method

Although the Newton Method gets us the root of the equation it has its weakness. The function will fail if the tangent (or first derivative or the slope of the function at point ) is parallel to the x-axis. In this case the slope will be and diving the function by will give infinity. Hence the method will fail.

## Comments

RSS feed for comments to this post