When does a polynomial have only nonnegative real roots Is there a general criterion to determine whether a polynomial with rational coefficients has the property that all of its roots are real and nonnegative?
 A: The number of negative real roots of $p(x)$ is $m-2k$ for some $k=0,1,2,...$, where $m$ is the number of sign changes in the coefficients of the polynomial $q(x)=p(-x)$. So if this $q(x)$ has no sign changes in its coefficients then $p(x)$ can only have nonnegative real roots. 
Example: $p(x)=x^9-3x^4+7x-1$ gives $q(x)=-x^9-3x^4-7x-1$ with all coefficients negative, so that there are $m=0$ sign changes, causing $p(x)$ to have only nonnegative real roots. Here $p(x)$ itself has three sign changes, so it has 1 or 3 positive real roots.
This is called Descarte's rule of signs. Of course it might not determine anything at all about negative roots if there are sign changes in $q(x),$ since if $q(x)$ has an even number of sign changes then the number of negative roots $m-2k$ can be zero when $m$ is even.
A: The full answer is a little complicated to type out. I suggest looking at Sturm's Theorem. The Sturm sequence of a polynomial $P(x)$ can be used  to determine the number of zeros of $P(x)$ in a given interval. It is a crucial element in Tarski's decision procedure for the truth in the reals of sentences of the elementary theory of fields. 
