# Find all f such that $f(f(y))+f(x-y)=f(xf(y)-x)$

Find all functions $$f$$ defined over real numbers to real numbers such that $$f(f(y))+f(x-y)=f(xf(y)-x)$$

My attempt: Set $$x=y=0$$ to get $$f(f(0))=0$$. It will be very helpful if I will able to find $$f(0)$$ but I failed to find it. I tried to check the injectivity of $$f$$ but wasn't able to check it.

• Brief observation: Suppose $f(y) = 0$. Then by setting $x=0$, we get $f(0) + f(-y) = f(0)$. So $y$ is a root iff $-y$ is a root. Now instead suppose $f(x) = 0$. Then by setting $x=y$, we obtain $2f(0)=f(-x)$; but we already know $f(x) = 0 = f(-x)$, so $2f(0) = f(0)$ and hence (if there is any root at all) $f(0) = 0$. – Patrick Stevens Mar 22 '19 at 4:07
• Okay, so $f(0)=0$.Now what to do next?We can also conclude that $f(x)=f(-x)$ – Sufaid Saleel Mar 22 '19 at 4:47
• $f(0) = 0$ if there is a root. – Patrick Stevens Mar 22 '19 at 4:51

Let $$P(x,y)$$ be the assertion that $$f(f(y))+f(x-y)=f(xf(y)-x)$$. Now,

Observation 1: $$P(0,0)\implies f(f(0))=0$$.

Observation 2: Considering $$P(0,f(0))$$ and $$P(f(0),f(0))$$ we get $$f(0)=0$$.

Observation 3: Considering $$P(x,0)$$ we get $$f$$ is even function, i.e;$$f(x)=f(-x)$$ and finally $$P(x,-x)$$ and $$P(x,x)$$ implies $$f(x)=0$$.

So, $$f(x)=0,\forall x\in\mathbb{R}$$.

I tried to solve this problem with taking help from the above comments.Please check it.  I am tooo lazy to LaTeX it .Please don't mind!