3. Finde alle Funktionen $f: \mathbb{R} \rightarrow \mathbb{R}$, sodass für alle $x, y \in \mathbb{R}$ gilt:

$$
(y+1) f(x)+f(x f(y)+f(x+y))=y
$$
Solution: Let $(y+1) f(x)+f(x f(y)+f(x+y))=y$. Note that $f(x) \equiv 1$ is not a solution. So there exists $x_{0}$ such that $f\left(x_{0}\right) \neq 1$. Substituting $x=x_{0}$, we obtain :

$$
f\left(x_{0} f(y)+f\left(x_{0}+y\right)\right)=y\left(1-f\left(x_{0}\right)\right)-f\left(x_{0}\right)
$$

This equality shows that $f$ is surjective. Indeed, we have a functional term in $y$ on the left and an affine (and therefore surjective) function on the right.

Thus, there exists $a$ such that $f(a)=0$. Substituting $x=0, y=a$, we obtain :

$$
f(0)(a+2)=a
$$

We conclude that $f(0) \neq 1$.

Substitute $x=0$ into the first equation to obtain :

$$
f(f(y))=y(1-f(0))-f(0)
$$

This equation shows that $f$ is injective. Indeed, if we take $u$ and $v$ such that $f(u)=f(v)$, then

$$
u(1-f(0))-f(0)=f(f(u))=f(f(v))=v(1-f(0))-f(0) \Rightarrow u=v
$$

Substitute $x=a, y=0$ into the original equation to obtain :

$$
f(a f(0))=0=f(a) \Rightarrow a f(0)=a \Rightarrow a=0 \Rightarrow f(0)=0
$$

The first implication follows from injectivity and the second from the fact that $f(0) \neq 1$. Substitute $x=0$, then $y=0$ and we have :

$$
f(f(y))=y \text { and } f(f(x))=-f(x)
$$

We conclude that $f(x) \equiv-x$, which is easily verified as a solution.