# 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 Counting roots of polynomials.

CountRoots accepts polynomials with Gaussian rational coefficients. The root count includes multiplicities.

This gives the number of real roots of :
 In:= Out= This counts the roots of in the closed interval :
 In:= Out= The roots of in the vertical axis segment between and consist of a triple root at and a single root at :
 In:= Out= This counts 17-degree roots of unity in the closed unit square:
 In:= Out= The coefficients of the polynomial can be Gaussian rationals:
 In:= Out= ## Isolating Intervals

A set , where is or , is an isolating set for a root of a polynomial if is the only root of in . 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 the returned isolating interval is a pair of rational numbers , such that either or . For a nonreal root the isolating rectangle returned is a pair of Gaussian rational numbers , such that and either or .

Here are isolating intervals for the real roots of :
 In:= Out= The second list shows which interval contains a root of which polynomial:
 In:= Out= This gives isolating intervals for all complex roots of :
 In:= Out= Here are isolating intervals for the third- and fourth-degree roots of unity. The second interval contains a root common to both polynomials:
 In:= Out= Here is an isolating interval for a root of a polynomial of degree seven:
 In:= Out= This gives an isolating interval of width at most :
 In:= Out= All numbers in the interval have the first 10 decimal digits in common:
 In:= Out= 