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.

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.
