Halley's method

{{Short description|A method of numerically finding roots of a function}}

{{Use dmy dates|date=October 2023}}

In numerical analysis, Halley's method is a root-finding algorithm used for functions of one real variable with a continuous second derivative. Edmond Halley was an English mathematician and astronomer who introduced the method now called by his name.

The algorithm is second in the class of Householder's methods, after Newton's method. Like the latter, it iteratively produces a sequence of approximations to the root; their rate of convergence to the root is cubic. Multidimensional versions of this method exist.{{cite journal |last1=Gundersen |first1=Geir |last2=Steihaug |first2=Trond |title=On large scale unconstrained optimization problems and higher order methods |journal=Optimization Methods & Software |date=2010 |volume=25 |issue=3 |pages=337–358 |doi=10.1080/10556780903239071 |url=https://optimization-online.org/wp-content/uploads/2007/03/1610.pdf |access-date=2 September 2024}}

Halley's method exactly finds the roots of a linear-over-linear Padé approximation to the function, in contrast to Newton's method or the Secant method which approximate the function linearly, or Muller's method which approximates the function quadratically.{{Cite journal | last1 = Boyd | first1 = John P. | title = Finding the Zeros of a Univariate Equation: Proxy Rootfinders, Chebyshev Interpolation, and the Companion Matrix | doi = 10.1137/110838297 | journal = SIAM Review | volume = 55 | issue = 2 | pages = 375–396 | year = 2013 | url = http://epubs.siam.org/doi/pdf/10.1137/110838297 | url-access = subscription }}

There is also Halley's irrational method, described below.

Method

Halley's method is a numerical algorithm for solving the nonlinear equation {{nobr| {{math|f (x) {{=}} 0}} .}} In this case, the function {{mvar|f}} has to be a function of one real variable. The method consists of a sequence of iterations:

: x_{n+1} = x_n - \frac{\ f(x_n)\ f'(x_n)\ }{\ \left[\ f'(x_n)\ \right]^2 - \tfrac{1}{2}\ f(x_n)\ f''(x_n)\ }

beginning with an initial guess {{math|x0}}.{{cite journal |last1=Scavo|first1=T.R. |last2=Thoo |first2=J.B. |year=1995 |title=On the geometry of Halley's method |journal=American Mathematical Monthly |volume=102 |issue=5 |pages=417–426 |doi=10.2307/2975033 |jstor=2975033 }}

If {{mvar|f}} is a three times continuously differentiable function and {{mvar|a}} is a zero of {{mvar|f}} but not of its derivative, then, in a neighborhood of {{mvar|a}}, the iterates {{math|xn}} satisfy:

:| x_{n+1} - a | \le K \cdot

x_n - a
^3, \quad \text{ for some }\quad K > 0 ~.

This means that the iterates converge to the zero if the initial guess is sufficiently close, and that the convergence is cubic.{{cite journal |last=Alefeld |first=G. |year=1981 |title=On the convergence of Halley's method |jstor=2321760 |journal=American Mathematical Monthly |volume=88 |issue=7 |pages=530–536 |doi=10.2307/2321760 }}

The following alternative formulation shows the similarity between Halley's method and Newton's method. The ratio \ f(x_n)/f'(x_n)\ only needs to be computed once, and this form is particularly useful when the other ratio, \ f''(x_n)/f'(x_n)\ , can be reduced to a simpler form:

:x_{n+1}\ =\ x_n -\frac{ f(x_n) }{\ f'(x_n) - \frac{ f(x_n) }{\ f'(x_n)\ }\frac{\ f(x_n)\ }{2}\ }\ =\ x_n - \frac{ f(x_n) }{\ f'(x_n)\ } \left[\ 1\ -\ \frac{1}{2} \cdot \frac{f(x_n)}{\ f'(x_n)\ } \cdot \frac{\ f(x_n)\ }{ f'(x_n) }\ \right]^{-1} ~.

When the second derivative, \ f''(x_n)\ , is very close to zero, the Halley's method iteration is almost the same as the Newton's method iteration.

Motivation

When deriving Newton's method, a proof starts with the approximation

0 = f(x_{n+1}) \approx f(x_n) + f'(x_n) (x_{n+1} - x_n)

to compute

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

Similarly for Halley's method, a proof starts with

0 = f(x_{n+1}) \approx f(x_n) + f'(x_n) (x_{n+1} - x_n) + \frac{f''(x_n)}2 (x_{n+1} - x_n)^2\,.

For Halley's rational method, this is rearranged to give

x_{n+1}-x_n = -\frac{f(x_n)}{f'(x_n) + \frac{f''(x_n)}2 (x_{n+1}-x_n)}\,

where {{math|x{{sub|n+1}} − x{{sub|n}}}} appears on both sides of the equation. Substituting in the Newtwon's method value for {{math|x{{sub|n+1}} − x{{sub|n}}}} into the right-hand side of this last formula gives the formula for Halley's method,

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

Also see the motivation and proofs for the more general class of Householder's methods.

Cubic convergence

Suppose a is a root of f but not of its derivative. And suppose that the third derivative of f exists and is continuous in a neighborhood of a and {{math|xn}} is in that neighborhood. Then Taylor's theorem implies:

:0 = f(a) = f(x_n) + f'(x_n) (a - x_n) + \frac{f(x_n)}{2} (a - x_n)^2 + \frac{f'(\xi)}{6} (a - x_n)^3

and also

:0 = f(a) = f(x_n) + f'(x_n) (a - x_n) + \frac{f''(\eta)}{2} (a - x_n)^2,

where ξ and η are numbers lying between a and {{math|xn}}. Multiply the first equation by 2f'(x_n) and subtract from it the second equation times f''(x_n)(a - x_n) to give:

:\begin{align}

0 &= 2 f(x_n) f'(x_n) + 2 [f'(x_n)]^2 (a - x_n) + f'(x_n) f(x_n) (a - x_n)^2 + \frac{f'(x_n) f'(\xi)}{3} (a - x_n)^3 \\

&\qquad- f(x_n) f(x_n) (a - x_n) - f'(x_n) f(x_n) (a - x_n)^2 - \frac{f(x_n) f(\eta)}{2} (a - x_n)^3.

\end{align}

Canceling f'(x_n) f''(x_n) (a - x_n)^2 and re-organizing terms yields:

:0 = 2 f(x_n) f'(x_n) + \left(2 [f'(x_n)]^2 - f(x_n) f(x_n) \right) (a - x_n) + \left(\frac{f'(x_n) f'(\xi)}{3} - \frac{f(x_n) f(\eta)}{2} \right) (a - x_n)^3.

Put the second term on the left side and divide through by

: 2 [f'(x_n)]^2 - f(x_n) f''(x_n)

to get:

:a - x_n = \frac{-2f(x_n) f'(x_n)}{2[f'(x_n)]^2 - f(x_n) f(x_n)} - \frac{2f'(x_n) f'(\xi) - 3 f(x_n) f(\eta)}{6(2 [f'(x_n)]^2 - f(x_n) f''(x_n))} (a - x_n)^3.

Thus:

:a - x_{n+1} = - \frac{2 f'(x_n) f'(\xi) - 3 f(x_n) f(\eta)}{12[f'(x_n)]^2 - 6 f(x_n) f(x_n)} (a - x_n)^3.

The limit of the coefficient on the right side as {{math|xna}} is:

:-\frac{2 f'(a) f'(a) - 3 f(a) f(a)}{12 [f'(a)]^2 - 6 f(a) f(a)}.

If we take K to be a little larger than the absolute value of this, we can take absolute values of both sides of the formula and replace the absolute value of coefficient by its upper bound near a to get:

:|a - x_{n+1}| \leq K |a - x_n|^3

which is what was to be proved.

To summarize,

:\Delta x_{i+1} =\frac{3(f)^2 - 2f' f'}{12(f')^2} (\Delta x_i)^3 + O[\Delta x_i]^4, \qquad \Delta x_i \triangleq x_i - a.{{Cite journal|last1=Proinov|first1=Petko D.|last2=Ivanov|first2=Stoil I.|year=2015|title=On the convergence of Halley's method for simultaneous computation of polynomial zeros|journal=J. Numer. Math.|volume=23|issue=4|pages=379–394|doi=10.1515/jnma-2015-0026|s2cid=10356202 }}

Halley's irrational method

Halley actually developed two third-order root-finding methods. The above, using only a division, is referred to as Halley's rational method. A second, "irrational" method uses a square root as well.{{cite journal

|first=Harry |last=Bateman |author-link=Harry Bateman

|title=Halley's methods for solving equations

|journal=The American Mathematical Monthly

|volume=45 |issue=1 |date=January 1938 |pages=11–17

|doi=10.2307/2303467

|jstor=2303467 }}{{cite journal

|title=Methodus nova accurata & facilis inveniendi radices æqnationum quarumcumque generaliter, sine praviæ reductione

|first=Edmond |last=Halley |author-link=Edmond Halley

|journal=Philosophical Transactions of the Royal Society

|volume=18 |issue=210 |date=May 1694 |pages=136–148

|lang=la

|doi=10.1098/rstl.1694.0029 |doi-access=free

}} An English translation was published as {{cite book

|chapter=A new, exact, and easy Method of finding the Roots of any Equations generally, and that without any previous Reduction

|first=Edmond |last=Halley |author-link=Edmond Halley

|title=The Philosophical Transactions of the Royal Society of London, from their commencement, in 1665, to the year 1800

|editor1=C. Hutton |editor2=G. Shaw |editor3=R. Pearson

|volume=III from 1683 to 1694

|year=1809 |orig-date=May 1694 |pages=640–649

|url=https://archive.org/details/s3id13654280

}}{{cite tech report

|title=A correctly rounded binary64 cube root

|first=Robin |last=Leroy

|date=2021-06-21

|url=https://raw.githubusercontent.com/mockingbirdnest/Principia/master/documentation/cbrt.pdf?raw=true

}}

It starts with

:f(x_{n+1}) \approx f(x_n) + f'(x_n)(x_{n+1} - x_{n}) + \frac{f''(x_n)}{2}(x_{n+1} - x_{n})^2

and solves f(x_{n+1}) \approx 0 for the value (x_{n+1} - x_{n}) using one of two forms of the quadratic formula. The quadratic formula solution either has the radical in the numerator:

:x_{n+1} = x_n - \frac{f'(x_n) - \operatorname{sign}(f'(x_n))\sqrt{[f'(x_n)]^2 - 2f(x_n)f(x_n)}}{f(x_n)} = x_n - \frac{f'(x_n) \left(1 - \sqrt{1 - \frac{2f(x_n)f(x_n)}{f'(x_n)^2}}\right)}{f(x_n)}

or it has the radical in the denominator, yielding an update step that often gives better results:

:x_{n+1} = x_n - \frac{2f(x_n)}{f'(x_n) + \operatorname{sign}(f'(x_n))\sqrt{[f'(x_n)]^2 - 2f(x_n)f(x_n)}} = x_n - \frac{2f(x_n)}{f'(x_n) \left( 1 + \sqrt{1 - \frac{2f(x_n)f(x_n)}{f'(x_n)^2}}\right)}

This iteration was "deservedly preferred" to the rational method by Halley{{r|Halley1694}} on the grounds that the denominator is smaller, making the division easier. A second advantage is that it tends to have about half of the error of the rational method, a benefit which multiplies as it is iterated. On a computer, it would appear to be slower as it has two slow operations (division and square root) instead of one, but on modern computers the reciprocal of the denominator can be computed at the same time as the square root via instruction pipelining, so the latency of each iteration differs very little.{{r|eggrobin|p=24}}

The formulation with the radical in the denominator reduces to Halley's rational method under the approximation that {{tmath|\sqrt{1-z} \approx 1 - z/2}}.

Muller's method could be considered as modification of this method. So, this method can be used to find the complex roots.

References