1. Determine all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that for all real numbers $x$ and $y$ the following holds

$$
(x+1) f(x f(y))=x f(y(x+1))
$$
1. By substituting $x=0$ into the given functional equation (*), we obtain $f(0)=0$. If for some $a \neq 0$ it holds that $f(a)=0$, then for $y=a$ and any $x \neq 0$, equation (*) gives $f(a(x+1))=0$, hence $f \equiv 0$. Therefore, we further assume that $f(x) \neq 0$ for $x \neq 0$. Suppose that for some $y \neq 0$ it holds that $f(y) \neq y$. Choose $x$ such that $x f(y)=y(x+1)$ - that is, $x=\frac{y}{f(y)-y}$. Then from (*) it follows that $0=(x+1) f(x f(y)) - x f(y(x+1)) = f(y(x+1))$, hence $x=-1$. From $x f(y)=y(x+1)$ it follows that $f(y)=0$, i.e., $y=0$, contrary to the assumption.

Therefore, the only solutions are the functions $f(x)=0$ and $f(x)=x$.