An interesting question of a polynomial in $\mathbb{R}[x]$ I want to prove the following statement (maybe it's not correct): Let $f(x)\in\mathbb{R}[x]$ be such that $f(x)f(x+1)=f(x^2+x+1)$, then $f(x)=0$, $1$, or $(x^2+1)^n$ for some $n\in\mathbb{N}$.
My strategy is the following: Let's assume that $f(x)$ is not a constant polynomial. First, it's not hard to prove that $f(x)=f(-x)$, $f(0)=1$, and $f(x)>0$ for all $x\in\mathbb{R}$. Assume that $f(i)\neq0$, I need to get a contradiction. But I do not know how to get it.
 A: Let $f \neq 0$.
As you have already checked, we clearly have $f(0)=1$ and $f$ is monic. Furthermore $f$ has no real root.
Let $a \in \mathbb C$ be a complex root of $f$. Then $a^2+a+1$ is also a root of $f$. Let $p(x)=x^2+x+1$ and let $p^n(x)=p(p(p( \dotsc p(x))))$ be the $n$-fold composition of $p$ with itself.
Since $f$ has only finitely many roots, the iterated mapping $a \mapsto p(a) \mapsto p(p(a)) \mapsto \dotsc$ is periodic, i.e. $a=p^n(a)$ for some $n \geq 1$.
Hence all roots of $f$ are roots of $p^n(x)-x \in \mathbb Z[x]$ (a monic polynomial) for some $n$, hence they are algebraic integers, i.e. their absolute values are integers $\geq 1$.
Now let $a_1, \overline{a_1}, \dotsc, a_s,\overline{a_s}$ be all other roots of $f$ other than $\pm i$. In $\mathbb C[x]$ we obtain
$$f = (x^2+1)^n \prod_{i=1}^s (x-a_i)(x-\overline{a_i})$$
and $1=f(0)=\prod\limits_{i=1}^s |a_i|^2$. From $|a_i| \geq 1$ for all $i$ we get of course $|a_i|=1$ for all $i$.
So we have shown: Any root $a$ of $f$ is a complex number, which lies on the unit circle and since $a^2+a+1$ is again a root of $f$, this lies also on the unit circle.
Using $a\overline a=1$, one computes
$$1=(a^2+a+1)(\overline a^2 + \overline a +1) = 3+2(a+\overline a) + a^2 + \overline a^2,$$
i.e.
$$0=2(a+\overline a) + (a+\overline a)^2.$$
This yields $2\operatorname{Re}(a)=a + \overline a \in \{0,-2\}$, i.e. $\operatorname{Re}(a) \in \{0,-1\}$, i.e. $a=\pm i$ or $a=-1$.
Since $f$ has no real roots, we get that only $a=\pm i$ is possible. In particular 
$$f = (x^2+1)^n$$
for some $n \geq 0$.

Since the proof is very long, I will recap the main ideas of the proof:


*

*$f(0)=1$ and $f$ is monic, i.e. the product of all roots is $1$.

*All roots are algebraic integers, i.e. their absolute values are integers $\geq 1$

*From 1. and 2. we get that all roots are contained on the unit circle.

*The only elements $a$ on the unit circle with the property that $a^2+a+1$ is again on the unit circle are $-1$ and $\pm i$.

*Hence the only possible roots are $-1$ and $\pm i$, but one can easily rule out $-1$. So $\pm i$ are the only possible roots.

A: Finally, I got an easy proof:
Let $p(x)=x^2+1$, it's easy to verify that $p(x)p(x+1)=p(x^2+x+1)$. Let $f(x)=(x^2+1)^mg(x)$ for some $g(x)\in\mathbb{R}[x]$ with gcd$(x^2+1,g(x))=1$, if $g(x)$ is a constant polynomial, since the leading coefficient of $f(x)$ is 1, then $g(x)\equiv1$, we are done. If $g(x)$ is not a constant polynomial, since $f(x)f(x+1)=f(x^2+x+1)$ and $p(x)p(x+1)=p(x^2+x+1)$, then $g(x)g(x+1)=g(x^2+x+1)$. Notice that $g(x)=g(-x)$. Since $g(x)$ is a non-constant polynomial, then $g(x)$ splits in $\mathbb{C}[x]$. Let $\alpha$ be a root of $g(x)$ in $\mathbb{C}$ with the largest modulus, let $\beta=\alpha^2+\alpha+1$ and $\gamma=\alpha^2-\alpha+1$, since $g(x)=g(-x)$ and $g(x)g(x+1)=g(x^2+x+1)$, then $g(\alpha)=g(\beta)=g(\gamma)=0$. Notice that $|\beta-\gamma|=|2\alpha|=2|\alpha|$. By the assumption on $\alpha$, we know that $|\beta|\leq|\alpha|$ and $|\gamma|\leq |\alpha|$. Since $2|\alpha|=|\beta-\gamma|\leq|\beta|+|\gamma|\leq 2|\alpha|$, then $\beta=-\gamma$, that is, $\alpha^2+\alpha+1+\alpha^2-\alpha+1=0$. So $2\alpha^2+2=0$, which implies that $\alpha=\pm i$. But we have assume that gcd$(g(x),x^2+1)=1$, which implies that $g(\pm i)\neq0$, contradiction.
