# 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 p(x) = 0 for a given polynomial p(x). One of the most useful properties of this method is that it is, from extensive empirical study, very close to being a "sure-fire" method, meaning that it is almost guaranteed to always converge to some root of the polynomial, no matter what initial guess is chosen. However, for computer computation, more efficient methods are known, with which it is guaranteed to find all roots (see Root-finding algorithm § Roots of polynomials) or all real roots (see Real-root isolation).
This method is named in honour of the French mathematician, Edmond Laguerre.

## Definition

The algorithm of the Laguerre method to find one root of a polynomial p(x) of degree n is:
* Choose an initial guess x$_0$
* For k = 0, 1, 2, ...
** If $p(x_{k})$ is very small, exit the loop
** Calculate $G={\frac {p'(x_{k})}{p(x_{k})}}$
** Calculate $H=G^{2}-{\frac {p''(x_{k})}{p(x_{k})}}$
** Calculate $a={\frac {n}{G\pm {\sqrt {(n-1)(nH-G^{2})}}}}$, where the sign is chosen to give the denominator with the larger absolute value, to avoid catastrophic cancellation.
** Set $x_{k+1}=x_{k}-a$
* Repeat until a is small enough or if the maximum number of iterations has been reached.
If a root has been found, the corresponding linear factor can be removed from p. This deflation step reduces the degree of the polynomial by one, so that eventually, approximations for all roots of p can be found. Note however that deflation can lead to approximate factors that differ significantly from the corresponding exact factors. This error is least if the roots are found in the order of increasing magnitude.

## Derivation

The fundamental theorem of algebra states that every nth degree polynomial $p$ can be written in the form
    $p(x)=C\left(x-x_{1}\right)\left(x-x_{2}\right)\cdots \left(x-x_{n}\right),$
so that $x_{1},\ x_{2},\ \ldots ,\ x_{n},$ are the roots of the polynomial. If we take the natural logarithm of both sides, we find that
    $\ln {\bigl |}p(x){\bigr |}=\ln {\bigl |}C{\bigr |}+\ln {\bigl |}x-x_{1}{\bigr |}+\ln {\bigl |}x-x_{2}{\bigr |}+\cdots +\ln {\bigl |}x-x_{n}{\bigr |}.$
Denote the logarithmic derivative by
    ${\begin{aligned}G&={\frac {\operatorname {d} }{\operatorname {d} x}}\ln {\Bigl |}p(x){\Bigr |}={\frac {1}{x-x_{1}}}+{\frac {1}{x-x_{2}}}+\cdots +{\frac {1}{x-x_{n}}}\\&={\frac {p'(x)}{{\bigl |}p(x){\bigr |}}},\end{aligned}}$
and the negated second derivative by
    ${\begin{aligned}\ H&=-{\frac {\operatorname {d} ^{2}}{\operatorname {d} x^{2}}}\ln {\Bigl |}p(x){\Bigr |}={\frac {1}{(x-x_{1})^{2}}}+{\frac {1}{(x-x_{2})^{2}}}+\cdots +{\frac {1}{(x-x_{n})^{2}}}\\&=-{\frac {p''(x)}{{\bigl |}p(x){\bigr |}}}+\left({\frac {p'(x)}{p(x)}}\right)^{2}\cdot \ \operatorname {sgn} \!{\Biglp(x){\Bigr )}.\end{aligned}}$
We then make what Acton (1970) calls a "drastic set of assumptions", that the root we are looking for, say, $x_{1}$ is a short distance, $a,$ away from our guess $x,$ and all the other roots are all clustered together, at some further distance $b.$ If we denote these distances by
    $a\equiv x-x_{1}$
and
    $b\approx x-x_{2}\approx x-x_{3}\approx \cdots \approx x-x_{n},$
or exactly,
    $b\equiv \operatorname {harmonic\ mean} {\Bigl \x-x_{2},\ x-x_{3},\ \ldots \ x-x_{n}{\Bigr \}}$
then our equation for $\ G\$ may be written as
    $G={\frac {1}{a}}+{\frac {n-1}{b}}$
and the expression for $H$ becomes
    $H={\frac {1}{a^{2}}}+{\frac {n-1}{b^{2}}}.$
Solving these equations for $a,$ we find that
    $a={\frac {n}{G\pm {\sqrt {{\bigln-1{\bigr )}{\biglnH-G^{2}{\bigr )}}}}},$
where in this case, the square root of the (possibly) complex number is chosen to produce largest absolute value of the denominator and make $\ a\$ as small as possible; equivalently, it satisfies:
    $\operatorname {\mathcal {R_{e}}} {\biggl \{\overline {G}}{\sqrt {\left(n-1\right)\left(nH-G^{2}\right)}}{\biggr \}}>0,$
where ${\mathcal {R_{e}}}$ denotes real part of a complex number, and ${\overline {G}}$ is the complex conjugate of $G;$ or
    $a={\frac {p(x)}{p'(x)}}\cdot {\Biggl \{\frac {1}{n}}+{\frac {n-1}{n}}{\sqrt {1-{\frac {n}{n-1}}{\frac {p(x)\ p''(x)}{p'(x)^{2}}}}}{\Biggr \}}^{-1},$
where the square root of a complex number is chosen to have a non-negative real part.
For small values of $p(x)$ this formula differs from the offset of the third order Halley's method by an error of $\operatorname {\mathcal {O}} {\bigl \(p(x))^{3}{\bigr \}},$ so convergence close to a root will be cubic as well.

### Fallback

Even if the "drastic set of assumptions" does not work well for some particular polynomial p(x), then p(x) can be transformed into a related polynomial r for which the assumptions are viable; e.g. by first shifting the origin towards a suitable complex number w, giving a second polynomial q(x) = p(x − w), that give distinct roots clearly distinct magnitudes, if necessary (which it will be if some roots are complex conjugates).
After that, getting a third polynomial r from q(x) by repeatedly applying the root squaring transformation from Graeffe's method, enough times to make the smaller roots significantly smaller than the largest root (and so, clustered comparatively nearer to zero). The approximate root from Graeffe's method, can then be used to start the new iteration for Laguerre's method on r. An approximate root for p(x) may then be obtained straightforwardly from that for r.
If we make the even more extreme assumption that the terms in $G$ corresponding to the roots $x_{2},\ x_{3},\ \ldots ,\ x_{n}$ are negligibly small compared to the root $x_{1},$ this leads to Newton's method.

## Properties

If x is a simple root of the polynomial $p(x),$ then Laguerre's method converges cubically whenever the initial guess, $x^{(0)},$ is close enough to the root $x_{1}.$ On the other hand, when $x_{1}$ is a multiple root convergence is merely linear, with the penalty of calculating values for the polynomial and its first and second derivatives at each stage of the iteration.
A major advantage of Laguerre's method is that it is almost guaranteed to converge to some root of the polynomial no matter where the initial approximation is chosen. This is in contrast to other methods such as the Newton–Raphson method and Stephensen's method, which notoriously fail to converge for poorly chosen initial guesses. Laguerre's method may even converge to a complex root of the polynomial, because the radicand of the square root may be of a negative number, in the formula for the correction, $a,$ given above – manageable so long as complex numbers can be conveniently accommodated for the calculation. This may be considered an advantage or a liability depending on the application to which the method is being used.
Empirical evidence shows that convergence failure is extremely rare, making this a good candidate for a general purpose polynomial root finding algorithm. However, given the fairly limited theoretical understanding of the algorithm, many numerical analysts are hesitant to use it as a default, and prefer better understood methods such as the Jenkins–Traub algorithm, for which more solid theory has been developed and whose limits are known.
The algorithm is fairly simple to use, compared to other "sure-fire" methods, and simple enough for hand calculation, aided by a pocket calculator, if a computer is not available. The speed at which the method converges means that one is only very rarely required to compute more than a few iterations to get high accuracy.