$f(x^2)=(f(x))^2=f(f(x))$, $\forall x\in\mathbb R$. Prove that, there are infinitely many polynomial $f$ of degree $\geq1$, such that 
$f(x^2)=(f(x))^2=f(f(x)), \forall x\in\mathbb R$.                                                                                can only find three of them namely, $f(x)=0,1,x^2$.                     
Please help.
 A: Clearly the degree of the polynomial must be $2$, and the leading coefficient must be $1$.
Let the polynomial be $x^2+bx+c$
we need:
$x^4+bx^2+c=(x^2+bx+c)^2=((x^2+bx+c)^2+b(x^2+bx+c)+c$.
Lets separate into the five coefficients to get this system:
$1=1^2=1^3$ (coefficients of $x^4$)
$0=2b=2b$ (coefficients of $x^3$)
$b=b^2+2c=b^2+2c+b$ (coefficients of $x^2$) ( so $b=0$)
$0=0=0$ (coefficients of $x^2$)
$c=c^2=c^2+bc+c=c^2+c$ ( so $c=0$).
Hence the only polynomial of positive degree is $x^2$
A: We have looking at the degree : $$2\deg f = (\deg f)^2$$ so since $\deg f \ge 1$, $\deg f = 2$. Write $f = a(X-\lambda)(X-\mu)$.
Since the polynomials coincide on $\Bbb R$, they are equal on $\Bbb C$.
Therefore $f(x)^2 = f(x^2)$ leads to ;
$$a(X^2-\lambda)(X^2-\mu) = a^2(X-\lambda)^2(X-\mu)^2$$
We have $a\ne 0$ so $a=1$.
If $\lambda =0$ then $(X-\mu)^2 = (X^2-\mu)$ which means $\mu$ is its own and only square root, ie $\mu =0$ and $f = X^2$
Otherwise, if $\delta^2 = \lambda$ and $\epsilon^2 = \mu$, we have $\{\delta, -\delta, \epsilon, -\epsilon\} = \{\delta^2, \epsilon^2\}$ which leads to $\delta = \pm \epsilon$.
Then $f = X^2-\lambda$ or $f = (X-\delta)^2$.
The latter case leads, simillirally to above, to $\delta = 0$ so $f = X^2$. The former leads to $X^4 - \lambda = X^4-2X^2\lambda+\lambda^2$, that is also $f = X^2$.
Thus the only solution to that equation is $f = X^2$.
A: It can't be done.
Let $P(X)=\sum a_kX^k$ be the polynomial.
if the polynom has only one term (i.e. $aX^n$), the equation becomes :
$aX^{2n}=a^2X^{2n}=a^2X^{n^2}$
which only holds if $a\in \{0,1\}$ and $n\in \{0,2\}$
if the polynom has several terms, let N and M be its two highest degree terms :
$P(X)=aX^N+bX^M$ + other lower level terms. Note that $a$ and $b$ are not zero.
the first equation gives us $a=1$ because the coefficients before $X^{2n}$ must be the same which gives $a^2=a$
there will be in the expression of $P(X)^2$ a term of degree $N+M$ : $2abX^{N+M}$
There is no such term in the expression of $P(X^2)$, thus $2ab=0$ which contradicts the premisse.
The only solutions are thus given by the "only one term" polynoms, i.e. $0,1,X^2$. Only $X^2$ matches your condition of being of degree $>0$
