The solutions are f(x)=0 for all x∈R and f(x)=x for all x∈R.
It is easy to check that both are solutions. Label the equation as follows.
f(x+yf(x))=f(x)+xf(y)(1)
Putting x=1 in (1), we have
f(1+yf(1))=f(1)+f(y).(2)
If f(1)=1, then there exists y∈R such that 1+yf(1)=y. For this y, we obtain f(1)=0. Then (2) becomes f(y)=0 for all y, which is the first solution.
Now, we assume f(1)=1. If f(t)=0 for some t∈R, by putting x=t and y=1 in (1), we obtain t=0. This means f(x)=0 for any x=0. Putting x=1 in (1), we have
f(y+1)=f(y)+1.(3)
By induction we easily obtain f(n)=n for any n∈Z. Putting x=−1 in (1), we find that
f(−y−1)=−f(y)−1.
Using (3), we get −f(y)=f(−y−1)+1=f(−y). Replacing y by −y in (1), we have
f(x−yf(x))=f(x)−xf(y).
Adding this to (1), we have
f(x+yf(x))+f(x−yf(x))=2f(x).
For x=0, we can replace y by f(x)y. This yields
f(x+y)+f(x−y)=2f(x).(4)
Note that this also holds when x=0. Considering x=y, we find that
f(2x)=2f(x).
Also, applying the substitution a=x+y and b=x−y, equation (4) becomes
f(a)+f(b)=2f(2a+b)=f(a+b).
This shows f satisfies the Cauchy equation. Thus, (1) can be simplified to
f(yf(x))=xf(y).(5)
Putting y=1, we obtain f(f(x))=x. Replacing x by f(x) in (5) and using f(f(x))=x, we get
f(xy)=f(x)f(y).(6)
It is well-known that a function f:R→R satisfying the Cauchy equation and (6) can only be the zero function or the identity function. Thus, another solution is f(x)=x for all x∈R.