TITLE: If the function $f$ satisfies the equation $f(xf(y)+x)=xy+f(x)$, find $f$
QUESTION [9 upvotes]: Question

Let the function $f:\mathbb R\to\mathbb R$,and such
  $$f(xf(y)+x)=xy+f(x)$$
Find all $f(x)$

Let $x=1,y=1$,then
$$f(f(1)+1)=1+f(1)$$
let $f(1)=t$,then
$$f(t+1)=1+t$$
So I guess $$f(x)=x$$ is such it, and I found $f(x)=-x$ is also such it? 
Can you help?
I found this simaler problem：(BMO 1997, 2000)
$$f(xf(x)+f(y))=y+(f(x))^2,f:R\to R$$
this answer $f(x)=x$ or $f(x)=-x$,
the full solution can see problme 5

REPLY [8 votes]: Take first $x=u\not =0$. As we have $f(uf(y)+u)=uy+f(u)$, we immediately see that $f$ is surjective.
Let $v$ such that $f(v)=0$. We have:
$$f(xf(v)+x)=xv+f(x)=f(x)$$ hence $xv=0$ for all $x$, and $v=0$. We have thus $f(0)=0$.
There exists $v\in \mathbb{R}$ such that $f(v)=-1$. We have:
$$f(xf(v)+x)=f(-x+x)=f(0)=0=xv+f(x)$$
Now we have $f(x)=-vx$ for all $x$, and it is easy to see that we have $v=\pm 1$, and we are done.