Let x=y=0 in the problem, we have f(0)=f(0)+f(0)2 so f(0)=0.
Continue to replace (x,y)=(1,−1) into the problem, we have f(−1)=f(1)⋅f(−1) deduce f(1)=1 or f(−1)=0. However, if f(−1)=0, substituting y=−1 in the problem, then f(−x)=0 for all real numbers x, not satisfied. Thus, f(1)=1.
Continue to replace x=y=−1, we have f(1)=f(0)+f(−1)2 inferred f(−1)=1 or f(−1)=−1. But if f(−1)=1, substitute y=−21 then f(2x)=−f(x)f(−21), ∀x∈R; continue to substitute x=−1 then f(−21)=0 so f(2x)=0, ∀x∈R, also not satisfied. Hence, f(−1)=−1.
Finally, substitute y→−1 in the given, then f(−x)=−f(x) for all real numbers x, that is, f is an odd function.
Change y by −y, y−1 and using the property f as an odd function, then
f(x)f(y)=f(2xy−x)−f(xy−x)=f(xy)+f(x)f(y−1)−f(xy−x).(∗)
Thus for all positive integers y then
f(xy)−f(x)f(y)=f(x(y−1))−f(x)f(y−1)=f(x(y−2))−f(x)f(y−2)=⋯=f(0)−f(x)f(0)=0.
From this it follows that f(xy)=f(x)f(y) for all x∈R,y∈Z+. In (∗), let (x,y)=(1,2) then f(3)−f(1)=f(2)2. Let y=1 in the given equation, then
f(2x+1)=f(x+1)+f(x),∀x∈R.
Continue to replace x=1 then f(2)=f(3)−f(1)=f(2)2 so f(2)=2 or f(2)=0. Notice that if f(2)=0, then due to the multiplication, we have f(2x)=f(2)f(x)=0, which is also not satisfied. Therefore, f(2)=2 and f(2x)=2f(x), ∀x∈R and f(2x+1)=f(x)+f(x+1).
Here, by induction, we can prove f(n)=n for all positive integers n. Replace y→xy in the given, then
f(2y+x)=f(x+y)+f(x)f(xy),∀x=0,y∈R.(1)
Change the role x,y of the above expression then
f(2x+y)=f(x+y)+f(y)f(yx),∀y=0,x∈R.(2)
Replace x→2x in (1) then
f(2x+2y)=f(2x+y)+f(2x)f(2xy)=f(x+y)+f(y)f(yx)+f(2x)f(2xy),∀x,y=0.
On the other hand, f(2x)=2f(x) so f(x+y)=f(x)f(xy)+f(y)f(yx), ∀x,y=0. Adding the sides of (1) and (2), combined with this last equality, we get
f(2x+y)+f(2y+x)=2f(x+y)+f(x+y)+f(y)f(yx)+f(x)f(xy)=3f(x+y),∀x,y=0.
To handle the condition x,y=0, replace (x,y)→(32b−a,32a−b) with a,b∈R then
f(a)+f(b)=f(a+b);∀a=2b vaˋ b=2a.
For every pair of numbers a,b∈R, we choose c such that c>4∣a∣+4∣b∣ then make sure c=2a,c=2b. We have
f(c)+f(a+b)=f(a+b+c)=f(c+a)+f(b)=f(c)+f(a)+f(b).
From here we infer that f is an additive function on R so f(xy)=f(2xy+x)−f(xy+x)=f(x)f(y), ∀x,y∈R. Therefore, f adds, multiplies, and is non-constant, so f(x)=x. It is easy to check that they satisfy the given condition. So f(x)=x with x∈R. □