The Sturm theorem counts the real roots of a polynomial using sign changes in its Sturm
chain. Let
be a nonconstant polynomial with real coefficients and only simple
roots, and let
be the number of sign changes in its Sturm
chain evaluated at
,
ignoring zero entries. For
with
, the number of real roots
in the open interval
is
.
Taking the endpoints to
and
counts all real
roots. The signs at these limits are determined by the
leading coefficient and polynomial
degree of each member of the Sturm chain. Consequently,
is a real-rooted
polynomial iff
, where
is its polynomial degree.
For polynomials with repeated roots,
squarefree factorization first reduces
the test to factors with only simple roots.