2. find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that $x, y \in \mathbb{R}$ holds for all $x, y \in \mathbb{R}$:

$$
f(x+y f(x))=f(x f(y))-x+f(y+f(x))
$$
Solution: We use $x=y=0$ to obtain $f(f(0))=0$. With $x=y=1$ the equation becomes $f(f(1))=1$. With these two identities and inserting $x=1$ and $y=0$ we get $f(1)=0$. Then $1=f(f(1))=f(0)$ also applies. By inserting $y=0$, the original equation becomes $f(f(x))=x$. If we now set $x=1$ and use the identities found, we finally obtain the solution $f(y)=1-y$ for all $y \in \mathbb{R}$. Substituting shows that this is really a solution.