HOME

TheInfoList



OR:

In
numerical analysis Numerical analysis is the study of algorithms that use numerical approximation (as opposed to symbolic manipulations) for the problems of mathematical analysis (as distinguished from discrete mathematics). It is the study of numerical methods t ...
, 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 great ...
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 16 ...
, 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 (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. 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. ...
, 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 :x_ = x_0 - \frac 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. Mor ...
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 discr ...
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 or ...
at the initial point. The process is repeated as :x_ = x_n - \frac 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 ...
. The method can also be extended to complex functions 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 :f'(x_n) = \dfrac . Solving for gives :x_ = x_n - \frac. 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 In mathematical analysis, the intermediate value theorem states that if f is a continuous function whose domain contains the interval , then it takes on any given value between f(a) and f(b) at some point within the interval. This has two impo ...
.) The method will usually converge, provided this initial guess is close enough to the unknown zero, and that . Furthermore, for a zero of multiplicity 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 co ...
) 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 area, ...
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 great ...
'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 ...
'' 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 Ch ...
). 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 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, 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 astronome ...
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 fi ...
. 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 roy ...
. 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 16 ...
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 bee ...
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 British mathematician who worked mostly on algebra. He helped found the modern British school of pure mathematics. As a child, Cayley enjoyed solving complex maths problems ...
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 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 :f(x)=, x, ^a,\quad 0 < a < \tfrac 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" in ...
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 where the divisor (denominator) is zero. Such a division can be formally expressed as \tfrac, where is the dividend (numerator). In ordinary arithmetic, the expression has no meaning, as there is ...
.


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 tunneli ...
. 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 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: :x_ = x_n - m\frac. 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 :x_ = x_n - \frac = x_n - \frac = 0\,.


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 call ...
will converge 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: :\Delta x_ = \frac \left(\Delta x_\right)^2 + O\left(\Delta x_\right)^3 \,, where :\Delta x_i \triangleq x_i - \alpha \,. 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 , 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 :R_1 = \fracf''(\xi_n)\left(\alpha - x_n\right)^ \,, where is in between and . Since is the root, () becomes: Dividing equation () by and rearranging gives Remembering that is defined by one finds that : \underbrace_ = \frac ^2 \,. 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 : M = \frac12 \left( \sup_ \vert f'' (x) \vert \right) \left( \sup_ \frac \right) . \, If these conditions hold, : \vert \varepsilon_ \vert \leq M \cdot \varepsilon_n^2 \,.


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: :f(x) = 1-x^2. 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" in ...
(where the derivative is zero), will be undefined, since the tangent at is parallel to the -axis: :x_1 = x_0 - \frac = 0 - \frac. 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 :f(x) = x^3 - 2x + 2 \! 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. Wh ...
). 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: :f(x) = \sqrt For any iteration point , the next iteration point will be: :x_ = x_n - \frac = x_n - \frac = x_n - 3x_n = -2x_n. 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 :f(x) = \begin 0 & \text x = 0,\\ x + x^2\sin \frac & \text x \neq 0. \end Its derivative is: :f'(x) = \begin 1 & \text x = 0,\\ 1 + 2x\sin \frac - 2\cos \frac & \text x \neq 0. \end 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 :f(x) = x^2 \! then and consequently :x - \frac = \frac . 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 :f(x) = x^2(x-1000)+1. 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 :f(x) = x + x^\frac43. Then :f'(x) = 1 + \tfrac43 x^\frac13. And :f''(x) = \tfrac49 x^ except when where it is undefined. Given , :x_ = x_n - \frac = \frac 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, Newton's method can be directly applied to find their zeroes. Each zero has a basin of attraction 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 il ...
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 mathe ...
real initial conditions lead to chaotic behavior, 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 f:\R^k\to \R. This is equivalent to finding the zeroes of a single vector-valued function F:\R^k\to \R^k. 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 a ...
. This results in the expression :\mathbf_ = \mathbf_ - J_F(\mathbf_n)^ F(\mathbf_n). 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 variables. For example, :\begin 3x+2y-z=1\\ 2x-2y+4z=-2\\ -x+\fracy-z=0 \end is a system of three equations in t ...
:J_F(\mathbf_n) (\mathbf_ - \mathbf_n) = -F(\mathbf_n) 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 inv ...
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 for more information.


In a Banach space

Another generalization is Newton's method to find a root of a functional 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 vec ...
. In this case the formulation is :X_=X_n-\bigl(F'(X_n)\bigr)^F(X_n),\, 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 ...
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 a ...
, 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 mathematician and physicist born in Auxerre and best known for initiating the investigation of Fourier series, which eventually developed into Fourier analysis and ...
'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 :x_ = x_n - \frac, which is just Newton's method as before. Then define :z_ = z_n - \frac, 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, :\lim_ \frac = \frac 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 f(x)=0, then the next root can be found by applying Newton's method to the next equation: :F(x) = \frac = 0 . 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 arbitrar ...
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 usi ...
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: : \begin F'( ,y &= \\\ pt F'(Y) &\supseteq \. \end We also assume that , so in particular has at most one root in . We then define the interval Newton operator by: : N(Y) = m - \frac = \left\ 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 usi ...
for further details on interval operations). This naturally leads to the following sequence: : \begin X_0 &= X\\ X_ &= N(X_k) \cap X_k. \end 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: :x_ = x_n - \frac.


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 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 :x_ = x_n-\frac = x_n+\frac = x_n(2-ax_n). 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 (or complex) numbers that is not algebraic, that is, if at least one of its sides describes a transcendental function. Examples include: :\begin x &= e^ \\ x &= ...
s can be solved using Newton's method. Given the equation :g(x) = h(x), 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 alg ...
, one writes :f(x) = g(x) - h(x). 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. 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: :\begin x_1 & = & x_0 - \dfrac & = & 10 - \dfrac & = & 35.6\qquad\qquad\qquad\quad\;\, \\ x_2 & = & x_1 - \dfrac & = & 35.6 - \dfrac & = & \underline6.395\,505\,617\,978\dots \\ x_3 & = & \vdots & = & \vdots & = & \underline90\,635\,492\,455\dots \\ x_4 & = & \vdots & = & \vdots & = & \underline88\,294\,075\dots \\ x_5 & = & \vdots & = & \vdots & = & \underline67\dots \end 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: :x_ = x_n - \frac = x_n - \frac = \frac\biggl(2x_n - \Bigl(x_n - \frac\Bigr)\biggr) = \frac\Bigl(x_n + \frac\Bigr) 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 coll ...
of the guess, and .


Solution of

Consider the problem of finding the positive number x with \cos x = x^3. We can rephrase that as finding the zero of f(x) = \cos(x)-x^3. We have f'(x) = -\sin(x)-3x^2. Since \cos(x) \le 1 for all x and x^3>1 for x>1, 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): :\begin x_1 & = & x_0 - \dfrac & = & 0.5 - \dfrac & = & 1.112\,141\,637\,097\dots \\ x_2 & = & x_1 - \dfrac & = & \vdots & = & \underline909\,672\,693\,736\dots \\ x_3 & = & \vdots & = & \vdots & = & \underline7\,263\,818\,209\dots \\ x_4 & = & \vdots & = & \vdots & = & \underline7\,135\,298\dots \\ x_5 & = & \vdots & = & \vdots & = & \underline11\dots \\ x_6 & = & \vdots & = & \vdots & = & \underline\dots \end 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 (pr ...
(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.Alex ...
* Bisection method *
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 ...
*
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 numbe ...
* 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 ...
*
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 *
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 ...
*
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 In numerical analysis, Steffensen's method is a root-finding technique named after Johan Frederik Steffensen which is similar to Newton's method. Steffensen's method also achieves quadratic convergence, but without using derivatives as Newton's m ...
*
Subgradient method Subgradient methods are iterative methods for solving convex minimization problems. Originally developed by Naum Z. Shor and others in the 1960s and 1970s, subgradient methods are convergent when applied even to a non-differentiable objective funct ...


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