(EGMO 2012)(M-D) Find all functions $f$ from $\mathbb{R}$ to $\mathbb{R}$ such that, for all real numbers $x$ and $y$, we have:

$$
f(y f(x+y)+f(x))=4 x+2 y f(x+y)
$$
$y=0$ gives $f(f(x))=4 x$ and thus the bijectivity of $f . f(f(0))=0$ and also $f^{3}(0)=f(4 \cdot 0)=0$. With $x=0$ we have $f(y f(y))=2 y f(y)$ with $y=\frac{1}{2}$ and the injectivity of $f$ we have $f\left(\frac{1}{2}\right)=1$ and thus
$f(1)=\frac{4}{2}=2$ and thus with $y=1-x$ we obtain

$$
f((1-x) f(1)+f(x))=4 x+2(1-x) 2=4=f(f(1))=f(2)
$$

and by injectivity we have $2(1-x)+f(x)=2$ and thus $f(x)=2 x$ which is indeed a solution.