Solution by MathsII-enjoy.
From the original equation, we can immediately obtain that f is bijective. Hence there exists only c such that f(c)=0. Substitute x=c, y=0 into the problem, we have:
f(f(c)+f(c)f(0))=c+c.0⇒f(0)=c⇒f(f(0))=0.
Replace x=f(0) into the problem, this gives us:
f(f(f(0))+f(0)f(y))=f(0)+yf(0)⇒f(0)=f(0)+yf(0)⇒f(0)=0.
Substitute y=0 into the problem, it yields that:
f(f(x)+f(x)f(0))=x+x.0⇒f(f(x))=x,∀x∈R.
Then replace x→f(x), y→f(y) and using the last result, this follows that:
f(x+xy)=f(x)+f(x)f(y),∀x,y∈R⇒f(y+1)=f(y)f(1)+f(1),∀y∈R.(1).
From (1) we have f(y)+1=f(1)f(y+1),∀y∈R. Therefore, this results in:
f(x+xy)=f(x)(f(y)+1)=f(x).f(1)f(y+1)⇒f(xy)f(1)=f(x)f(y),∀x,y∈R.
Hence this gives us
f(x+xy)=f(x)+f(xy)f(1)⇒f(x+y)=f(x)+f(y)f(1)=f(y)+f(x)f(1),∀x,y∈R.
From that, we can easily obtain that f(1)=1 by choosing x=y. Then f is a multiplicative and additive function, so f(x)=x,∀x∈R.