# Algorithm to determine sign of a polynomial

I've been working with a collaborator (Arek Goetz) on a dynamics problem involving piecewise isometries (a map $T$ on a domain $X$ (say a subset of the plane) such that $X$ is divided into a finite number of polygonal regions and a separate isometry is applied to each).

In the case where the defining isometries are all rotations through rational angles, it is often possible to use exact computer arithmetic to define points, lines, regions etc. in terms of integer linear combinations of roots of unity.

The following algorithmic question then arises:

Let $(a_i)_{i=1}^n$ be a finite sequence of integers and $(p_i/K)_{i=1}^n$ be a sequence of rationals. Is there a non-analytic algorithm to decide the sign of $\sum a_i\sin(2\pi p_i/K)$?

More generally, given a real algebraic number $\zeta$, is there any nice way to decide the sign of an integer polynomial in $\zeta$ (I can do the quadratic case!)

-
What is an analytic algorithm? –  Qiaochu Yuan Jul 8 '11 at 18:18
I'm guessing that Anthony means "closed-form" or "exact" non-iterative method when he says analytic algorithm –  Suvrit Jul 8 '11 at 18:53
Sorry. What I had in mind here is that one possibility is to use something like an $n$th order Taylor series to estimate the sum. This will also give you an error bound which decreases to 0 in $n$. Since you can be sure that the sum is not 0 (this is finitely checkable since everything is algebraic) you are on one side of zero or the other. The intervals that you obtain from Taylor's theorem will therefore be eventually in the positive reals or eventually in the negative reals –  Anthony Quas Jul 8 '11 at 19:39
Your question suggests that the p_i are integers. Are they? If so, what about using addition formulae to reduce or eliminate some of the summands? Gerhard "Email Me About System Design" Paseman, 2011.07.08 –  Gerhard Paseman Jul 9 '11 at 1:48