Solution by hauy1.
Let P(x,y) be
f(xf(y)+f(xy))=2xy.
First, f is injective. If f(a)=f(b), then P(1,a) and P(1,b) give
f(2f(a))=2a,f(2f(b))=2b,
so a=b.
Swapping x and y in the original equation gives
f(yf(x)+f(xy))=2xy.
By injectivity,
xf(y)+f(xy)=yf(x)+f(xy),
so xf(y)=yf(x) for all x,y. Taking y=1 gives f(x)=cx, where c=f(1).
Substituting f(x)=cx into the original equation,
c(2cxy)=2xy,
so c2=1. Therefore the solutions are
f(x)=x for all xandf(x)=−x for all x.
Both work by direct substitution.