Let $f:\mathbb{R}\to \mathbb{R}$ and such for any real numbers $x,y$ we have $$f(xf(y)+yf(x))=yf(x)+xf(y)$$ Find $f(x)$.
I have let $x=y=0$ have $$f(0)=2f(0)\Longrightarrow f(0)=0$$
and I guess the solution is $f(x)=x$ or $f(x)=0$, but I can't prove it.
Most compactly written, part of the solution set is $$\{x\mapsto x\cdot\mathbb{1}_A(x):A\subseteq\mathbb{R},2\cdot A\cdot A\subseteq A,A\cdot(\mathbb{R}\backslash A)\subseteq A\}$$ where $\mathbb{1}_A$ is the indicator function on the set $A$. (Three such sets $A$ include $\varnothing$, $\{0\}$ (both giving $f(x)=0$), and $\mathbb{R}$ (which gives $f(x)=x$)) Now, consider the function $f(x)=x\cdot\mathbb{1}_A(x)$ where $A$ is such subset of $\mathbb{R}$. Take $x,y \in \mathbb{R}$. Assume that $x,y \in A$. Then, we have $$\begin{split} f(xf(y)+yf(x))&=f(xy+yx)\\&=f(\underbrace{2xy}_{\in A})\\&=2xy\\&=yx+xy\\&=yf(x)+xf(y). \end{split}$$ Now, assume that $x,y \notin A$. Then, we have $$\begin{split} f(xf(y)+yf(x))&=f(0+0)\\&=f(0)\\&=0\\&=0+0\\&=y\underbrace{f(x)}_{0}+x \underbrace{f(y)}_{0}. \end{split}$$ Finally, assume that $x \in A$ and $y \notin A$ (the fourth case follows by symmetry). Then, we have $$\begin{split} f(xf(y)+yf(x))&=f(\underbrace{y}_{\notin A}\underbrace{f(x)}_{\in A}) \\&=f(\underbrace{yf(x)}_{\in A})\\&=yf(x)\\&=yf(x)+x\underbrace{f(y)}_{0}. \end{split}$$ Now, let's attempt to show the converse. Suppose that a function $f$ satisfies $$f(xf(y)+yf(x))=yf(x)+xf(y)\text{ for all }x,y\in\mathbb{R}$$ and consider the set $$B=\{x\in\mathbb{R}:f(x)=x\}.$$ Now, take $x,y \in B$. Then, we have $$\begin{split} f(2xy)&=f(x\underbrace{y}_{\in B}+y\underbrace{x}_{\in B}) \\&=f(xf(y)+yf(x))\\&=xf(y)+yf(x)\\&=xy+yx\\&=2xy \end{split}$$ so $2xy\in B$ as well. Now, suppose that $x \in B$ but $y \notin B$. I would not have any idea how to prove that $xy \in B$ as well. The only thing I know is that taking $x=y=1/2$ leads to $f(f(1/2))=f(1/2)$ so $f(1/2) \in B$ as well...