# Nonlinear finite elements/Newton Raphson method

## The Newton-Raphson method

The Newton-Raphson method is a technique used to find the roots of nonlinear algebraic equations. The method is also called Newton's method.

Let us revisit Newton's method of finding roots in the context of an equation with one degree of freedom. Let the nonlinear equation be

${\displaystyle f(x)=0~.\,}$

We wish to find one root of the equation (recall that if ${\displaystyle f(x)\,}$ is linear or quadratic, we can find the root in exact form).

Let us select a point ${\displaystyle x_{1}\,}$ on the curve (see Figure 1). The slope of the curve at point ${\displaystyle x_{1}\,}$ is ${\displaystyle df(x_{1})/dx\,}$. Therefore, the equation of the tangent to the curve at ${\displaystyle (x_{1},f(x_{1}))\,}$ is

${\displaystyle y-f(x_{1})={\cfrac {df(x_{1})}{dx}}(x-x_{1})~.}$

At ${\displaystyle y=0\,}$, the tangent meets the ${\displaystyle x\,}$-axis at ${\displaystyle x_{2}\,}$. Therefore we have

${\displaystyle -f(x_{1})={\cfrac {df(x_{1})}{dx}}(x_{2}-x_{1})\qquad \implies \qquad x_{2}=x_{1}-{\cfrac {f(x_{1})}{df(x_{1})/dx}}~.}$

Recall that the root of ${\displaystyle f(x)\,}$ is the point where the curve of the function meets the ${\displaystyle x\,}$-axis. Therefore, we can repeat the process until we arrive at the root. The Newton iteration scheme is given by

${\displaystyle {x_{r+1}=x_{r}-{\cfrac {f(x_{r})}{\cfrac {df(x_{r})}{dx}}}~.}}$
 Figure 1. Newton's method of finding roots.

The iterative procedure is terminated when the following condition is met:

${\displaystyle |x_{r+1}-x_{r}|<\epsilon \,}$

where ${\displaystyle \epsilon }$ is a small value that depends on the desired accuracy and on machine precision. The Newton-Raphson method gives a quadratic convergence rate. That is, the difference between the answer and the approximate solution is proportional to the previous difference squared. This can be seen by Taylor expanding the non-linear equation and its derivative around the root, and inserting this into the expression for ${\displaystyle x_{r+1}\,}$.