2016
Problem - 3842
Find all functions $f: \mathbb{R}\rightarrow \mathbb{R}$ such that
$$f(yf(x)-x)=f(x)f(y)+2x$$
for all $x,\ y\in{\mathbb{R}}$.
Set $x=y=0$ yields $f(0)=f^2(0)\implies f(0) = 0, 1 $.
1) If $f(0)=0$, setting $y=0$ leads to $f(-x)=2x \implies f(x)={-2x}$.
2) If $f(0)=1$, setting $y=0$ leads to
\begin{equation}
f(-x)=f(x)+2x
\end{equation}
Replacing $x$ with $(yf(x)-x)$ in the \myJustRef{eq_jpn_mo_1} leads to
\begin{align*}
f(x-yf(x)) &= f(y(f(x)-x) + 2(yf(x)-x) \\
&= (f(x)f(y) + 2x) + 2(yf(x)-x) &\because \\
&= f(x)f(y) + 2yf(x)\\
&= f(x)(f(y)+2y) \\
&= f(x)f(-y) &\because\\
\\
\therefore\qquad& f(x-yf(x))=f(x)f(-y)
\end{align*}
Replacing $y$ with $-y$ and note () gives
\begin{align*}
&f(x+yf(x))&=f(x)f(y)\implies& f(x+yf(x))&= f(yf(x)-x)-2x
\end{align*}
Setting $y=-\frac{x}{f(x)}$ in the last relation yields
$$f(0)=f(-2x)-2x\implies 1=f(-2x)-2x \implies f(-2x)=1-(-2x)$$
Finally, replacing $-2x$ with $x$ leads to another solution $$f(x)={1-x}$$
Therefore, there exist totally two solutions $f(x)=\boxed{-2x}$ or $\boxed{1-x}$.