# Newton's-Method

## Graphical calculator for the Newton method

The diagram shows the chosen number of iteration steps from the start value in linear lines. The dotted lines show the start value of the next iteration step. You can grap the start point in the diagram and move along the function.

↹#.000
🔍↔
🔍↕
Number of iterations=
Start value x0=
Function f(x):
Tangent line:

Axes ranges

x-min=
x-max=
y-min=
y-max=

Parameter values

a=
b=
c=

Parameter ranges

a-min=
b-min=
c-min=
a-max=
b-max=
c-max=

f(x)=

cl
ok
Pos1
End
7
8
9
/
x
4
5
6
*
a
b
c
1
2
3
-
π
(
)
0
.
+
sin
cos
tan
ex
ln
xa
a/x
^
asin
acos
atan
x2
√x
ax
a/(x+b)
|x|
sinh
cosh
a⋅x+c / b⋅x+c
a+x / b+x
x2-a2/ x2+b2
a / x+b
1+√x / 1-√y
exsin(x)cos(x)
x+a
ea⋅x
a⋅x2+b⋅x+c
$\mathrm{sin}\left(\pi x+\frac{\pi }{4}\right)$
$\mathrm{cos}\left(\pi x+\frac{\pi }{4}\right)$
$\mathrm{tan}\left(\pi x+\frac{\pi }{4}\right)$
${\mathrm{sin}}^{2}\left(\pi x+\frac{\pi }{4}\right)$
${\mathrm{cos}}^{2}\left(\pi x+\frac{\pi }{4}\right)$
${\mathrm{tan}}^{2}\left(\pi x+\frac{\pi }{4}\right)$
$\frac{1}{\mathrm{sin}\left(x\right)}$
$\frac{1}{\mathrm{cos}\left(x\right)}$
$\frac{1}{\mathrm{tan}\left(x\right)}$
$\frac{\mathrm{sin}\left(x\right)}{\mathrm{cos}\left(\pi \cdot x\right)}$
$\mathrm{sin}\left(\mathrm{cos}\left(x\right)\right)$
${e}^{x}\mathrm{sin}\left(x\right)\mathrm{cos}\left(x\right)$
FunctionDescription
sin(x)Sine of x
cos(x)Cosine of x
tan(x)Tangent of x
asin(x)arcsine
acos(x)arccosine of x
atan(x)arctangent of x
atan2(y, x)Returns the arctangent of the quotient of its arguments.
cosh(x)Hyperbolic cosine of x
sinh(x)Hyperbolic sine of x
pow(a, b)Power ab
sqrt(x)Square root of x
exp(x)e-function
log(x), ln(x)Natural logarithm
log(x, b)Logarithm to base b
log2(x), lb(x)Logarithm to base 2
log10(x), ld(x)Logarithm to base 10
more ...

Notation: The function must be entered in the notation of the Javascript syntax.

Parameter: Three constants a, b and c are available, which can be changed by means of the sliders. The start point is shown by the black cross in the diagram and can be moved.

## Description of the Newton method

The Newton method, also known as the Newton-Raphson method, is an iterative method for determining the zeros of functions. It was developed by Sir Isaac Newton in the 17th century and is based on the idea that a function near a zero can be approximated by its tangent. Newton's method uses the idea of iteration, which means that it goes through several steps to find an approximation of the zero. The process consists of choosing an initial estimate for the zero point (x0) and then using the equation of the tangent of the function at that point to find a new estimate (x1). This process repeats until a desired accuracy is achieved.

The steps of the Newton method are:

• Choose an initial estimate x0.
• Calculate the first derivative f'(x) of the function f(x) at the point x0.
• Calculate the new estimate x1 with the formula x1 = x0 - f(x0) / f'(x0)

Repeat the steps until the desired accuracy is achieved.

Newton's method can converge to the solution of zeros of functions very quickly, but it has some limitations. It is not always guaranteed to converge to the solution and it requires knowledge of the first derivative of the function. It is also not suitable for all functions and it can lead to undesirable results if the initial estimate is not well chosen.

The aim of the Newton method is to find a zero of a generally non-linear function. That is to find a solution of the equation

$f\left(x\right)=0$

To achieve this, the function is linearized at a position x0 by replacing the function with its tangent. Thus, by a straight line equation which passes through the point (x0), the slope f '(x0).

The general form of the straight line equation is

$y=ax+b$

Conditions

$f\left({x}_{0}\right)=f\prime \left({x}_{0}\right){x}_{0}+b$

Dissolving after b

$b=f\left({x}_{0}\right)-f\prime \left({x}_{0}\right){x}_{0}$

Thus the straight line equation is completely determined

$y=f\prime \left({x}_{0}\right)x+f\left({x}_{0}\right)-f\prime \left({x}_{0}\right){x}_{0}=f\left({x}_{0}\right)+f\prime \left({x}_{0}\right)\left(x-{x}_{0}\right)$

The desired zero point of f is now replaced by the zero point of the straight line equation as the first approximation.

$0=f\left({x}_{0}\right)+f\prime \left({x}_{0}\right)\left(x-{x}_{0}\right)$

Resolving to x gives the first approximation for the zero point.

$x={x}_{0}-\frac{f\left({x}_{0}\right)}{f\prime \left({x}_{0}\right)}$

The iteration is to use this approximation as the starting point for the next approximation. The iteration process is then as follows:

${x}_{\mathrm{n+1}}={x}_{n}-\frac{f\left({x}_{n}\right)}{f\prime \left({x}_{n}\right)}$

with any starting value x0. Against which and if at all the Newton method converges depends sensitively on the choice of the starting value.

## Example for Newton's method

The example shows the iteration steps of the Newton method to find numerically the root of a quadratic function.

The example function is:

$f\left(x\right)={x}^{2}-x$

The derivative is:

$f\prime \left(x\right)=2x-1$

We use as start value:

${x}_{0}=3.5$

The first iteration step is:

${x}_{1}={x}_{0}-\frac{f\left({x}_{0}\right)}{f\prime \left({x}_{0}\right)}=3.5-\frac{8.75}{6.5}=2.04167$

The function value at the first iteration step is:

$f\left({x}_{1}\right)=2.12674$

$f\prime \left({x}_{1}\right)=3.08334$

So the second iteration step is:

${x}_{2}={x}_{1}-\frac{f\left({x}_{1}\right)}{f\prime \left({x}_{1}\right)}=2.04167-\frac{2.12674}{3.08334}=1.35192$

And so on for further iteration steps.

### Screenshot of the Image

Print or save the image via right mouse click.

## More Calculators

Here is a list of of further useful calculators and sites:

Index Regression Calculator NxN Cramer's rule Calculator NxN Gauss method Matrix Determinant Derivative calculus Partial derivatives and gradient Differential equations