Prove that two polynomials are constants if $P(x^2+x+1)=Q(x^2-x+1)$

Let $P$ and $Q$ be two polynomials with complex coefficients. It is known that $P(x^2+x+1)=Q(x^2-x+1)$. How can I prove that $P$ and $Q$ are constants?

I evaluated at various points to deduce $Q(3) = P(1) = Q(1) = P(3)$ but I don't know how to conclude from that.


Solution 1:

Set $x=0$ and you get $P(1)=Q(1)$

With $x=1-0=1$ you get $P(3)=Q(1)$ and $x=-1-0=-1$ gives $P(1)=Q(3)$

With $x=-1-1=-2$ you get $P(3)=Q(7)$ and with $x=1-(-1)=2$ there is $Q(3)=P(7)$

Notice that $x^2+x+1=(-1-x)^2+(-1-x)+1$ and $x^2-x+1=(1-x)^2-(1-x)+1$.

So you can use vieta jumping with the functional relation to show (for $n\in \mathbb Z$)$$\dots P(7)=Q(3)=P(1)=Q(1)=P(3)=Q(7)= \dots$$

But a polynomial $P$ which takes the same value $c$ at an infinite number of points is constant, since then $P-c$ has infinitely many roots hence $P-c = 0$.


To be more explicit $$P(n^2+n+1)=Q(n^2-n+1)=Q((1-n)^2-(1-n)+1)=P((1-n)^2+(1-n)+1)=$$$$[=P(n^2-3n-3)]=P((-1-(1-n))^2+(-1-(1-n))+1)=P((n-2)^2+(n-2)+1)$$ is enough.