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.