What if x = y = 0?
(f(0))2=f(0)+f(0)
Let x = f(0), then x^2 - 2x = 0. This implies f(0) = 0 or f(0) = 2.
Case 1: f(0) = 2
Substituting x = 0 gives:
f(0)f(y)=f(y)+f(0)f(y)=2
Note that this holds for any real number y. That means the constant function f(x)=2 is a solution to this functional equation.
Case 2: f(0) = 0
Substituting x = 0 gives:
f(0)f(y)=f(y)+f(0)f(y)=0
Note that this holds for any real number y. That means the constant function f(x)=0 is a solution to this functional equation.
The only solutions to this functional equation are f(x)=0 or f(x)=2.