# Easy way to find roots of the form $qi$ of a polynomial

Let $p$ be a polynomial over $\mathbb{Z}$, we know that there is an easy way to check if $p$ have rational roots (using the rational root theorem).

Is there an easy way to check if $p$ have any roots of the form $qi$ where $q\in\mathbb{Q}$ (or at least $q\in\mathbb{Z}$) ? ($i\in\mathbb{C}$) ?

-
Replace $x$ with $qi$ and solve the polynomial for $q$. You can use rational roots for that only if the $i$'s vanish, I believe. – Emily Aug 9 '12 at 14:45

You can actually do better than the normal Rational Root Theorem. Note that $p$ has integer (and thus real) coefficients. So if $ci/d$ is a root of $p$, then so is $-ci/d$. So $p$ must have $d^2x^2+c^2$ as a factor. Then you can conclude from the Gauss's lemma proof of the Rational Root Theorem that $d^2$ — not just $d$ — is a factor of the leading coefficient of $p$, and similarly $c^2$ is a factor of the trailing coefficient of $p$.

Combining this with Bill's/Karolis's answer will probably mean you have very few candidates to check even for moderately complicated polynomials.

-

Hint $\ f(q\,i) = a_0\! -\! a_2 q^2\! +\! a_4 q^4\! +\cdots + i\,q\,(a_1\! -\! a_3 q^2\! +\! a_5 q^4\! +\! \cdots) = g(q) + i\,q\,h(q)$

-

Given a polynomial $P$, $P(ix) = R(x) + iI(x)$ where $R$ and $I$ are both polynomials over $\mathbb{Z}$. $P(ix) = 0$ iff $R(x) = 0$ and $I(x) = 0$. $R$ and $I$ are easy to find. The rest is the same rational root theorem.

-
It might be worth mentioning that computing the gcd of $R$ and $I$ stands a good chance of reducing the degree of the problem down to something very small, possibly 0. – Erick Wong Aug 9 '12 at 16:29

Hint: Let the lead coefficient be $a_n\ne 0$ and let the constant term be $a_0\ne 0$. Then the usual Rational Roots Theorem tells you that the list of candidates is limited to numbers of the form $c/d$ where $c$ divides $a_0$ and $d\ge 1$ divides $a_n$. To use it, one then, at least in principle, tests every candidate.

In your situation, the result is exactly the same. The list of candidates is limited to numbers of the form $ci/d$, with the same conditions on $c$ and $d$.

Remark: Breaking up into real and complex parts is very often a more efficient way of ruling out candidates. The point of the above answer is that the procedure provided by the Rational Roots Theorem can be word for word extended to our new situation. The proof is essentially the same as the usual proof of the Rational Roots Theorem.

-
Are you sure ? from Bill's answer it seems that the free coefficient of the imaginary part is $a_1$... – Belgi Aug 9 '12 at 15:15
The decomposition into real and imaginary parts breaks up the equation into two equations that need to be satisfied. So it often gives a more efficient way of ruling out candidates. I wanted to stress something else, the fact that the result for $qi$ can be considered to be the same as it is for $q$. – André Nicolas Aug 9 '12 at 15:23
Can you say why this is true ? the decomposition into real and imaginary part allows to do a reduction to the case we know, should I follow the same proof for the rational root theorem for this variation ? – Belgi Aug 9 '12 at 15:27
Just use the usual proof of the Rational Root Theorem. Substitute $ci/d$, where $\gcd(c,d)=1$. Multiply by $d^n$ to clear denominators. Now $c$ divides the sum of the terms up to the last (in the Gaussian integers), $c$ must divide $d^na_0$ (in the Gaussian integers). But $d^n$ and $a_0$ are relatively prime (in the Gaussians), so $c$ divides $a_0$. Same sort of argument for $d$ and $a_n$. – André Nicolas Aug 9 '12 at 15:37