# Find all functions that satisfy $f(x+f(y))=f(x)-y$

here is the problem Here is my solution :

$$x=y=0$$ gives $$f(f(0))=f(0)$$

$$x=0; y=f(0)$$ gives $$f(f(f(0)=0=f(0)$$ (because $$f(f(0))=f(0) \iff f(f(f(0)))=f(f(0))=f(0)$$)

$$x=0$$ gives $$f(f(y))=-y$$

$$x=0 ; y=f(y)$$ gives $$f(-y)=-f(y)\iff f(-f(y))=y$$

so $$y=-f(y)$$ gives $$f(2x)=2f(x)$$

now we can prove by induction that $$f(nx)=nf(x)$$

it is true for $$n=2$$

let's suppose that it is true for $$n$$

we have $$f(nx+f(-f(x))=f(nx)+f(x)\iff f((n+1)x)=(n+1)x$$

so it is true now we have $$f(x)=xf(1)$$

plugging this in the first equation gives $$f(1)^2=-1$$ which is impossible

I just want to know if my solution is right

In the official solution they prove that $$f$$ is bijective (which is true because $$f(f(y))=-y$$ ;) ) then they use cauchy function , they find that $$f(x)=cx$$ , plugging this in the first equation gives an impossible result.

• @vadim123 Because from the first line, $f(f(0)) = f(0)$. – rogerl Mar 8 at 21:59
• Looks right; you meant "which is impossible" near the bottom :) – rogerl Mar 8 at 22:01
• Ok updated ..... – user600785 Mar 8 at 22:14
• Possible duplicate of Functional equation. – Sil Apr 7 at 9:22

On the 5th line, I assume you meant to set $$y=-f(x)$$, which indeed yields $$f(2x)=2f(x)$$. The rest of the proof is fundamentally correct, though unclear at times (e.g. it was not immediately obvious to me why $$f(x)=xf(1)\implies f(1)^2=-1$$.) In an actual contest, you should justify and detail all of these processes.