Counting and Isolating Polynomial Roots

Counting Roots of Polynomials

Counting roots of polynomials.

(RefLink[CountRoots, paclet:ref/CountRoots]) accepts polynomials with Gaussian rational coefficients. The root count includes multiplicities.

This gives the number of real roots of ((x^2)-2) ((x^2)-3) ((x^2)-4):

CountRoots[((x^2)-2) ((x^2)-3) ((x^2)-4),x]

This counts the roots of ((x^2)-2) ((x^2)-3) ((x^2)-4) in the closed interval [1,2]:

CountRoots[((x^2)-2) ((x^2)-3) ((x^2)-4),{x,1,2}]

The roots of ((x^2)+1) (x^3) in the vertical axis segment between 0 and 2i consist of a triple root at 0 and a single root at i:

CountRoots[((x^2)+1) (x^3),{x,0,2 I}]

This counts 17(^th)-degree roots of unity in the closed unit square:

CountRoots[(x^17)-1,{x,0,1+I}]

The coefficients of the polynomial can be Gaussian rationals:

CountRoots[(x^3)-I x+((3 I)/4)-1,{x,0,1+I}]

Isolating Intervals

A set S⊆K, where K is ℝ or ℂ, is an isolating set for a root a of a polynomial f if a is the only root of f in S. Isolating roots of a polynomial means finding disjoint isolating sets for all the roots of the polynomial.

Functions for isolating roots of polynomials.

(RefLink[RootIntervals, paclet:ref/RootIntervals]) accepts polynomials with rational number coefficients.

For a real root r the returned isolating interval is a pair of rational numbers {a,b}, such that either a<r<b or a==b==r. For a nonreal root r the isolating rectangle returned is a pair of Gaussian rational numbers {a,b}, such that Re(a)<Re(r)<Re(b)∧Im(a)<Im(r)<Im(b) and either Im(a)≥0 or Im(b)≤0.

Here are isolating intervals for the real roots of f:

f=((x^2)-2) ((x^2)-3) ((x^2)-4); RootIntervals[f]

The second list shows which interval contains a root of which polynomial:

RootIntervals[{f+3,f+5,f+7}]

This gives isolating intervals for all complex roots of f+3:

RootIntervals[f+3,Complexes]

Here are isolating intervals for the third- and fourth-degree roots of unity. The second interval contains a root common to both polynomials:

RootIntervals[{(x^3)-1,(x^4)-1},Complexes]

Here is an isolating interval for a root of a polynomial of degree seven:

IsolatingInterval[Root[#^7-11#+3&,5]]

This gives an isolating interval of width at most (10^(-10)):

IsolatingInterval[Root[#^7-11#+3&,5],10^-10]

All numbers in the interval have the first 10 decimal digits in common:

N[%,10]