Step 1: Set x=y=0 to obtain f(0)=0.
Step 2: Set x=0 to obtain f(y)f(−y)=f(y)2.
\indent In particular, if f(y)=0 then f(y)=f(−y).
\indent In addition, replacing y→−t , it follows that f(t)=0⟹f(−t)=0 for all t∈R.
Step 3: Set x=3y to obtain [f(y)+3y2]f(8y)=f(4y)2.
\indent In particular, replacing y→t/8 , it follows that f(t)=0⟹f(t/2)=0 for all t∈R.
Step 4: Set y=−x to obtain f(4x)[f(x)+f(−x)−2x2]=0.
\indent In particular, if f(x)=0 , then f(4x)=0 by the observation from Step 3, because f(4x)=0⟹f(2x)=0⟹f(x)=0. Hence, the above equation implies that 2x2=f(x)+f(−x)=2f(x) , where the last step follows from the first observation from Step 2.
\indent Therefore, either f(x)=0 or f(x)=x2 for each x.
\indent Looking back on the equation from Step 3, it follows that f(y)+3y2=0 for any nonzero y. Therefore, replacing y→t/4 in this equation, it follows that f(t)=0⟹f(2t)=0.
Step 5: If f(a)=f(b)=0 , then f(b−a)=0.
\indent This follows by choosing x,y such that x−3y=a and 3x−y=b. Then x+y=2b−a , so plugging x,y into the given equation, we deduce that f(2b−a)=0. Therefore, by the third observation from Step 4, we obtain f(b−a)=0 , as desired.
Step 6: If f≡0 , then f(t)=0⟹t=0.
\indent Suppose by way of contradiction that there exists an nonzero t with f(t)=0. Choose x,y such that f(x)=0 and x+y=t. The following three facts are crucial:
\indent 1. f(y)=0. This is because (x+y)−y=x , so by Step 5, f(y)=0⟹f(x)=0 , impossible.
\indent 2. f(x−3y)=0. This is because (x+y)−(x−3y)=4y , so by Step 5 and the observation from Step 3, f(x−3y)=0⟹f(4y)=0⟹f(2y)=0⟹f(y)=0 , impossible.
\indent 3. f(3x−y)=0. This is because by the second observation from Step 2, f(3x−y)=0⟹f(y−3x)=0. Then because (x+y)−(y−3x)=4x , Step 5 together with the observation from Step 3 yield f(3x−y)=0⟹f(4x)=0⟹f(2x)=0⟹f(x)=0 , impossible.
\indent By the second observation from Step 4, these three facts imply that f(y)=y2 and f(x−3y)=(x−3y)2 and f(3x−y)=(3x−y)2. By plugging into the given equation, it follows that \begin{align*} \left(x^2 + xy\right)\left(x - 3y\right)^2 + \left(y^2 + xy\right)\left(3x - y\right)^2 = 0. \end{align*} But the above expression miraculously factors into (x+y)4 ! This is clearly a contradiction, since t=x+y=0 by assumption. This completes Step 6.
Step 7: By Step 6 and the second observation from Step 4, the only possible solutions are f≡0 and f(x)=x2 for all x∈R. It's easy to check that both of these work, so we're done.