Purely imaginary equation $p(x)=0$ with real coefficient

If it has purely imaginary roots, that basically means that $$p(x)=ax^2+b\,,$$ where $a,b$ are nonzero real numbers of the same sign. It follows that $$p(p(x))=a(ax^2+b)^2+b\,.$$ The solution to this is $$ax^2+b=\pm\sqrt{\frac{b}{a}}i\,,$$ which clearly shows that $x$ can neither be real nor purely imaginary because in that case the left-hand side would be a real number whereas the right-hand side is purely imaginary.


As it has real coefficients. We can WLOG assume the roots are $li,-li$ where $l$ is some real $l\neq 0$.Thus $$p(x)=a(x-li)(x+li)=a(x^2+l^2)$$ Here $a$ is some real $a\neq 0$

Now $$p(p(x))=0 \Rightarrow p(x)=li,-li$$

It is easy to see $$a(x^2+l^2)=li,a(x^2+l^2)=-li$$ has neither real nor purely imaginary roots


Let $r$ be a purely imaginary root of $p(x)$, then the other root is $\bar r=-r$ so we can write $p(x)=(x-r)(x-(-r))=x^2-r^2$.

Let $T=p(x)$, then we want to find roots of $p(p(x))=p(T)=0$. We know the roots to be $T=r,-r$. Thus, $x^2-r^2=\pm r\implies x^2=r^2\pm r$. Since $r^2\in\Bbb R-\{0\}$ and $r$ is purely imaginary non-zero complex number, $r^2\pm r$ is not real. So $x$ can't be purely imaginary or real.