The equations

The Newton-Raphson formula consists geometrically of extending the tangent line at a current point until it crosses zero, then setting the next guess to the abscissa of that zero-crossing. The mathematics behind this method is rather simple. Employing a Taylor expansion for \( x \) sufficiently close to the solution \( s \), we have

$$ f(s)=0=f(x)+(s-x)f'(x)+\frac{(s-x)^2}{2}f''(x) +\dots. \tag{2} $$

For small enough values of the function and for well-behaved functions, the terms beyond linear are unimportant, hence we obtain

$$ f(x)+(s-x)f'(x)\approx 0, $$

yielding

$$ s\approx x-\frac{f(x)}{f'(x)}. $$

Having in mind an iterative procedure, it is natural to start iterating with

$$ x_{n+1}=x_n-\frac{f(x_n)}{f'(x_n)}. $$