Solution by maromex/MathLuis.
Let P(x,y) denote the given assertion f(x2+yf(y))=xf(x)+y2.
P(x,0):f(x2)=xf(x).
P(0,y):f(yf(y))=y2. This means f(f(y2))=y2, and therefore f(f(x))=x for all x≥0.
Taking f of both sides of P(x,0), we get x2=f(xf(x)).
We can get, for all x≥0, x2=f(xf(x))=f(f(x)f(f(x)))=f(x)2. So f(x)∈{x,−x} for all x≥0.
P(−x,0):f(x2)=−xf(−x). This means xf(x)=−xf(−x), so f(−x)=−f(x) for all real x, and so
f(x)∈{x,−x}
for all real x.
Case 1: f(x)=x for all real x
This function works.
Case 2: f(x0)=x0 for some real x0
We must have f(x0)=−x0=0.
P(x,x0):f(x2−x02)=xf(x)+x02. As f(x)2=x2 for all real x, this means
x4=x2f(x)2x40f(x2−x02)=(f(x2−x02)−x02)2=f(x2−x02)2−2f(x2−x02)x02+x04=(x2−x02)2+x04−2x02f(x2−x02)=x4+x02(−2x2+2x02−2f(x2−x02))=−2x2+2x02−2f(x2−x02)=−(x2−x02).
Therefore, f(x)=−x for all x≥0≥−x02. As f(−x)=−f(x), we have f(x)=−x for all real x. This function works.
Combining cases, the functions that work are f(x)=x for all real x and f(x)=−x for all real x.