Solution by ioannism45.
f(f(x)+f(xy))=x+xf(y),∀x,y∈R.
Very nice.
Observe first that f(y)=−1 for all y is not a solution. So there exists a such that f(a)=−1.
Therefore
P(x,a):f(f(x)+f(ax))=x(f(a)+1),∀x∈R
which immediately gives f: surjective. Furthermore we have
P(x,1):f(2f(x))=x(f(1)+1),∀x∈R(1).
If f(1)=−1 surjectivity of f implies f≡0 which is not a solution. Thus f(1)=−1 using (1), it is trivial to show that f is injective.
We shall now prove that f(−1)=−1 and f(0)=0.
If f(0)=−1 then for some k such that f(k)=1 we have
P(k,0):f(f(k)−1)=0⇒f(0)=0
contradiction. So for some t=0 we have f(t)=−1. We have
P(1,t)−P(t,t1):f(f(1)+f(t))−f(f(t)+f(1))=1+f(t)−t−tf(t1)⇒
⇒f(t1)=−1=f(t)⇒
⇒t2=1f(1)=−1t=−1.
We also have
P(0,1):f(2f(0))=0.
If f(0)=0 then
P(2f(0),1):f(0)=2f(0)(f(1)+1)⇒2f(1)+2=1⇒f(1)=−21.
However, this implies
P(1,1):f(2f(1))=f(1)+1⇒f(−1)=21
contradiction. Thus f(0)=0.
Now we have
P(x,−1):f(f(x)+f(−x))=0⇒f(−x)=−f(x),∀x∈R.
Thus f(1)=1 and so
P(x,1):f(2f(x))=2x,∀x∈R.
Setting x→2f(x) at the above gives
f(4x)=4f(x),∀x∈R,(2).
To finish off, we have
P(x,xy):f(f(x)+f(y))=x+xf(xy),∀x,y∈R,x=0
and swapping x and y gives
x+xf(xy)=y+yf(yx),∀x,y∈R∗,(3).
For y=1 in (3) we have
x+xf(x1)=f(x)+1⇒4x+4xf(x1)=4f(x)+4,∀x∈R∗(4)
and for y=4 in (3) we have
x+xf(x4)=4+4f(4x)(2)x+4xf(x1)=4+f(x),∀x∈R∗(5).
Subtracting (4) and (5) gives is
3f(x)=3x⇒f(x)=x,∀x∈R∗
and since f(0)=0 we have
f(x)=x,∀x∈R
which we can verify it works. ■