Solution by jasperE3.
Let P(x,y) be the assertion
f(f(x)2+yf(x))=x2+f(xy).
First, f(0)=0. If a=f(0)=0, then P(0,y) says f(a2+ay)=a for every y, so f is constant, which is impossible in the original equation.
From P(x,0),
f(f(x)2)=x2,
so f(k)=0 implies k=0. Also, P(x,−f(x)) gives
f(−xf(x))=−x2.
These two identities show that f attains every nonnegative and every nonpositive real value, so f is surjective.
Using P(x,1) and P(x,0),
f(f(x)2+f(x))=f(f(x)2)+f(x).
Since f is surjective, for every real t this gives
f(t2+t)=f(t2)+t.
Taking t=−1 yields f(1)=1. Hence P(1,y) gives
f(y+1)=f(y)+1
for all real y.
Now fix x=0. Since f(x)=0, every real t can be written as t=f(x)2+yf(x). Applying P(x,y+1/x) and using f(u+1)=f(u)+1 gives
f(t+xf(x))=f(t)+1.
At t=0, this says
f(xf(x))=1.
If f(u)=1, then P(u,0) gives f(1)=u2, so u=±1. Therefore f(x)=x or f(x)=−x for each x=0.
If f(x)=−x for some nonzero x, then the previous translation identity gives f(t−1)=f(t)+1 for all t, contradicting f(t)=f(t−1)+1. Hence f(x)=x for every x, and the unique solution is
f(x)=x for all x.