About the polynomials satisfying $P\left((x-y)^2\right)+P\left((y-z)^2\right)+P\left((z-x)^2\right)=18P\left(\left(\frac{(x+y+z)^2}3\right)^2\right)$

Find all polynomials $P(x)$ that satisfy $$P\left((x - y)^2\right) + P\left((y - z)^2\right) + P\left((z - x)^2\right) = 18P\left(\left(\frac{(x + y + z)^2}{3}\right)^2\right)$$ when $x,y,z \in \mathbb R$ and $xy + yz + zx = 0$.

This is from POSN Camp 2 Thailand.

I've done it and got $P(x) = 0$ or $P(x) = ax^2$ for some $a \in \mathbb R$. I checked my answer and found that $P(x) = 0$ only. But, I found out after discussing with my friend who did it later that $P(x) = ax^2$ are solutions, too, and that I had checked it wrongly. What it the solution of this problem? I am confused. Am I correct or wrong?


Note: I believe the RHS should be $18 P \left ( \frac{ (x+y+z)^2 } { 3} \right ) $. If not, ignore this.

  1. Set $ x= y = z = 0$, so $P(0) = 0$.
  2. Set $ x = y = 0 $, so $ P \left ( z^2 \right ) = 9 P \left ( \frac{z^2}{3} \right )$ holds for all $z$. (Do some work here.) Hence, the solutions are a subset of $P(x) = ax^2 $.
  3. Verify that $P(x) = ax^2$ indeed satisfies the equation. Hence, these are all of the solutions.