Lin-Bairstow Method
Source inspiration: (Mathew 2000-2019).
Description
The Lin-Bairstow method finds the roots of a real polynomial \(P(x) = a_n x^n + \cdots + a_1 x + a_0\) two at a time, by finding a quadratic factor \(x^2 - rx - s\). It uses only real arithmetic, yet finds complex-conjugate pairs of roots as well as real ones.
Dividing \(P(x)\) by \(x^2 - rx - s\) leaves a quotient \(Q(x)\) and a remainder,
\[ P(x) = (x^2 - rx - s)\,Q(x) + b_1 (x - r) + b_0, \qquad Q(x) = b_n x^{n-2} + \cdots + b_3 x + b_2 , \]
where quadratic synthetic division computes the \(b\)’s, and the same recursion applied to the \(b\)’s gives the \(c\)’s:
\[ \begin{aligned} b_n &= a_n, & b_{n-1} &= a_{n-1} + r\,b_n, & b_k &= a_k + r\,b_{k+1} + s\,b_{k+2} \quad (k = n-2, \ldots, 1, 0), \\ c_n &= b_n, & c_{n-1} &= b_{n-1} + r\,c_n, & c_k &= b_k + r\,c_{k+1} + s\,c_{k+2} \quad (k = n-2, \ldots, 2, 1). \end{aligned} \]
The quadratic is a factor exactly when \(b_0 = b_1 = 0\), and the method is Newton’s method on these two equations in \(r\) and \(s\). The \(c\)’s are the partial derivatives (\(\partial b_0/\partial r = c_1\), \(\partial b_0/\partial s = \partial b_1/\partial r = c_2\), \(\partial b_1/\partial s = c_3\)), so each step evaluates them at \((r_j, s_j)\) and solves, by Cramer’s rule in Mathews’ module,
\[ \begin{pmatrix} c_1 & c_2 \\ c_2 & c_3 \end{pmatrix} \begin{pmatrix} \Delta r \\ \Delta s \end{pmatrix} = -\begin{pmatrix} b_0 \\ b_1 \end{pmatrix}, \qquad r_{j+1} = r_j + \Delta r, \quad s_{j+1} = s_j + \Delta s . \]
The method needs degree \(n \ge 3\), a starting guess \((r_0, s_0)\), and \(c_1 c_3 - c_2^2 \neq 0\) at every iterate. Real starts keep the iterates real, and a real polynomial always has a real quadratic factor. Mathews suggests \(r_0 = -a_1/a_2\), \(s_0 = -a_0/a_2\) (if \(a_2 \neq 0\)), from \(P(x) \approx a_2 x^2 + a_1 x + a_0\) near \(x = 0\).
In general, Newton’s method for a smooth system converges quadratically from close enough starts when its Jacobian is nonsingular at the solution. Here that holds exactly when \(x^2 - rx - s\) and \(Q(x)\) have no common root, as when every root of \(P\) is simple. When they share one, convergence can drop to linear: for \(P(x) = (x^2 + 1)^2\) from \((0.1, -1.2)\), the error ratio tends to \(1/2\).
For Mathews’ Example 4 (Case 1), \(P(x) = x^4 + x^3 + 3x^2 + 4x + 6\) from \((r_0, s_0) = (-2.1, -1.9)\), the iterates converge to \(x^2 + 2x + 2\), with roots \(-1 \pm i\), and \(Q(x) = x^2 - x + 3\) gives \(\tfrac12 \pm \tfrac{\sqrt{11}}{2} i\). From step 2 on, the error’s exponent roughly doubles each step (errors from 40-digit arithmetic):
| \(j\) | \(r_j\) | \(s_j\) | error \(\lVert (r_j + 2,\, s_j + 2) \rVert\) |
|---|---|---|---|
| 0 | −2.1 | −1.9 | \(1.41 \times 10^{-1}\) |
| 1 | −1.989302820836 | −1.949988192338 | \(5.11 \times 10^{-2}\) |
| 2 | −1.999992769905 | −2.000150979221 | \(1.51 \times 10^{-4}\) |
| 3 | −1.999999996545 | −1.999999991124 | \(9.52 \times 10^{-9}\) |
| 4 | −2.000000000000 | −2.000000000000 | \(1.42 \times 10^{-17}\) |
Repeating the method on \(Q(x)\) (deflation, Case 2) finds the rest. For the quintic \(x^5 + 6x^4 - 20x^2 + 22x + 8\) of Mathews’ Examples 1–3, the start \((-2, 3)\), his divisor \(x^2 + 2x - 3\), gives \(x^2 + 3.238964x + 0.853460\) (roots \(-2.949618\), \(-0.289346\)); his suggested start on the cubic quotient gives \(x^2 - 2.301046x + 1.851731\) (roots \(1.150523 \pm 0.726655i\)), leaving \(x + 5.062082\).
Convergence is only local. From \((r_0, s_0) = (-1, -2)\) on the same quintic, the iterates are thrown out to \(|s_{26}| \approx 7 \times 10^8\) and wander for more than 90 steps, and the factor they reach depends on the arithmetic: \(x^2 - 2.301046x + 1.851731\) in double precision, \(x^2 + 8.011701x + 14.931211\) with 30 or more digits.
Quadratic synthetic division extends the division by \(x - c\) of Horner’s Method, the iteration is two-variable Newton-Raphson as in Nonlinear Systems, Graeffe’s Method is another method made for polynomials, and Muller’s Method can also reach complex roots, using complex arithmetic.
Animations
Mathews made no animation for the Lin-Bairstow method, so both animations below are new, with no Mathews original. Most frames show one Lin-Bairstow step; Case 2 also has a frame for each deflation. In the full-scale complex-plane panels (Case 1’s top right and Case 2), red dots are the two roots of the current trial factor \(x^2 - r_j x - s_j\) (Case 2 also leaves small faded dots at the roots from earlier steps); the method works only with the real numbers \(r_j\) and \(s_j\), and the roots are drawn (by the quadratic formula) only to show where the factor is heading. Open circles in those panels mark the roots of \(P\); in Case 1’s two zoom panels (top left and bottom left), an open circle marks the previous iterate instead. Case 1 follows a single factor closely, zooming in as the steps shrink; Case 2 repeats the method on the quotients until every root of a quintic is found. Mathews’ Examples 1–3, which divide the quintic once by \(x^2 + 2x - 3\) (by formula, by tableau and in vector form), are not animated as such, since each is one division rather than an iteration; they are step 0 of Case 2.
Julia source scripts that generated these animations are linked under each case.
Case 1 — Mathews’ Example 4, \(P(x) = x^4 + x^3 + 3x^2 + 4x + 6\), \((r_0, s_0) = (-2.1, -1.9)\)
Behavior: The iterates converge to \((r, s) = (-2, -2)\), the factor \(x^2 + 2x + 2\), whose roots \(-1 \pm i\) are a complex pair although every iterate is real. The top-left panel shows \((r_j + 2,\, s_j + 2)\), zoomed in each frame so that the previous iterate (open circle) and the current one (red) both fit; the window shrinks from \(\pm 0.13\) at step 0 to \(\pm 1.7 \times 10^{-17}\) at step 5. The top-right panel shows the trial roots at full scale: they start at \(-1.05 \pm 0.893i\) and are already within 0.021 of \(-1 \pm i\) at step 1, too close to see at this scale, so the bottom-left panel zooms in on the upper root \(x_+\) in the same way; its distance from \(-1 + i\) falls through \(0.118\), \(0.0206\), \(7.92 \times 10^{-5}\), \(3.21 \times 10^{-9}\), \(4.72 \times 10^{-18}\), \(1.04 \times 10^{-35}\). The bottom-right panel plots \(\log_{10}\) of the error \(\lVert (r_j + 2,\, s_j + 2) \rVert\): after a slow first step (\(0.141\) to \(0.0511\)), its exponent roughly doubles each step from \(j = 2\) on (\(-3.8\), \(-8.0\), \(-16.8\), \(-34.5\)), the mark of quadratic convergence. The iterates are those of the table above and agree with the ones Mathews prints to at least 14 decimal places; the script runs in 256-bit arithmetic so that steps 4 and 5, whose errors are far below double-precision round-off, show the method’s own error (in double precision, \(r_4 = s_4 = -2\) exactly). The gray circles are the roots \(\tfrac12 \pm \tfrac{\sqrt{11}}{2} i \approx 0.5 \pm 1.658i\) of the other factor, \(Q(x) = x^2 - x + 3\).

Case 2 — Deflation, \(P(x) = x^5 + 6x^4 - 20x^2 + 22x + 8\)
Behavior: Stage 1 starts from Mathews’ divisor \(x^2 + 2x - 3\), \((r_0, s_0) = (-2, 3)\); step 0 is his Example 1, with remainder \(3(x + 2) + 8\), so \(b_1 = 3\) and \(b_0 = 8\). The trial roots, 1 and \(-3\) at the start, stay real and converge to \(-0.289346\) and \(-2.949618\); each stage stops at the first step with \(|\Delta r| + |\Delta s| < 10^{-12}\), here step 6, and the line under the plot shows the remainder \(b_0\) falling from 8 to about \(10^{-14}\), the level of double-precision round-off. Deflation leaves the cubic \(x^3 + 2.761036x^2 - 9.796356x + 9.373612\), and stage 2 starts from Mathews’ suggestion for it, \(r_0 = -a_1/a_2 = 3.548073\), \(s_0 = -a_0/a_2 = -3.394962\). Its trial roots start as the complex pair \(1.774 \pm 0.498i\), become the real pair \(2.146\) and \(0.160\) at step 1, and are a complex pair again from step 2 on, converging to \(1.150523 \pm 0.726655i\) (the stage stops at step 5). The iterates \(r_j, s_j\) are real throughout; the sign of \(r_j^2 + 4s_j\) (\(-0.99\), \(3.94\), \(-2.10\) at steps 0, 1, 2) decides whether the trial roots are real or complex. The linear quotient \(x + 5.062082\) gives the fifth root, \(-5.062082\). From step 2 on in each stage the trial roots sit on their circles at this scale, and only the remainder line shows the rest of the convergence. The open circles are the eigenvalues of \(P\)’s companion matrix, computed independently of the deflation; the five roots found agree with them within \(3.6 \times 10^{-15}\), and against roots computed with 60 digits the eigenvalues are off by up to \(3.5 \times 10^{-15}\) and the deflation roots by at most \(2.2 \times 10^{-16}\).
