I am looking (to answer a question here) for all polynomials $P(x)$ satisfying the functional equation given in the title.
It is not hard to notice (given that one instinctively wants to complete the square in $P(2x - x^2)$ ) that $P(x) = 1-x$ is a solution; and the product relation
$$P(2x-x^2) = P(x)^2, Q(2x-x^2) = Q(x)^2 \implies (P\cdot Q)(2x-x^2) = (P\cdot Q)(x)^2 $$
shows that $(1-x)^n$ are all solutions as well.
Apart from the constant solutions $0$ and $1$, is it true that $(1-x)^n$ are all solutions? Could somebody give me a hint as to how to prove this (or a counterexample)?
Edit: I haven't had luck finding a formula for the $n$th derivatives of $P(x)$ at one in the case $P(1) = 1$, though the first two are zero.
The polynomial $Q(x)=P(1-x)$ solves $Q(x)^2=Q(x^2)$. Every $Q(x)=x^n$ is solution, as well as $Q(x)=0$. For every positive integer $k$, let us denote by $o(k)$ every polynomial of degree at most $k-1$.
If $Q(x)=ax^n+o(n)$ with $a\ne0$ then $Q(x)^2=a^2x^{2n}+o(2n)$ while $Q(x^2)=ax^{2n}+o(2n)$ hence $a=1$.
If $Q(x)=x^n+ax^m+o(m)$ with $m\lt n$ then $Q(x)^2=x^{2n}+2ax^{n+m}+o(n+m)$ while $Q(x^2)=x^{2n}+ax^{2m}+o(2m)$ hence $a=0$.
Finally the solutions are the polynomials $P(x)=0$, $P(x)=1$ and $P(x)=(1-x)^n$ with $n\geqslant1$.