Solution by jasperE3.
Let P(x,y) be the assertion f(2xf(y))=yf(x)+f(xy).
Claim: f(1)=1 (for nonconstant solutions).
Let c=f(1).
P(x,1)⇒f(2cx)=2f(x).
If c=0, this implies that f is constant, and the only constant solution is f(x)=0 (testing in the original equation).
Otherwise we may assume c=0. In particular, substitution of x=1 into the last equation gives f(2c)=2c.
P(x,2c)⇒f(4cx)=2cf(x)+f(2cx)⇒2f(2x)=2(c+1)f(x), so f(2x)=(c+1)f(x).
If c=−1, this implies that f is constant, which we’ve established to be impossible.
In particular, substitution of x=1 into the last equation gives f(2)=c2+c. Moreover:
f(cx)=f(21⋅2cx)=c+11f(2cx)=c+12f(x),
and substiting x=1 here we have f(c)=c+12c.
P(x,2)⇒f((2c2+2c)x)=2f(x)+f(2x)⇒2f((c+1)x)=(c+3)f(x)⇒f((c+1)x)=2c+3f(x).
Composing our expressions for f(2cx), f(2x), and f((c+1)x), we have:
f(c+14cx)=2f(c+12x)=(2c+2)f(c+11x)⇒c+34c+4f(x).
Doing the same thing we’ve been doing one last time:
P(x,c)⇒f(c+14cx)=cf(x)+f(cx)⇒c+34c+4f(x)=cf(x)+c+12f(x), and taking x to be something for which f(x)=0 (such as x=1) we’ll obtain c+34c+4=c+c+12 which resolves as c∈{−2,1}.
Finally, note that if c=−2, f((c+1)x)=2c+3f(x) reduces to f(−x)=21f(x). Repeated application implies f(x)=21f(−x)=41f(x) which is impossible for f not identically zero. Only remaining option is c=1 as we said.
P(0,−1)⇒f(0)=0.
If f(k)=0 for some k:
P(1,k)⇒k=0.
P(xy,z)⇒f(2xyf(z))=zf(xy)+f(xyz).
P(x,2yf(z))⇒f(2xzf(y)+2xf(yz))=2yf(x)f(z)+zf(xy)+f(xyz).
Call this last assertion Q(x,y,z).
Q(x,1,y)⇒f(2xf(y)+2xy)=2f(x)f(y)+yf(x)+f(xy).
Q(xy,y,y1)⇒f(2xf(y)+2xy)=2yf(xy)f(y1)+y1f(xy2)+f(xy).
Comparing, 2f(x)f(y)+yf(x)=2yf(xy)f(y1)+y1f(xy2) for all y=0; call it R(x,y).
R(x,x1)⇒(2f(x)−x)f(x1)=xf(x).
If 2f(x)−x=0 for some x=0 then from the above f(x)=0, and these statements cannot be true simultaneously. It is therefore safe to divide and get f(x1)=2xf(x)−x2f(x) for all x=0.
R(x2,x1)⇒2xf(x)−x24f(x)f(x2)−xf(x2)=x2f(x)2+x⇒(4f(x)−x)f(x2)=(2f(x)2+x2)(2f(x)−x).
If 4f(x)−x=0 for some x=0 then 2f(x)2+x2>0, so from the above, 2f(x)−x which we already established was impossible. It is therefore safe to divide and get f(x2)=4f(x)−x(2f(x)2+x2)(2f(x)−x).
R(1,x)⇒2f(x)+x=2xf(x)−x22xf(x)2+4xf(x)−x2(2f(x)2+x2)(2f(x)−x).
Finally:
0=2f(x)+x−2xf(x)−x22xf(x)2−4xf(x)−x2(2f(x)2+x2)(2f(x)−x)=−x(2f(x)−x)(4f(x)−x)8(x−f(x))2f(x)2
for all x=0, so since we showed that f(x)=0 for all x=0 our only remaining solution is f(x)=x.