Find all polynomials $P(x)$ such that $P(x^2)=P(x)^2$ 
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.
 A: Hint
If $P \neq 0$, then $P$ has the form $$P(x) = a_n x^n + a_{n - 1} x^{n - 1} + \cdots + a_1 x + a_0 ,$$ where $a_n \neq 0$.
Comparing the leading terms of $P(x^2)$ and $P(x)^2$ gives that $a_n = 1$. If $P(x) \neq x^n$, then there is some largest index $m < n$ such that $a_m \neq 0$, and so $P$ has the form
$$P(x) = x^n + a_m x^m + O(x^{m - 1}) .$$
Now, substitute in both sides of the condition.

Doing so gives $$P(x^2) = x^{2n} + a_m x^{2m} + O(x^{2m - 1})$$ and $$P(x)^2 = x^{2n} + 2 a_m x^{m + n} + O(x^{m + n - 1}) .$$ The second-largest nonzero term in $P(x^2)$ has degree $2m < m + n$, so comparing the degree $m + n$ terms gives $a_m = 0$, a contradiction. Thus, $P(x)$ must be $0$ or $x^n$ for some $n$. On the other hand, checking directly shows that these polynomials satisfy the condition.

Incidentally, this argument works over any field of characteristic $\neq 2$ (in characteristic $2$, $P(x^2) = P(x)^2$ holds for all polynomials).
A: 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$.
A: 
Continuation from the OP's wrong idea: You probably meant to write $P(x)=\left(x^n-1\right)\,Q(x)$.  Anyway, show that $x^n+1$ divides $Q(x)$, so that $Q(x)=\left(x^n+1\right)\,R(x)$ for some $R(x)\in\mathbb{C}[x]$.  Then prove that $x^{2n}+1$ divides $R(x)$.  Continue this process and you can show that $x^{2^kn}+1$ divides $P(x)$ for all $k=0,1,2,\ldots$.  (Note: This is a false hint.  See the comments below.)

Hint:  Assume that $P(x)$ is nonconstant.  If $r$ is a root of $P(x)$, then it also follows that any $2^n$-th root of $r$ is a root of $P(x)$.  The only complex number $r$ that will allow $P(x)$ to have finitely many roots is $r=0$.  By the way, this hint also works if $\mathbb{C}$ is replaced by a field of characteristic not equal to $2$ as well (since $x^{2^n}-r$ has distinct roots in the algebraic closure of any such field).
More generally, let $k\in\mathbb{N}$ with $k>1$ and $P(x)\in K[x]$, where $K$ is an integral domain.  If $P\left(x^k\right)=\big(P(x)\big)^k$ and $k \neq p^j$, where $p:=\text{char}(K)$, for all $j=1,2,3,\ldots$, then $P(x)=0$ or $P(x)=x^n$ for some $n=0,1,2,\ldots$.
