First Solution. Plugging (x,y)=(1,yf(z)+f(z)f(y)) yields
f(C(yf(z)+f(z)f(y)+f(yf(z)+f(z)f(y))))=f(C(yf(z)+zf(y)+f(y)f(z)+f(zy))=2f(yf(z)+f(z)f(y))=2zf(y)+2f(zy)
zf(y)+f(zy)=yf(z)+f(yz).
Hence, f(y)=Cy for some constant C. Putting f(x)=Cx in the original equation yields f(x)=0,f(x)=x,f(x)=−2x.
Second Solution. As in the first solution, f(1)=a. Assume that f is not constant, then, f((1+a)f(x))=ax+f(x) yielding to the fact that f is injective. Further, f(a(y+f(y)))=2f(y). It follows that if r+f(r)=s+f(s) then r=s. Hence, f(a2+a)=2a and f((1+a)f(a2+a))=f(2a2+2a)=a(a2+a)+f(a2+a)=a3+a2+2a, finally, f(a(a2+a+f(a2+a)))=f(a3+3a2)=2f(a2+a)=4a. Notice that a3+3a2+4a=a3+a2+2a+2a2+2a. It follows that f(2a2+2a)+2a2+2a=f(a3+3a2)+a3+3a2. Hence, 2a2+2a=a3+3a2. Thus, a∈{−2,1}.
If a=1 then f(2f(x))=x+f(x) letting x=2f(z) to obtain f(y(z+f(z))+(z+f(z))f(y))=f(yz+zf(z)+zf(y)+f(y)f(z))=2f(z)f(y)+f(2yf(z)), interchanging y,z to obtain f(2zf(y))=f(2yf(z)) since f is injective, it follows that zf(z)=zf(y) and hence f(x)=x.
If a=−2 then f(−f(x))=f(x)−2x and f(−2f(x)−2x)=2f(x) putting −f(x) instead of x in the second equation to obtain f(4x)=2f(x)−4x. Plugging −2(x+f(x)) instead of x in the second equation to obtain f(4x)=4f(x). Hence, f(x)=−2x. ■