Polynomials $P(x)$ satisfying $P(2x-x^2) = (P(x))^2$ 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.
 A: 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$.
A: Here’s an answer that has the same content as @Did‘s, but organized differently:
Let $f(x)=2x-x^2$ and also let $u(x)=1-x$, thought of as a transformation of the (real) line. Let $g=u^{-1}\circ f\circ u$, which you compute to be $g(x)=x^2$. Now let $Q=P\circ u$, so that $P=Q\circ u^{-1}$ and the requirement $P^2=P\circ f$ gets translated to $(Q\circ u^{-1})^2=Q\circ u^{-1}\circ u\circ g\circ u^{-1}=Q\circ g\circ u^{-1}$. This is requiring $g\circ Q\circ u^{-1}=Q\circ g\circ u^{-1}$, in other words $g\circ Q=Q\circ g$. We’re asking which polynomials commute with $x^2$ in the sense of substitution. But the only such polynomials are the pure monomials $Q=x^n$ (and the constant zero, of course). Resubstitute and get @Did’s result.
