Solution by efereal3.
Find all functions f:R→R such that f(f(x)2+f(x)f(y))=xf(x)+xy for any reals x,y.
Let P(x,y) denote the functional equation above.
Then, P(0,y) gives us f(f(0)2+f(0)f(y))=0, meaning that there exists c so that f(c)=0. After that, P(c,y) gives cy=f(0) for all y. Hence, c=f(0)=0.
Because P(1,y) gives us f(f(1)2+f(1)f(y))=y+f(1), we can easily see that f(x) is bijective.
Hence, for all real number z=0, there exists exactly one pair of (x0,y0) so that f(x0)=z and f(y0)=−z.
Then, P(x0,y0) gives x0(z+y0)=f(0)=0.
However, because f(x0)=z=0, x0=0 which implies z+y0=0 or y0=−z.
Hence, for all z=0, f(−z)=−z, which means for all z=0, f(z)=z.
However, since f(0)=0, we see that f(x)=x for all x (which does satisfy the original functional equation).
To conclude, f(x)=x for all x is the only solution.