A138 of 55
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

A13 · Lesson 8 · Roots of polynomials

Horner's rule, deflation, companion matrices and how sensitive roots are

Polynomials are everywhere in engineering: characteristic equations, filter denominators, the transfer functions of every linear circuit. Finding their roots looks like a special case of lessons 4 to 7, and the methods do carry over, with some twists. A polynomial can be evaluated together with its derivative in one cheap pass. Once a root is found it can be divided out. All the roots can be found at once as the eigenvalues of a matrix. And the roots of a polynomial written out in expanded form can be wildly sensitive to its coefficients, which is why filters are built from small sections instead of one big polynomial.

  • The crosses are the roots of (s+1)(s+2)⋯(s+8)+εs7: the polynomial with roots at −1 to −8, with ε added to its s7 coefficient, which is 36.
  • Raise ε a little. At ε = 0.0005, a change of 0.0014% in that coefficient, the roots at −6 and −7 have already met and split into a complex pair, and the root at −8 has moved to −8.16.
  • The roots near −1 hardly move: their sensitivity grows with the size of the root raised to the power of the perturbed term.

Predict

A polynomial's coefficients are rounded to 16 significant digits. Its roots are then computed exactly. How many digits of the roots are correct?

Name it

Horner's rule

Evaluate p(x)=anxn+⋯+a0 as (⋯((anx+an−1)x+an−2)x+⋯)x+a0: n multiplications and n additions. Running a second Horner pass on the intermediate values gives p′(x) in another 2n operations, so a Newton step costs about 4n.

Deflation

The intermediate Horner values bk are the coefficients of the quotient: p(x)=(x−r)q(x)+p(r). When r is a root, q has the remaining roots, so you can find them one by one. Rounding errors build up as you go, so deflate out small roots first and then polish each root with a Newton step on the original p.

All roots at once

  • Companion matrix. The roots of xn+cn−1xn−1+⋯+c0 are the eigenvalues of the matrix with first row (−cn−1,…,−c0) and ones just below the diagonal. np.roots works this way, with the QR algorithm.
  • Durand–Kerner and Aberth iterate all n approximations together: xi←xi−p(xi)∏j≠i(xi−xj) is Durand–Kerner. Aberth's refinement converges cubically and is what the platform's own s-plane view uses.

Sensitivity

If coefficient ak changes by δ, a simple root r moves by about

δr≈−δrkp′(r).

Large roots, high powers and small p′(r) (roots close together) all make it big. A root of multiplicity m moves by about δ1/m, far more than δ.

Worked example

Evaluate p(x)=2x3−6x2+2x−1 and p′(x) at x = 3 with Horner's rule.

Show the solution
  1. First pass, for p(3). b3=2b2=2⋅3−6=0b1=0⋅3+2=2b0=2⋅3−1=5 so p(3)=5.
  2. Second pass on b3,b2,b1, for p′(3). c2=2c1=2⋅3+0=6c0=6⋅3+2=20 so p′(3)=20.
  3. Check. p′(x)=6x2−12x+2p′(3)=54−36+2=20
  4. A Newton step from 3. x1=3−520=2.75

Answer p(3)=5 and p′(3)=20, so a Newton step from 3 goes to 2.75.

Worked example

x=1 is a root of x3−6x2+11x−6. Deflate it and find the other roots.

Show the solution
  1. Horner at 1. b2=1b1=1−6=−5b0=−5+11=6 and the remainder is 6−6=0.
  2. The quotient. It is x2−5x+6 whose roots are 2 and 3.
  3. With computed roots. Roots that carry small errors leave those errors in the quotient. Polishing each root found from a quotient with one or two Newton steps on the original cubic removes that accumulated error.

Answer the quotient is x2−5x+6, so the other roots are 2 and 3.

Worked example

The polynomial (s+1)(s+2)⋯(s+8) has 36 as its s7 coefficient. How far does the root at −8 move if that coefficient becomes 36.0005?

Show the solution
  1. The derivative at the root. p′(−8)=(−7)(−6)⋯(−1)=−5040
  2. The first-order estimate. With (−8)7=−2097152: δr≈−0.0005×(−2097152)−5040=−0.21
  3. The actual roots. Computing the roots directly gives −8.16, and the roots at −6 and −7 have collided and left the real axis as −6.50±0.45j.
  4. How sensitive that is. A relative change of 1.4×10−5 in one coefficient moved the root at −8 by 2% and the roots at −6 and −7 by about 10%.
  5. What filter designers do. That's why an eighth-order filter is built as four second-order sections, each with well-conditioned roots, instead of from its expanded polynomial.

Answer the first-order estimate moves the root by −0.21; it actually moves to −8.16, and the roots at −6 and −7 become −6.50±0.45j.

Check

Evaluate p(x)=1x3+−3x2+−5x+7 at x = 2 with Horner's rule.

Check

What is p′(x) for p=1x3+−3x2+−5x+d at x = −1.5, from the second Horner pass?

Check

The constant term of (x−1)(x−2)(x−3) changes by 0.001. About how far does the root at 2 move?

Check

The monic cubic with roots −1, −3 and −2 has a companion matrix. What is that matrix's trace?

Check

(x−1)3 has its constant term changed by 0.0001. About how far do its roots move from 1?

Check

Newton's method approaches a root of multiplicity 5.

(a)

By what factor does each step shrink the error?

(b)

What multiple of the step f/f′ restores quadratic convergence?

Check

Why are high-order digital and analog filters built as cascades of second-order sections?

Check

Newton's method on p(x)=x3+ax2+bx+c.

Step 1

What is p(x), in Horner's nested form?

Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.

Check

Find all three roots of x3−6x2+11x−6 at once with the Durand–Kerner iteration zi←zi−p(zi)∏j≠i(zi−zj), starting from zk=(0.4+0.9j)k, k = 0, 1, 2, for 100 sweeps (update all three from the old values each sweep). Set roots to their sorted real parts.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Explain why

Why does a root of multiplicity m move by about δ1/m when a coefficient changes by δ?

Practice

Keep practicing

9 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.