Q:

$P((x - y)^2) + P((y - z)^2) + P(z - x)^2) = 18P((\frac{(x + y + z)^2}{3})^2)$

Let $P(x)$ be some polynomial that satisfies $P((x - y)^2) + P((y - z)^2) + P(z - x)^2) = 18P((\frac{(x + y + z)^2}{3})^2)$. when $x,y,z \in \mathbb R$ and $xy + yz + zx = 0$ Find all $P(x)$.

This is from POSN Camp 2 Thailand.
I done it and get $P(x) = 0$ or $ ax^2 ; a \in \mathbb R$. I checked my answer , I 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 solution too and I checked it wrongly. What it the solution of this problem? I am confused. Am I correct or wrong?

A:

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

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

