TITLE: Find all polynomials $P(x)$ such that $P(x^2)=P(x)^2$
QUESTION [7 upvotes]: Find all polynomials $P:\mathbb{C}\rightarrow\mathbb{C}$ such that $$P(x^2)=P(x)^2 .$$

Here is what I tried:
First, it is easy to see the constant solutions, namely $P\equiv 0,P\equiv 1$.
Let $r$ be a root of $P$ (i.e. $P(r)=0$). It follows that all terms in the infinite sequence $r,r^2,r^4,\dots,r^{2n},\dots$ are roots of $P$. To avoid a polynomial with infinite roots, we have to have the sequence be periodic. So it turns out that either $r=0$, or the roots of $P$ are roots of unity of degree $2n$ for some $n\in\mathbb{N}$.
In the first case, we get $P(x)=xQ(x)$. Plugging in, we get $$x^2Q(x^2)=x^2Q(x)^2\implies Q(x^2)=Q(x)^2 ,$$ i.e. that $Q$ satisfies the same condition as $P$.
In the second case, we have $P(x)=(x^{2n}-1)Q(x)$. Plugging in, we get $(x^{2n}-1)Q(x^2)=(x^{2n}-2x^n+1)Q(x)^2$. I was not sure how to proceed from here.

REPLY [2 votes]: Well, $P(0)$ must be $0$ or $1$, and as you note, if $P(0)=0$ then $P(x)=xQ(x)$ and it follows that $Q(x^2)=Q(x)^2$ as well.
Great so far. We can repeat this until we get a $Q$ that does not have $Q(0)=0$. So there exists $j\ge0$ and $Q$ so that $P(x)=x^jQ(x)$ and $$Q(x^2)=Q(x)^2,\quad Q(0)=1.$$
But there are problems with your argument about roots of unity. The relevant sequence is $r^{2^n}$, not $r^{2n}$. Yes, that sequence has to be periodic, but that does not imply that $r^{2n}=1$, it implies that $r^{2^j-2^k}=1$. The biggest problem I see is that having shown that each root is a root of unity of some order you jump to the conclusion that all roots of unity of that order are roots of $P$; I don't see why that would follow.
So. We assume that $Q(x^2)=Q(x)^2$ and that $Q(0)=1$. 
If $Q\ne 1$ then $$Q(x)=1+a_kx^k+\dots,$$where $k>0$, $a_k\ne0$, and all the missing terms have order greater than $k$. Then $$Q(x^2)=1+a_kx^{2k}+\dots,$$while $$Q(x)^2=1+2a_kx^k+\dots.$$That's impossible unless $a_k=0$ and $k=0$, contradiction.
So $Q=1$; the only such polynomials are $P(x)=x^j$.