This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Counting and Isolating Polynomial Roots

Counting Roots of Polynomials

CountRoots[poly,x]give the number of real roots of the polynomial poly in x
CountRoots[poly,{x,a,b}]give the number of roots of the polynomial poly in x with Re (a)≤Re (r)≤Re (b)Im (a)≤Im (r)≤Im (b)

Counting roots of polynomials.

CountRoots accepts polynomials with Gaussian rational coefficients. The root count includes multiplicities.
This gives the number of real roots of (x2-2) (x2-3) (x2-4).
In[1]:=
Click for copyable input
Out[1]=
This counts the roots of (x2-2) (x2-3) (x2-4) in the closed interval [1, 2].
In[2]:=
Click for copyable input
Out[2]=
The roots of (x2+1) x3 in the vertical axis segment between 0 and 2 consist of a triple root at 0 and a single root at .
In[3]:=
Click for copyable input
Out[3]=
This counts 17th-degree roots of unity in the closed unit square.
In[4]:=
Click for copyable input
Out[4]=
The coefficients of the polynomial can be Gaussian rationals.
In[5]:=
Click for copyable input
Out[5]=

Isolating Intervals

A set SK, 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.
RootIntervals[{poly1,poly2,...}]give a list of disjoint isolating intervals for the real roots of any of the polyi, together with a list of which polynomials actually have each successive root
RootIntervals[poly]give disjoint isolating intervals for real roots of a single polynomial
RootIntervals[polys,Complexes]give disjoint isolating intervals or rectangles for complex roots of polys
IsolatingInterval[a]give an isolating interval for the algebraic number a
IsolatingInterval[a,dx]give an isolating interval of width at most dx

Functions for isolating roots of polynomials.

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 abr. 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.
In[6]:=
Click for copyable input
Out[6]=
The second list shows which interval contains a root of which polynomial.
In[7]:=
Click for copyable input
Out[7]=
This gives isolating intervals for all complex roots of f+3.
In[8]:=
Click for copyable input
Out[8]=
Here are isolating intervals for the third- and fourth-degree roots of unity. The second interval contains a root common to both polynomials.
In[9]:=
Click for copyable input
Out[9]=
Here is an isolating interval for a root of a polynomial of degree seven.
In[10]:=
Click for copyable input
Out[10]=
This gives an isolating interval of width at most 10-10.
In[11]:=
Click for copyable input
Out[11]=
All numbers in the interval have the first ten decimal digits in common.
In[12]:=
Click for copyable input
Out[12]=