Newton-Raphson Method
Description
We can use the fixed-point iteration to find the root of a function. Given a function which we have set to zero to find the root (), we rewrite the equation in terms of so that becomes (note, there are often many functions for each function). Next, we relabel each side of the equation as so that we can perform the iteration. Next, we pick a value for and perform the iteration until it converges towards a root of the function. If the iteration converges, it will converge to a root. The iteration will only converge if .
Algorithm
Select the function and it’s derivative .
Select the allowed error.
Select the initial approximation .
Calculate the next approximation:
Calculate the relative error, if it’s sufficiently small, the calculation stops, otherwise, continue: