Solution by ben13jamin.
Let P(x,y) be
f(2xf(y))=f(x)f(y)+xy.
First, f(0)=0. Indeed, P(0,y) gives f(0)=f(0)f(y) for all y; if f(0)=0, then f would be the constant function 1, which is not a solution.
The zero function is not a solution, so choose some j with f(j)=0. If f(a)=f(b), then comparing P(j,a) and P(j,b) gives a=b. Hence f is injective.
Swapping x and y in the original equation gives
f(2xf(y))=f(x)f(y)+xy=f(2yf(x)).
By injectivity,
xf(y)=yf(x)
for all x,y. Taking y=1 gives f(x)=cx, where c=f(1). Substituting into the equation gives
2c2xy=(c2+1)xy,
so c2=1. Thus
f(x)=x for all xorf(x)=−x for all x.
Both functions work.