Let $f\in\ \mathbb{R}[x]$ be a polynomial with the property that $f(x^2+3x+1)=f^2(x)+3f(x)+1$ and $f(0)=0$. Show that $f=x$.
I tried for $x=-1 => f(-1)=-1$ and for $x=1=>f(1)=1$, but I do not have any idea how to prove for the general case. I think about induction but I'm not really sure about it. Can you help me out?
If you can please try to tell me a way without using sequences.
You got $f(1)=1$ by putting $x=0$ in the equation.
Putting $x=1$ you get $f(4)=4$. Putting $x=4$ you get $f(29)=29$
Define $x_{n+1}=x_n^2+3x_n+1$ and $x_1=1$. Then $x_n$ is strictly increasing and $f(x_n)=x_n$.
If $f$ has degree $m$, then $f(x)-x=0$ at the $m+1$ distinct points $x_1,x_2,...,x_{m+1}$.
Therefore, $f(x)-x=0$.