Solution by jasperE3.
f(xf(x)+yf(y))=xf(x)+yf(y).
Let {0}⊆S⊆R satisfying the closure property that if a,b∈S then (a+b)2∈S, then:
f(x)={xxg(x)if x∈S+Sif x∈/S+S
where S+S={a+b∣a,b∈S} and g:R∖(S+S)→S is any function. To show that these functions work, note that if x∈S+S then xf(x)=x2∈S, while if x∈/S+S then x=0 and so xf(x)=g(x)∈S. Then xf(x)∈S for all x, so xf(x)+yf(y)∈S+S for all x,y, so f(xf(x)+yf(y))=xf(x)+yf(y).
To see that all solutions are of this form, take S={xf(x)∣x∈R}. Easy to see that {0}⊆S⊆R, and rewriting the equation as:
(xf(x)+yf(y))f(xf(x)+yf(y))=(xf(x)+yf(y))2,
we see that S has the aforementioned closure property. Finally, we have f(x)=x for all x∈S+S and xf(x)∈S for all x∈/S+S, so the solution set is complete.