In
numerical analysis
Numerical analysis is the study of algorithms that use numerical approximation (as opposed to symbolic computation, symbolic manipulations) for the problems of mathematical analysis (as distinguished from discrete mathematics). It is the study of ...
, Newton's method, also known as the Newton–Raphson method, named after
Isaac Newton
Sir Isaac Newton (25 December 1642 – 20 March 1726/27) was an English mathematician, physicist, astronomer, alchemist, theologian, and author (described in his time as a "natural philosopher"), widely recognised as one of the grea ...
and
Joseph Raphson
Joseph Raphson (c. 1668 – c. 1715) was an English mathematician and intellectual known best for the Newton–Raphson method.
Biography
Very little is known about Raphson's life. Connor and Robertson give his date of birth as 1668 based on a 1 ...
, is a
root-finding algorithm
In mathematics and computing, a root-finding algorithm is an algorithm for finding zeros, also called "roots", of continuous functions. A zero of a function , from the real numbers to real numbers or from the complex numbers to the complex numbers ...
which produces successively better
approximations
An approximation is anything that is intentionally similar but not exactly equal to something else.
Etymology and usage
The word ''approximation'' is derived from Latin ''approximatus'', from ''proximus'' meaning ''very near'' and the prefix ...
to the
roots
A root is the part of a plant, generally underground, that anchors the plant body, and absorbs and stores water and nutrients.
Root or roots may also refer to:
Art, entertainment, and media
* ''The Root'' (magazine), an online magazine focusing ...
(or zeroes) of a
real
Real may refer to:
Currencies
* Brazilian real (R$)
* Central American Republic real
* Mexican real
* Portuguese real
* Spanish real
* Spanish colonial real
Music Albums
* ''Real'' (L'Arc-en-Ciel album) (2000)
* ''Real'' (Bright album) (2010) ...
-valued
function
Function or functionality may refer to:
Computing
* Function key, a type of key on computer keyboards
* Function model, a structured representation of processes in a system
* Function object or functor or functionoid, a concept of object-oriente ...
. The most basic version starts with a single-variable function defined for a
real variable , the function's
derivative
In mathematics, the derivative of a function of a real variable measures the sensitivity to change of the function value (output value) with respect to a change in its argument (input value). Derivatives are a fundamental tool of calculus. F ...
, and an initial guess for a
root
In vascular plants, the roots are the organs of a plant that are modified to provide anchorage for the plant and take in water and nutrients into the plant body, which allows plants to grow taller and faster. They are most often below the sur ...
of . If the function satisfies sufficient assumptions and the initial guess is close, then
:
is a better approximation of the root than . Geometrically, is the intersection of the -axis and the
tangent
In geometry, the tangent line (or simply tangent) to a plane curve at a given point is the straight line that "just touches" the curve at that point. Leibniz defined it as the line through a pair of infinitely close points on the curve. More ...
of the
graph
Graph may refer to:
Mathematics
*Graph (discrete mathematics), a structure made of vertices and edges
**Graph theory, the study of such graphs and their properties
*Graph (topology), a topological space resembling a graph in the sense of discre ...
of at : that is, the improved guess is the unique root of the
linear approximation
In mathematics, a linear approximation is an approximation of a general function using a linear function (more precisely, an affine function). They are widely used in the method of finite differences to produce first order methods for solving o ...
at the initial point. The process is repeated as
:
until a sufficiently precise value is reached. This algorithm is first in the class of
Householder's method
In mathematics, and more specifically in numerical analysis, Householder's methods are a class of root-finding algorithms that are used for functions of one real variable with continuous derivatives up to some order . Each of these methods is chara ...
s, succeeded by
Halley's method
In numerical analysis, Halley's method is a root-finding algorithm used for functions of one real variable with a continuous second derivative. It is named after its inventor Edmond Halley.
The algorithm is second in the class of Householder's m ...
. The method can also be extended to
complex functions
Complex analysis, traditionally known as the theory of functions of a complex variable, is the branch of mathematical analysis that investigates functions of complex numbers. It is helpful in many branches of mathematics, including algebrai ...
and to
systems of equations
In mathematics, a set of simultaneous equations, also known as a system of equations or an equation system, is a finite set of equations for which common solutions are sought. An equation system is usually classified in the same manner as single e ...
.
Description
The idea is to start with an initial guess, then to approximate the function by its
tangent line
In geometry, the tangent line (or simply tangent) to a plane curve at a given point is the straight line that "just touches" the curve at that point. Leibniz defined it as the line through a pair of infinitely close points on the curve. More ...
, and finally to compute the -intercept of this tangent line. This -intercept will typically be a better approximation to the original function's root than the first guess, and the method can be
iterated.
If the
tangent line
In geometry, the tangent line (or simply tangent) to a plane curve at a given point is the straight line that "just touches" the curve at that point. Leibniz defined it as the line through a pair of infinitely close points on the curve. More ...
to the curve at intercepts the x-axis at then the slope is
:
.
Solving for gives
:
We start the process with some arbitrary initial value . (The closer to the zero, the better. But, in the absence of any intuition about where the zero might lie, a "guess and check" method might narrow the possibilities to a reasonably small interval by appealing to the
intermediate value theorem.) The method will usually converge, provided this initial guess is close enough to the unknown zero, and that . Furthermore, for a zero of
multiplicity
Multiplicity may refer to: In science and the humanities
* Multiplicity (mathematics), the number of times an element is repeated in a multiset
* Multiplicity (philosophy), a philosophical concept
* Multiplicity (psychology), having or using mult ...
1, the convergence is at least quadratic (see
rate of convergence
In numerical analysis, the order of convergence and the rate of convergence of a convergent sequence are quantities that represent how quickly the sequence approaches its limit. A sequence (x_n) that converges to x^* is said to have ''order of c ...
) in a
neighbourhood
A neighbourhood (British English, Irish English, Australian English and Canadian English) or neighborhood (American English; see spelling differences) is a geographically localised community within a larger city, town, suburb or rural are ...
of the zero, which intuitively means that the number of correct digits roughly doubles in every step. More details can be found in the
analysis section below.
Householder's method
In mathematics, and more specifically in numerical analysis, Householder's methods are a class of root-finding algorithms that are used for functions of one real variable with continuous derivatives up to some order . Each of these methods is chara ...
s are similar but have higher order for even faster convergence. However, the extra computations required for each step can slow down the overall performance relative to Newton's method, particularly if or its derivatives are computationally expensive to evaluate.
History
The name "Newton's method" is derived from
Isaac Newton
Sir Isaac Newton (25 December 1642 – 20 March 1726/27) was an English mathematician, physicist, astronomer, alchemist, theologian, and author (described in his time as a "natural philosopher"), widely recognised as one of the grea ...
's description of a special case of the method in ''
De analysi per aequationes numero terminorum infinitas
''De analysi per aequationes numero terminorum infinitas'' (or ''On analysis by infinite series'', ''On Analysis by Equations with an infinite number of terms'', or ''On the Analysis by means of equations of an infinite number of terms'') is a m ...
'' (written in 1669, published in 1711 by
William Jones) and in ''De metodis fluxionum et serierum infinitarum'' (written in 1671, translated and published as ''
Method of Fluxions
''Method of Fluxions'' ( la, De Methodis Serierum et Fluxionum) is a mathematical treatise by Sir Isaac Newton which served as the earliest written formulation of modern calculus. The book was completed in 1671, and published in 1736. Fluxion i ...
'' in 1736 by
John Colson
John Colson (1680 – 20 January 1760) was an English clergyman, mathematician, and the Lucasian Professor of Mathematics at Cambridge University.
Life
John Colson was educated at Lichfield School before becoming an undergraduate at Christ Chu ...
). However, his method differs substantially from the modern method given above. Newton applied the method only to polynomials, starting with an initial root estimate and extracting a sequence of error corrections. He used each correction to rewrite the polynomial in terms of the remaining error, and then solved for a new correction by neglecting higher-degree terms. He did not explicitly connect the method with derivatives or present a general formula. Newton applied this method to both numerical and algebraic problems, producing
Taylor series
In mathematics, the Taylor series or Taylor expansion of a function is an infinite sum of terms that are expressed in terms of the function's derivatives at a single point. For most common functions, the function and the sum of its Taylor serie ...
in the latter case.
Newton may have derived his method from a similar but less precise method by
Vieta. The essence of Vieta's method can be found in the work of the
Persian mathematician Sharaf al-Din al-Tusi
Sharaf al-Dīn al-Muẓaffar ibn Muḥammad ibn al-Muẓaffar al-Ṭūsī ( fa, شرفالدین مظفر بن محمد بن مظفر توسی; 1135 – 1213) was an Iranian mathematician and astronomer of the Islamic Golden Age (during the ...
, while his successor
Jamshīd al-Kāshī
Ghiyāth al-Dīn Jamshīd Masʿūd al-Kāshī (or al-Kāshānī) ( fa, غیاث الدین جمشید کاشانی ''Ghiyās-ud-dīn Jamshīd Kāshānī'') (c. 1380 Kashan, Iran – 22 June 1429 Samarkand, Transoxania) was a Persian astronomer a ...
used a form of Newton's method to solve to find roots of (Ypma 1995). A special case of Newton's method for calculating square roots was known since ancient times and is often called the
Babylonian method
Methods of computing square roots are numerical analysis algorithms for approximating the principal, or non-negative, square root (usually denoted \sqrt, \sqrt /math>, or S^) of a real number. Arithmetically, it means given S, a procedure for fin ...
.
Newton's method was used by 17th-century Japanese mathematician
Seki Kōwa to solve single-variable equations, though the connection with calculus was missing.
Newton's method was first published in 1685 in ''A Treatise of Algebra both Historical and Practical'' by
John Wallis
John Wallis (; la, Wallisius; ) was an English clergyman and mathematician who is given partial credit for the development of infinitesimal calculus. Between 1643 and 1689 he served as chief cryptographer for Parliament and, later, the royal ...
. In 1690,
Joseph Raphson
Joseph Raphson (c. 1668 – c. 1715) was an English mathematician and intellectual known best for the Newton–Raphson method.
Biography
Very little is known about Raphson's life. Connor and Robertson give his date of birth as 1668 based on a 1 ...
published a simplified description in ''Analysis aequationum universalis''. Raphson also applied the method only to polynomials, but he avoided Newton's tedious rewriting process by extracting each successive correction from the original polynomial. This allowed him to derive a reusable iterative expression for each problem. Finally, in 1740,
Thomas Simpson
Thomas Simpson FRS (20 August 1710 – 14 May 1761) was a British mathematician and inventor known for the eponymous Simpson's rule to approximate definite integrals. The attribution, as often in mathematics, can be debated: this rule had been ...
described Newton's method as an iterative method for solving general nonlinear equations using calculus, essentially giving the description above. In the same publication, Simpson also gives the generalization to systems of two equations and notes that Newton's method can be used for solving optimization problems by setting the gradient to zero.
Arthur Cayley
Arthur Cayley (; 16 August 1821 – 26 January 1895) was a prolific United Kingdom of Great Britain and Ireland, British mathematician who worked mostly on algebra. He helped found the modern British school of pure mathematics.
As a child, C ...
in 1879 in ''The Newton–Fourier imaginary problem'' was the first to notice the difficulties in generalizing Newton's method to complex roots of polynomials with degree greater than 2 and complex initial values. This opened the way to the study of the
theory of iterations of rational functions.
Practical considerations
Newton's method is a powerful technique—in general the
convergence
Convergence may refer to:
Arts and media Literature
*''Convergence'' (book series), edited by Ruth Nanda Anshen
*Convergence (comics), "Convergence" (comics), two separate story lines published by DC Comics:
**A four-part crossover storyline that ...
is quadratic: as the method converges on the root, the difference between the root and the approximation is squared (the number of accurate digits roughly doubles) at each step. However, there are some difficulties with the method.
Difficulty in calculating the derivative of a function
Newton's method requires that the derivative can be calculated directly. An analytical expression for the derivative may not be easily obtainable or could be expensive to evaluate. In these situations, it may be appropriate to approximate the derivative by using the slope of a line through two nearby points on the function. Using this approximation would result in something like the
secant method
In numerical analysis, the secant method is a root-finding algorithm that uses a succession of roots of secant lines to better approximate a root of a function ''f''. The secant method can be thought of as a finite-difference approximation o ...
whose convergence is slower than that of Newton's method.
Failure of the method to converge to the root
It is important to review the
proof of quadratic convergence of Newton's method before implementing it. Specifically, one should review the assumptions made in the proof. For
situations where the method fails to converge, it is because the assumptions made in this proof are not met.
Overshoot
If the first derivative is not well behaved in the neighborhood of a particular root, the method may overshoot, and diverge from that root. An example of a function with one root, for which the derivative is not well behaved in the neighborhood of the root, is
:
for which the root will be overshot and the sequence of will diverge. For , the root will still be overshot, but the sequence will oscillate between two values. For , the root will still be overshot but the sequence will converge, and for the root will not be overshot at all.
In some cases, Newton's method can be stabilized by using
successive over-relaxation In numerical linear algebra, the method of successive over-relaxation (SOR) is a variant of the Gauss–Seidel method for solving a linear system of equations, resulting in faster convergence. A similar method can be used for any slowly converging ...
, or the speed of convergence can be increased by using the same method.
Stationary point
If a
stationary point
In mathematics, particularly in calculus, a stationary point of a differentiable function of one variable is a point on the graph of the function where the function's derivative is zero. Informally, it is a point where the function "stops" inc ...
of the function is encountered, the derivative is zero and the method will terminate due to
division by zero
In mathematics, division by zero is division (mathematics), division where the divisor (denominator) is 0, zero. Such a division can be formally expression (mathematics), expressed as \tfrac, where is the dividend (numerator). In ordinary ari ...
.
Poor initial estimate
A large error in the initial estimate can contribute to non-convergence of the algorithm. To overcome this problem one can often linearize the function that is being optimized using calculus, logs, differentials, or even using evolutionary algorithms, such as the
stochastic tunneling In numerical analysis, stochastic tunneling (STUN) is an approach to global optimization based on the Monte Carlo method- sampling of the function to be objective minimized in which the function is nonlinearly transformed to allow for easier tunne ...
. Good initial estimates lie close to the final globally optimal parameter estimate. In nonlinear regression, the sum of squared errors (SSE) is only "close to" parabolic in the region of the final parameter estimates. Initial estimates found here will allow the Newton–Raphson method to quickly converge. It is only here that the
Hessian matrix
In mathematics, the Hessian matrix or Hessian is a square matrix of second-order partial derivatives of a scalar-valued function, or scalar field. It describes the local curvature of a function of many variables. The Hessian matrix was developed ...
of the SSE is positive and the first derivative of the SSE is close to zero.
Mitigation of non-convergence
In a robust implementation of Newton's method, it is common to place limits on the number of iterations, bound the solution to an interval known to contain the root, and combine the method with a more robust root finding method.
Slow convergence for roots of multiplicity greater than 1
If the root being sought has
multiplicity
Multiplicity may refer to: In science and the humanities
* Multiplicity (mathematics), the number of times an element is repeated in a multiset
* Multiplicity (philosophy), a philosophical concept
* Multiplicity (psychology), having or using mult ...
greater than one, the convergence rate is merely linear (errors reduced by a constant factor at each step) unless special steps are taken. When there are two or more roots that are close together then it may take many iterations before the iterates get close enough to one of them for the quadratic convergence to be apparent. However, if the multiplicity of the root is known, the following modified algorithm preserves the quadratic convergence rate:
:
This is equivalent to using
successive over-relaxation In numerical linear algebra, the method of successive over-relaxation (SOR) is a variant of the Gauss–Seidel method for solving a linear system of equations, resulting in faster convergence. A similar method can be used for any slowly converging ...
. On the other hand, if the multiplicity of the root is not known, it is possible to estimate after carrying out one or two iterations, and then use that value to increase the rate of convergence.
If the multiplicity of the root is finite then will have a root at the same location with multiplicity 1. Applying Newton's method to find the root of recovers quadratic convergence in many cases although it generally involves the second derivative of . In a particularly simple case, if then and Newton's method finds the root in a single iteration with
:
Analysis
Suppose that the function has a zero at , i.e., , and is differentiable in a
neighborhood
A neighbourhood (British English, Irish English, Australian English and Canadian English) or neighborhood (American English; see spelling differences) is a geographically localised community within a larger city, town, suburb or rural area, ...
of .
If is continuously differentiable and its derivative is nonzero at , then there exists a
neighborhood
A neighbourhood (British English, Irish English, Australian English and Canadian English) or neighborhood (American English; see spelling differences) is a geographically localised community within a larger city, town, suburb or rural area, ...
of such that for all starting values in that neighborhood, the
sequence
In mathematics, a sequence is an enumerated collection of objects in which repetitions are allowed and order matters. Like a set, it contains members (also called ''elements'', or ''terms''). The number of elements (possibly infinite) is calle ...
will
converge
Converge may refer to:
* Converge (band), American hardcore punk band
* Converge (Baptist denomination), American national evangelical Baptist body
* Limit (mathematics)
* Converge ICT, internet service provider in the Philippines
*CONVERGE CFD s ...
to .
If the function is continuously differentiable and its derivative is not 0 at and it has a
second derivative
In calculus, the second derivative, or the second order derivative, of a function is the derivative of the derivative of . Roughly speaking, the second derivative measures how the rate of change of a quantity is itself changing; for example, ...
at then the convergence is quadratic or faster. If the second derivative is not 0 at then the convergence is merely quadratic. If the third derivative exists and is bounded in a neighborhood of , then:
:
where
:
If the derivative is 0 at , then the convergence is usually only linear. Specifically, if is twice continuously differentiable, and , then there exists a neighborhood of such that, for all starting values in that neighborhood, the sequence of iterates converges linearly, with
rate . Alternatively, if and for , in a
neighborhood
A neighbourhood (British English, Irish English, Australian English and Canadian English) or neighborhood (American English; see spelling differences) is a geographically localised community within a larger city, town, suburb or rural area, ...
of , being a zero of
multiplicity
Multiplicity may refer to: In science and the humanities
* Multiplicity (mathematics), the number of times an element is repeated in a multiset
* Multiplicity (philosophy), a philosophical concept
* Multiplicity (psychology), having or using mult ...
, and if , then there exists a neighborhood of such that, for all starting values in that neighborhood, the sequence of iterates converges linearly.
However, even linear convergence is not guaranteed in pathological situations.
In practice, these results are local, and the neighborhood of convergence is not known in advance. But there are also some results on global convergence: for instance, given a right neighborhood of , if is twice differentiable in and if , in , then, for each in the sequence is monotonically decreasing to .
Proof of quadratic convergence for Newton's iterative method
According to
Taylor's theorem
In calculus, Taylor's theorem gives an approximation of a ''k''-times differentiable function around a given point by a polynomial of degree ''k'', called the ''k''th-order Taylor polynomial. For a smooth function, the Taylor polynomial is the t ...
, any function which has a continuous second derivative can be represented by an expansion about a point that is close to a root of . Suppose this root is . Then the expansion of about is:
where the
Lagrange form of the Taylor series expansion remainder is
:
where is in between and .
Since is the root, () becomes:
Dividing equation () by and rearranging gives
Remembering that is defined by
one finds that
:
That is,
Taking the absolute value of both sides gives
Equation () shows that the
order of convergence
In numerical analysis, the order of convergence and the rate of convergence of a convergent sequence are quantities that represent how quickly the sequence approaches its limit. A sequence (x_n) that converges to x^* is said to have ''order of co ...
is at least quadratic if the following conditions are satisfied:
# ; for all , where is the interval ;
# is continuous, for all ;
# satisfies ;
#
where ''M'' is given by
:
If these conditions hold,
:
Basins of attraction
The disjoint subsets of the
basins of attraction—the regions of the real number line such that within each region iteration from any point leads to one particular root—can be infinite in number and arbitrarily small. For example, for the function , the following initial conditions are in successive basins of attraction:
:
Failure analysis
Newton's method is only guaranteed to converge if certain conditions are satisfied. If the assumptions made in the proof of quadratic convergence are met, the method will converge. For the following subsections, failure of the method to converge indicates that the assumptions made in the proof were not met.
Bad starting points
In some cases the conditions on the function that are necessary for convergence are satisfied, but the point chosen as the initial point is not in the interval where the method converges. This can happen, for example, if the function whose root is sought approaches zero asymptotically as goes to or . In such cases a different method, such as
bisection
In geometry, bisection is the division of something into two equal or congruent parts, usually by a line, which is then called a ''bisector''. The most often considered types of bisectors are the ''segment bisector'' (a line that passes through ...
, should be used to obtain a better estimate for the zero to use as an initial point.
Iteration point is stationary
Consider the function:
:
It has a maximum at and solutions of at . If we start iterating from the
stationary point
In mathematics, particularly in calculus, a stationary point of a differentiable function of one variable is a point on the graph of the function where the function's derivative is zero. Informally, it is a point where the function "stops" inc ...
(where the derivative is zero), will be undefined, since the tangent at is parallel to the -axis:
:
The same issue occurs if, instead of the starting point, any iteration point is stationary. Even if the derivative is small but not zero, the next iteration will be a far worse approximation.
Starting point enters a cycle
For some functions, some starting points may enter an infinite cycle, preventing convergence. Let
:
and take 0 as the starting point. The first iteration produces 1 and the second iteration returns to 0 so the sequence will alternate between the two without converging to a root. In fact, this 2-cycle is stable: there are neighborhoods around 0 and around 1 from which all points iterate asymptotically to the 2-cycle (and hence not to the root of the function). In general, the behavior of the sequence can be very complex (see
Newton fractal
The Newton fractal is a boundary set in the complex plane which is characterized by Newton's method applied to a fixed polynomial or transcendental function. It is the Julia set of the meromorphic function which is given by Newton's method. ...
). The real solution of this equation is ….
Derivative issues
If the function is not continuously differentiable in a neighborhood of the root then it is possible that Newton's method will always diverge and fail, unless the solution is guessed on the first try.
Derivative does not exist at root
A simple example of a function where Newton's method diverges is trying to find the cube root of zero. The cube root is continuous and infinitely differentiable, except for , where its derivative is undefined:
:
For any iteration point , the next iteration point will be:
:
The algorithm overshoots the solution and lands on the other side of the -axis, farther away than it initially was; applying Newton's method actually doubles the distances from the solution at each iteration.
In fact, the iterations diverge to infinity for every , where . In the limiting case of (square root), the iterations will alternate indefinitely between points and , so they do not converge in this case either.
Discontinuous derivative
If the derivative is not continuous at the root, then convergence may fail to occur in any neighborhood of the root. Consider the function
:
Its derivative is:
:
Within any neighborhood of the root, this derivative keeps changing sign as approaches 0 from the right (or from the left) while for .
So is unbounded near the root, and Newton's method will diverge almost everywhere in any neighborhood of it, even though:
*the function is differentiable (and thus continuous) everywhere;
*the derivative at the root is nonzero;
* is infinitely differentiable except at the root; and
*the derivative is bounded in a neighborhood of the root (unlike ).
Non-quadratic convergence
In some cases the iterates converge but do not converge as quickly as promised. In these cases simpler methods converge just as quickly as Newton's method.
Zero derivative
If the first derivative is zero at the root, then convergence will not be quadratic. Let
:
then and consequently
:
So convergence is not quadratic, even though the function is infinitely differentiable everywhere.
Similar problems occur even when the root is only "nearly" double. For example, let
:
Then the first few iterations starting at are
: = 1
: = …
: = …
: = …
: = …
: = …
: = …
: = …
it takes six iterations to reach a point where the convergence appears to be quadratic.
No second derivative
If there is no second derivative at the root, then convergence may fail to be quadratic. Let
:
Then
:
And
:
except when where it is undefined. Given ,
:
which has approximately times as many bits of precision as has. This is less than the 2 times as many which would be required for quadratic convergence. So the convergence of Newton's method (in this case) is not quadratic, even though: the function is continuously differentiable everywhere; the derivative is not zero at the root; and is infinitely differentiable except at the desired root.
Generalizations
Complex functions
When dealing with
complex functions
Complex analysis, traditionally known as the theory of functions of a complex variable, is the branch of mathematical analysis that investigates functions of complex numbers. It is helpful in many branches of mathematics, including algebrai ...
, Newton's method can be directly applied to find their zeroes. Each zero has a
basin of attraction
In the mathematical field of dynamical systems, an attractor is a set of states toward which a system tends to evolve, for a wide variety of starting conditions of the system. System values that get close enough to the attractor values remain ...
in the complex plane, the set of all starting values that cause the method to converge to that particular zero. These sets can be mapped as in the image shown. For many complex functions, the boundaries of the basins of attraction are
fractal
In mathematics, a fractal is a geometric shape containing detailed structure at arbitrarily small scales, usually having a fractal dimension strictly exceeding the topological dimension. Many fractals appear similar at various scales, as illu ...
s.
In some cases there are regions in the complex plane which are not in any of these basins of attraction, meaning the iterates do not converge. For example, if one uses a real initial condition to seek a root of , all subsequent iterates will be real numbers and so the iterations cannot converge to either root, since both roots are non-real. In this case
almost all
In mathematics, the term "almost all" means "all but a negligible amount". More precisely, if X is a set, "almost all elements of X" means "all elements of X but those in a negligible subset of X". The meaning of "negligible" depends on the math ...
real initial conditions lead to
chaotic behavior
Chaos theory is an interdisciplinary area of scientific study and branch of mathematics focused on underlying patterns and deterministic laws of dynamical systems that are highly sensitive to initial conditions, and were once thought to have c ...
, while some initial conditions iterate either to infinity or to repeating cycles of any finite length.
Curt McMullen has shown that for any possible purely iterative algorithm similar to Newton's method, the algorithm will diverge on some open regions of the complex plane when applied to some polynomial of degree 4 or higher. However, McMullen gave a generally convergent algorithm for polynomials of degree 3.
Chebyshev's third-order method
Nash–Moser iteration
Systems of equations
variables, functions
One may also use Newton's method to solve systems of equations, which amounts to finding the (simultaneous) zeroes of continuously differentiable functions
This is equivalent to finding the zeroes of a single vector-valued function
In the formulation given above, the scalars are replaced by vectors and instead of dividing the function by its derivative one instead has to left multiply the function by the inverse of its
Jacobian matrix
In vector calculus, the Jacobian matrix (, ) of a vector-valued function of several variables is the matrix of all its first-order partial derivatives. When this matrix is square, that is, when the function takes the same number of variables as ...
. This results in the expression
:
.
Rather than actually computing the inverse of the Jacobian matrix, one may save time and increase numerical stability by solving the
system of linear equations
In mathematics, a system of linear equations (or linear system) is a collection of one or more linear equations involving the same variable (math), variables.
For example,
:\begin
3x+2y-z=1\\
2x-2y+4z=-2\\
-x+\fracy-z=0
\end
is a system of three ...
:
for the unknown .
variables, equations, with
The -dimensional variant of Newton's method can be used to solve systems of greater than (nonlinear) equations as well if the algorithm uses the
generalized inverse
In mathematics, and in particular, algebra, a generalized inverse (or, g-inverse) of an element ''x'' is an element ''y'' that has some properties of an inverse element but not necessarily all of them. The purpose of constructing a generalized in ...
of the non-square
Jacobian matrix instead of the inverse of . If the
nonlinear system
In mathematics and science, a nonlinear system is a system in which the change of the output is not proportional to the change of the input. Nonlinear problems are of interest to engineers, biologists, physicists, mathematicians, and many other ...
has no solution, the method attempts to find a solution in the
non-linear least squares
Non-linear least squares is the form of least squares analysis used to fit a set of ''m'' observations with a model that is non-linear in ''n'' unknown parameters (''m'' ≥ ''n''). It is used in some forms of nonlinear regression. The ...
sense. See
Gauss–Newton algorithm
The Gauss–Newton algorithm is used to solve non-linear least squares problems, which is equivalent to minimizing a sum of squared function values. It is an extension of Newton's method for finding a minimum of a non-linear function. Since a sum ...
for more information.
In a Banach space
Another generalization is Newton's method to find a root of a
functional
Functional may refer to:
* Movements in architecture:
** Functionalism (architecture)
** Form follows function
* Functional group, combination of atoms within molecules
* Medical conditions without currently visible organic basis:
** Functional sy ...
defined in a
Banach space
In mathematics, more specifically in functional analysis, a Banach space (pronounced ) is a complete normed vector space. Thus, a Banach space is a vector space with a metric that allows the computation of vector length and distance between vector ...
. In this case the formulation is
:
where is the
Fréchet derivative
In mathematics, the Fréchet derivative is a derivative defined on normed spaces. Named after Maurice Fréchet, it is commonly used to generalize the derivative of a real-valued function of a single real variable to the case of a vector-valued fu ...
computed at . One needs the Fréchet derivative to be boundedly invertible at each in order for the method to be applicable. A condition for existence of and convergence to a root is given by the
Newton–Kantorovich theorem.
Over -adic numbers
In -adic analysis, the standard method to show a polynomial equation in one variable has a -adic root is
Hensel's lemma In mathematics, Hensel's lemma, also known as Hensel's lifting lemma, named after Kurt Hensel, is a result in modular arithmetic, stating that if a univariate polynomial has a simple root modulo a prime number , then this root can be ''lifted'' to ...
, which uses the recursion from Newton's method on the -adic numbers. Because of the more stable behavior of addition and multiplication in the -adic numbers compared to the real numbers (specifically, the unit ball in the -adics is a ring), convergence in Hensel's lemma can be guaranteed under much simpler hypotheses than in the classical Newton's method on the real line.
Newton–Fourier method
The Newton–Fourier method is
Joseph Fourier
Jean-Baptiste Joseph Fourier (; ; 21 March 1768 – 16 May 1830) was a French people, French mathematician and physicist born in Auxerre and best known for initiating the investigation of Fourier series, which eventually developed into Fourier an ...
's extension of Newton's method to provide bounds on the absolute error of the root approximation, while still providing quadratic convergence.
Assume that is twice continuously differentiable on and that contains a root in this interval. Assume that on this interval (this is the case for instance if , , and , and on this interval). This guarantees that there is a unique root on this interval, call it . If it is concave down instead of concave up then replace by since they have the same roots.
Let be the right endpoint of the interval and let be the left endpoint of the interval. Given , define
:
which is just Newton's method as before. Then define
:
where the denominator is and not . The iterations will be strictly decreasing to the root while the iterations will be strictly increasing to the root. Also,
:
so that distance between and decreases quadratically.
Quasi-Newton methods
When the Jacobian is unavailable or too expensive to compute at every iteration, a
quasi-Newton method Quasi-Newton methods are methods used to either find zeroes or local maxima and minima of functions, as an alternative to Newton's method. They can be used if the Jacobian or Hessian is unavailable or is too expensive to compute at every iteration. ...
can be used.
-analog
Newton's method can be generalized with the
-analog of the usual derivative.
Modified Newton methods
Maehly's procedure
A nonlinear equation has multiple solutions in general. But if the initial value is not appropriate, Newton's method may not converge to the desired solution or may converge to the same solution found earlier. When we have already found N solutions of
, then the next root can be found by applying Newton's method to the next equation:
:
This method is applied to obtain zeros of the
Bessel function
Bessel functions, first defined by the mathematician Daniel Bernoulli and then generalized by Friedrich Bessel, are canonical solutions of Bessel's differential equation
x^2 \frac + x \frac + \left(x^2 - \alpha^2 \right)y = 0
for an arbitrary ...
of the second kind.
Hirano's modified Newton method
Hirano's modified Newton method is a modification conserving the convergence of Newton method and avoiding unstableness. It is developed to solve complex polynomials.
Interval Newton's method
Combining Newton's method with
interval arithmetic
Interval arithmetic (also known as interval mathematics, interval analysis, or interval computation) is a mathematical technique used to put bounds on rounding errors and measurement errors in mathematical computation. Numerical methods using ...
is very useful in some contexts. This provides a stopping criterion that is more reliable than the usual ones (which are a small value of the function or a small variation of the variable between consecutive iterations). Also, this may detect cases where Newton's method converges theoretically but diverges numerically because of an insufficient
floating-point precision (this is typically the case for polynomials of large degree, where a very small change of the variable may change dramatically the value of the function; see
Wilkinson's polynomial
In numerical analysis, Wilkinson's polynomial is a specific polynomial which was used by James H. Wilkinson in 1963 to illustrate a difficulty when finding the root of a polynomial: the location of the roots can be very sensitive to perturbatio ...
).
Consider , where is a real interval, and suppose that we have an interval extension of , meaning that takes as input an interval and outputs an interval such that:
:
We also assume that , so in particular has at most one root in .
We then define the interval Newton operator by:
:
where . Note that the hypothesis on implies that is well defined and is an interval (see
interval arithmetic
Interval arithmetic (also known as interval mathematics, interval analysis, or interval computation) is a mathematical technique used to put bounds on rounding errors and measurement errors in mathematical computation. Numerical methods using ...
for further details on interval operations). This naturally leads to the following sequence:
:
The
mean value theorem
In mathematics, the mean value theorem (or Lagrange theorem) states, roughly, that for a given planar arc between two endpoints, there is at least one point at which the tangent to the arc is parallel to the secant through its endpoints. It i ...
ensures that if there is a root of in , then it is also in . Moreover, the hypothesis on ensures that is at most half the size of when is the midpoint of , so this sequence converges towards , where is the root of in .
If strictly contains 0, the use of extended interval division produces a union of two intervals for ; multiple roots are therefore automatically separated and bounded.
Applications
Minimization and maximization problems
Newton's method can be used to find a minimum or maximum of a function . The derivative is zero at a minimum or maximum, so local minima and maxima can be found by applying Newton's method to the derivative. The iteration becomes:
:
Multiplicative inverses of numbers and power series
An important application is
Newton–Raphson division
A division algorithm is an algorithm which, given two integers N and D, computes their quotient and/or remainder, the result of Euclidean division. Some are applied by hand, while others are employed by digital circuit designs and software.
Divis ...
, which can be used to quickly find the
reciprocal
Reciprocal may refer to:
In mathematics
* Multiplicative inverse, in mathematics, the number 1/''x'', which multiplied by ''x'' gives the product 1, also known as a ''reciprocal''
* Reciprocal polynomial, a polynomial obtained from another pol ...
of a number , using only multiplication and subtraction, that is to say the number such that . We can rephrase that as finding the zero of . We have .
Newton's iteration is
:
Therefore, Newton's iteration needs only two multiplications and one subtraction.
This method is also very efficient to compute the multiplicative inverse of a
power series
In mathematics, a power series (in one variable) is an infinite series of the form
\sum_^\infty a_n \left(x - c\right)^n = a_0 + a_1 (x - c) + a_2 (x - c)^2 + \dots
where ''an'' represents the coefficient of the ''n''th term and ''c'' is a const ...
.
Solving transcendental equations
Many
transcendental equation
In applied mathematics, a transcendental equation is an equation over the real number, real (or complex number, complex) numbers that is not algebraic equation, algebraic, that is, if at least one of its sides describes a transcendental function. ...
s can be solved using Newton's method. Given the equation
:
with and/or a
transcendental function
In mathematics, a transcendental function is an analytic function that does not satisfy a polynomial equation, in contrast to an algebraic function.
In other words, a transcendental function "transcends" algebra in that it cannot be expressed alge ...
, one writes
:
The values of that solve the original equation are then the roots of , which may be found via Newton's method.
Obtaining zeros of special functions
Newton's method is applied to the ratio of Bessel functions in order to obtain its root.
Numerical verification for solutions of nonlinear equations
A numerical verification for solutions of nonlinear equations has been established by using Newton's method multiple times and forming a set of solution candidates.
Examples
Square root
Consider the problem of finding the square root of a number , that is to say the positive number such that . Newton's method is one of many
methods of computing square roots
Methods of computing square roots are numerical analysis algorithms for approximating the principal, or non-negative, square root (usually denoted \sqrt, \sqrt /math>, or S^) of a real number. Arithmetically, it means given S, a procedure for fi ...
. We can rephrase that as finding the zero of . We have .
For example, for finding the square root of 612 with an initial guess , the sequence given by Newton's method is:
:
where the correct digits are underlined. With only a few iterations one can obtain a solution accurate to many decimal places.
Rearranging the formula as follows yields the
Babylonian method of finding square roots:
:
i.e. the
arithmetic mean
In mathematics and statistics, the arithmetic mean ( ) or arithmetic average, or just the ''mean'' or the ''average'' (when the context is clear), is the sum of a collection of numbers divided by the count of numbers in the collection. The colle ...
of the guess, and .
Solution of
Consider the problem of finding the positive number
with
. We can rephrase that as finding the zero of
. We have
. Since
for all
and
for
, we know that our solution lies between 0 and 1.
For example, with an initial guess , the sequence given by Newton's method is (note that a starting value of 0 will lead to an undefined result, showing the importance of using a starting point that is close to the solution):
:
The correct digits are underlined in the above example. In particular, is correct to 12 decimal places. We see that the number of correct digits after the decimal point increases from 2 (for ) to 5 and 10, illustrating the quadratic convergence.
Code
The following is an implementation example of the Newton's method in the
Python
Python may refer to:
Snakes
* Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia
** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia
* Python (mythology), a mythical serpent
Computing
* Python (pro ...
(version 3.x) programming language for finding a root of a function
f
which has derivative
f_prime
.
The initial guess will be and the function will be so that .
Each new iteration of Newton's method will be denoted by
x1
. We will check during the computation whether the denominator (
yprime
) becomes too small (smaller than
epsilon
), which would be the case if , since otherwise a large amount of error could be introduced.
def f(x):
return x**2 - 2 # f(x) = x^2 - 2
def f_prime(x):
return 2*x # f'(x) = 2x
def newtons_method(
x0, # The initial guess
f, # The function whose root we are trying to find
f_prime, # The derivative of the function
tolerance, # 7-digit accuracy is desired
epsilon, # Do not divide by a number smaller than this
max_iterations, # The maximum number of iterations to execute
):
for i in range(max_iterations):
y = f(x0)
yprime = f_prime(x0)
if abs(yprime) < epsilon: # Stop if the denominator is too small
break
x1 = x0 - y / yprime # Do Newton's computation
if abs(x1 - x0) <= tolerance: # Stop when the result is within the desired tolerance
return x1 # x1 is a solution within tolerance and maximum number of iterations
x0 = x1 # Update x0 to start the process again
return None # Newton's method did not converge
See also
*
Aitken's delta-squared process
In numerical analysis, Aitken's delta-squared process or Aitken extrapolation is a series acceleration method, used for accelerating the rate of convergence of a sequence. It is named after Alexander Aitken, who introduced this method in 1926.Alexa ...
*
Bisection method
In mathematics, the bisection method is a root-finding method that applies to any continuous function for which one knows two values with opposite signs. The method consists of repeatedly bisecting the interval defined by these values and the ...
*
Euler method
In mathematics and computational science, the Euler method (also called forward Euler method) is a first-order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic explicit m ...
*
Fast inverse square root
Fast inverse square root, sometimes referred to as Fast InvSqrt() or by the hexadecimal constant 0x5F3759DF, is an algorithm that estimates \frac, the reciprocal (or multiplicative inverse) of the square root of a 32-bit floating-point number ...
*
Fisher scoring
*
Gradient descent
In mathematics, gradient descent (also often called steepest descent) is a first-order iterative optimization algorithm for finding a local minimum of a differentiable function. The idea is to take repeated steps in the opposite direction of the ...
*
Integer square root
In number theory, the integer square root (isqrt) of a non-negative integer ''n'' is the non-negative integer ''m'' which is the greatest integer less than or equal to the square root of ''n'',
: \mbox( n ) = \lfloor \sqrt n \rfloor.
For example ...
*
Kantorovich theorem
The Kantorovich theorem, or Newton–Kantorovich theorem, is a mathematical statement on the semi-local convergence of Newton's method. It was first stated by Leonid Kantorovich in 1948. It is similar to the form of the Banach fixed-point theorem, ...
*
Laguerre's method
In numerical analysis, Laguerre's method is a root-finding algorithm tailored to polynomials. In other words, Laguerre's method can be used to numerically solve the equation for a given polynomial . One of the most useful properties of this metho ...
*
Methods of computing square roots
Methods of computing square roots are numerical analysis algorithms for approximating the principal, or non-negative, square root (usually denoted \sqrt, \sqrt /math>, or S^) of a real number. Arithmetically, it means given S, a procedure for fi ...
*
Newton's method in optimization
In calculus, Newton's method is an iterative method for finding the roots of a differentiable function , which are solutions to the equation . As such, Newton's method can be applied to the derivative of a twice-differentiable function to fi ...
*
Richardson extrapolation
In numerical analysis, Richardson extrapolation is a sequence acceleration method used to improve the rate of convergence of a sequence of estimates of some value A^\ast = \lim_ A(h). In essence, given the value of A(h) for several values of h, we ...
*
Root-finding algorithm
In mathematics and computing, a root-finding algorithm is an algorithm for finding zeros, also called "roots", of continuous functions. A zero of a function , from the real numbers to real numbers or from the complex numbers to the complex numbers ...
*
Secant method
In numerical analysis, the secant method is a root-finding algorithm that uses a succession of roots of secant lines to better approximate a root of a function ''f''. The secant method can be thought of as a finite-difference approximation o ...
*
Steffensen's method
*
Subgradient method
Notes
References
*
*
Further reading
* Kendall E. Atkinson, ''An Introduction to Numerical Analysis'', (1989) John Wiley & Sons, Inc,
* Tjalling J. Ypma, Historical development of the Newton–Raphson method, ''SIAM Review'' 37 (4), 531–551, 1995. .
*
* P. Deuflhard, ''Newton Methods for Nonlinear Problems. Affine Invariance and Adaptive Algorithms.'' Springer Series in Computational Mathematics, Vol. 35. Springer, Berlin, 2004. .
* C. T. Kelley, ''Solving Nonlinear Equations with Newton's Method'', no 1 in Fundamentals of Algorithms, SIAM, 2003. .
* J. M. Ortega, W. C. Rheinboldt, ''Iterative Solution of Nonlinear Equations in Several Variables.'' Classics in Applied Mathematics, SIAM, 2000. .
*. See especially Section
9.4 an
*
External links
*
*
Newton's method, Citizendium.*
ttp://www.ece.mcmaster.ca/~xwu/part2.pdf Wu, X., Roots of Equations, Course notes.
{{DEFAULTSORT:Newton's Method
Optimization algorithms and methods
Root-finding algorithms
Isaac Newton