Note: we show the solution for the statement in the AoPS thread, which is f(f(x)f(y)+x2)=f(xy)+xf(x).
Solution by Mr. C, gghx and jasperE3.
We claim the only solutions are f(x)≡x, f(x)≡−x and f(x)≡0, which obviously work. We now show they are the only solutions. Let P(x,y) denote the assertion that f(f(x)f(y)+x2)=f(xy)+xf(x).
Suppose f(u)=0. Then, P(u,y) gives f(u2)=f(uy), so if u=0 then f(x)=0. Suppose from now on that f is non-constant and hence injective at 0.
From P(−1,1), f(f(−1)f(1)+1)=0, hence f(0)=0 and f(−1)f(1)=−1.
From P(x,0), f(x2)=xf(x), hence −xf(−x)=xf(x) so f is odd. This means that f(1)2=−f(−1)f(1)=1,so f(1)=1 or −1.
Note that if f is a solution, then so is −f. Hence, WLOG f(1)=1.
From P(x,−x) and using injectivity at 0, f(x)f(−x)+x2=0. From oddness, this implies that f(x)2=x2 so f(x)=x or −x for each real x.
Suppose f(a)=a and f(b)=−b for non-zero reals a,b.
P(a,b)⇒f(−ab+a2)=f(ab)+a2⇒(−ab+a2)2=(ab)2+2a2f(ab)+a4⇒f(ab)=−ab.
P(b,a)⇒f(−ab+b2)=f(ab)−b2⇒(−ab+b2)2=(ab)2−2b2f(ab)+b4⇒f(ab)=ab.
So ab=0, contradiction. The only solutions now are f(x)=x and f(x)=−x, which both work.