TITLE: Kronecker polynomial or not?
QUESTION [10 upvotes]: Given a polynomial $f$ of degree $d$ with integer coefficients, I am interested in an effective algorithm to determine whether or not $f$ has all its roots on the unit circle.
(So the output should be a YES or NO, no further information required.)
In this context the maximum integer $m$ such that $\phi(m)$ (Euler totient) does
not exceed $d$ is of some importance. One could take greatest common divisors of $f$ and the consecutive cyclotomic polynomials $\Phi_d(x)$ up to $\Phi_m(x)$.

REPLY [2 votes]: As explained in the answers, applying a Möbius transform and then using Sturm's theorem on the number of real roots gives an algorithm which solves the problem.
A natural question is what is an efficient implementation of this algorithm. There are some improvements on implementing the above method literally. For example, if $P$ is of degree $d$ and $P(0)\neq 0$, then every root $x$ of $P$ on the unit circle is also a root of $P^*(x) = x^d P(1/x)$ (this is because $\overline{x} = 1/x$). So the condition of $P$ having all the roots on the unit circle implies that $P$ is reciprocal or anti-reciprocal, that is, $P^* = \pm P$. It may be good to check that first.
Furthermore, there are several variants of the above method where one applies Sturm's theorem to other polynomials. One reference is Cerlienco, Mignotte, Piras, Computing the Measure of a Polynomial, J. Symbolic Computation (1987) 4, 21-33 (the article is old and I would be grateful if someone knows more recent references). The last section of this article also investigates the cost of these algorithms.