Algorithm Search⌘K

Proofs: Bairstow's method

These are the human proofs of Bairstow's method, at full length.

Correctness of Bairstow's method full

This proof shows: correctness, termination, convergence-rate.

Let p(x)=∑k=0nakxn−kp(x) = \sum_{k=0}^n a_kx^{n-k} be real with a0≠0a_0 \ne 0 and n≥3n \ge 3. For real (u,v)(u, v) let D(x)=x2−ux−vD(x) = x^2 - ux - v and let bkb_k, ckc_k be the sequences of lines L2 and L4, with b−1=b−2=c−1=c−2=0b_{-1} = b_{-2} = c_{-1} = c_{-2} = 0. Write F(u,v)=(bn−1,bn)F(u, v) = (b_{n-1}, b_n). Statements are in exact arithmetic unless said otherwise.

Lemma 1 (division identity)

p(x)=D(x) q(x)+bn−1(x−u)+bnp(x) = D(x)\,q(x) + b_{n-1}(x - u) + b_n with q(x)=∑k=0n−2bkxn−2−kq(x) = \sum_{k=0}^{n-2} b_kx^{n-2-k}.

Proof. Compare coefficients. For 0≤k≤n−20 \le k \le n - 2 the coefficient of xn−kx^{n-k} on the right is bk−ubk−1−vbk−2b_k - ub_{k-1} - vb_{k-2}, which is aka_k by the recurrence. The coefficient of xx is −ubn−2−vbn−3+bn−1=an−1-ub_{n-2} - vb_{n-3} + b_{n-1} = a_{n-1}, and the constant term is −vbn−2−ubn−1+bn=an-vb_{n-2} - ub_{n-1} + b_n = a_n. □\square

So DD divides pp if and only if the remainder bn−1(x−u)+bnb_{n-1}(x - u) + b_n is the zero polynomial, that is, F(u,v)=0F(u, v) = 0. Then qq is the quotient, which line L12 keeps.

Lemma 2 (the Jacobian)

∂bk/∂u=ck−1\partial b_k/\partial u = c_{k-1} and ∂bk/∂v=ck−2\partial b_k/\partial v = c_{k-2} for all kk, so the Newton system for FF is the one solved at L5 and L6.

Proof. Differentiate bk=ak+ubk−1+vbk−2b_k = a_k + ub_{k-1} + vb_{k-2}. With dk=∂bk/∂ud_k = \partial b_k/\partial u we get dk=bk−1+udk−1+vdk−2d_k = b_{k-1} + ud_{k-1} + vd_{k-2} with d0=d−1=0d_0 = d_{-1} = 0. The sequence ck−1c_{k-1} satisfies the same recurrence, ck−1=bk−1+uck−2+vck−3c_{k-1} = b_{k-1} + uc_{k-2} + vc_{k-3}, with the same initial values, so dk=ck−1d_k = c_{k-1}. In the same way ∂bk/∂v=bk−2+u ∂bk−1/∂v+v ∂bk−2/∂v\partial b_k/\partial v = b_{k-2} + u\,\partial b_{k-1}/\partial v + v\,\partial b_{k-2}/\partial v, which is the recurrence of ck−2c_{k-2}. □\square

The Jacobian matrix is (cn−2cn−3cn−1cn−2)\begin{pmatrix} c_{n-2} & c_{n-3} \\ c_{n-1} & c_{n-2}\end{pmatrix} with determinant J=cn−22−cn−1cn−3J = c_{n-2}^2 - c_{n-1}c_{n-3}, and Cramer's rule gives the formulas of L6.

Lemma 3 (when the Jacobian is nonsingular)

Let D∗=x2−u∗x−v∗D^* = x^2 - u^*x - v^* divide pp, with p=D∗q∗p = D^*q^*. Then the Jacobian of FF at (u∗,v∗)(u^*, v^*) is nonsingular if and only if gcd⁡(D∗,q∗)=1\gcd(D^*, q^*) = 1.

Proof. For a direction (δu,δv)(\delta u, \delta v) let δD=−(δu x+δv)\delta D = -(\delta u\,x + \delta v), the change of DD to first order. Differentiate the identity of Lemma 1 along the direction at (u∗,v∗)(u^*, v^*), where p=D∗q∗p = D^*q^* and the remainder ρ=bn−1(x−u)+bn\rho = b_{n-1}(x - u) + b_n vanishes: 0=δD q∗+D∗ δq+δρ0 = \delta D\,q^* + D^*\,\delta q + \delta\rho, where δq\delta q and δρ\delta\rho are the first order changes of the quotient and of the remainder, and deg⁡δρ≤1\deg \delta\rho \le 1. So δρ\delta\rho is the remainder of −δD q∗-\delta D\,q^* modulo D∗D^*. The Jacobian is singular iff some nonzero δD\delta D of degree at most 1 gives δρ=0\delta\rho = 0, that is, D∗D^* divides δD q∗\delta D\,q^*. If gcd⁡(D∗,q∗)=1\gcd(D^*, q^*) = 1 this forces D∗∣δDD^* \mid \delta D, impossible for a nonzero polynomial of degree at most 1. If gcd⁡(D∗,q∗)=g\gcd(D^*, q^*) = g has degree 1 or 2, take δD=D∗/g\delta D = D^*/g when deg⁡g=1\deg g = 1, or any nonzero constant when deg⁡g=2\deg g = 2; then D∗∣δD q∗D^* \mid \delta D\,q^*. The map (δu,δv)↦δρ(\delta u, \delta v) \mapsto \delta\rho is the Jacobian (written in the basis x−u∗x - u^*, 11 of the remainders), so this proves the claim. □\square

The condition fails exactly when a root of D∗D^* is also a root of q∗q^*, that is, when a root of D∗D^* has multiplicity in pp larger than its multiplicity in D∗D^*. A factor D∗=(x−r)2D^* = (x - r)^2 with rr of multiplicity exactly 2 satisfies it.

Theorem 1 (local quadratic convergence)

If D∗∣pD^* \mid p and gcd⁡(D∗,q∗)=1\gcd(D^*, q^*) = 1, there is ρ>0\rho > 0 such that from every (u0,v0)(u_0, v_0) within distance ρ\rho of (u∗,v∗)(u^*, v^*) the steps of FACTOR are defined, converge to (u∗,v∗)(u^*, v^*), and satisfy ek+1≤Cek2e_{k+1} \le Ce_k^2 for some constant CC.

Proof. By Lemmas 1 and 2, L5 to L7 are exactly Newton's method on F:R2→R2F : \mathbb{R}^2 \to \mathbb{R}^2. The map FF is polynomial in (u,v)(u, v), so its Jacobian is Lipschitz on bounded sets, and by Lemma 3 it is nonsingular at the zero (u∗,v∗)(u^*, v^*). The standard local convergence theorem for Newton's method in Rn\mathbb{R}^n (for example Dennis and Schnabel, Theorem 5.2.1, or the statement on the page Newton's method for systems) then gives a ball of quadratic convergence. If some step lands exactly on the factor, L3 returns "exact". □\square

All norms on R2\mathbb{R}^2 are equivalent, so the measure ek=∣uk−u∗∣+∣vk−v∗∣e_k = |u_k - u^*| + |v_k - v^*| only changes CC.

Theorem 2 (termination and output)

FACTOR stops after at most KK steps and K+1K + 1 divisions. ROOTS stops after at most (R+1)(R + 1) FACTOR runs per factor and ⌊(n−1)/2⌋\lfloor (n - 1)/2 \rfloor factors, so after at most (R+1)K(n−1)/2(R + 1)K(n - 1)/2 steps, with output either "failed" or nn roots.

Proof. Each pass of the loop L1 returns or increases kk, so the loop ends by L9. In ROOTS each successful factor replaces aa by the quotient of degree n−2n - 2 (Lemma 1), so the degree falls by 2 each pass of L10 and the loop ends once the degree is at most 2; each factor search is retried at most RR times before ROOTS returns "failed". Each factor adds two roots at L11 and L13 adds the rest, so a successful run returns deg⁡p\deg p roots. In exact arithmetic, when a factor search ends "exact", the two roots of L11 are roots of pp and the quotient carries the rest, so by induction the output is the multiset of roots of pp. □\square

What is not proved

There is no global convergence theorem: from a given start the iteration may cycle, diverge or hit J=0J = 0, and the restarts are a heuristic with a cap, not a guarantee. When FACTOR stops on the step test or the rounding floor, the factor is accepted only approximately, and the quotient carries a perturbation into the later factors; the size of the resulting errors is observed in the tests, not proved. The rounding floor γμk\gamma\mu_k follows the pattern of the running error bound for Horner's rule but is used here as a stopping heuristic.

Back to Bairstow's method