(M-D) Find the $f: \mathbb{R} \rightarrow \mathbb{R}$ such that $f(1)=1$ and $f(x y+f(x))=x f(y)+f(x)$.
Let $x=0$ hence $f(f(0))=f(0)$ Let $y=0$ hence $f(f(x))=f(x)+x f(0)$ Let's study the injectivity of $f$: Suppose $f(x)=f(y)$ Then $f(x y+f(x))=f(y) x+f(x)=(x+1) f(x)$ And $f(y x+f(y))=f(x y+f(x))=f(x) y+f(y)=(y+1) f(x)$ So if $f(x) \neq 0$ and thus we have $y+1=x+1$ hence $x=y$ If $f(x)=f(y)=0$ We can therefore conclude that $f(f(0))=f(0)$ implies in all cases that $f(0)=0$ And thus that $f(f(x))=f(x)$ for all $x$ But if $f(y)=0$ then by substituting in the initial condition we have $f(w y+f(w))=f(w)$ for all real $w$ hence $f(w y+f(w))=f(f(w))$ for all real $w$, in particular, for $w=1$ we have $f(y+1)=f(1)$ and since $f(1)=1 \neq 0$, the injectivity of $f$ (on $\mathbb{R}^{*}$) allows us to conclude that $y+1=1$ or again $y=0$ so the only preimage of 0 is $0, f$ is therefore injective on $\mathbb{R}$. Therefore $f(f(x))=f(x)$ implies that $f(x)=x$ for all $x$ so the only solution is the identity, we verify and we find indeed that $x y+x=y x+x$.