Find all functions that satisfy $f(f(x)+y)=2x+f(f(y)-x)$ Find all the function satisfy:
$$f(f(x)+y)=2x+f(f(y)-x), \forall x , y \in \mathbb{R}$$
I have tried that:
Let $x:=-x $ we have :
$$f(f(y)+x)=2x+f(f(-x)+y)  ,(1) $$
Then in $(1)$ $x:=y;y:=x$ we have :
$$f(f(x)+y)=2y+f(f(-y)+x)$$
So : $$2x+f(f(y)-x)=2y+f(f(-y)+x), (2)$$
Then let :$2x=f(y)-f(-y)$ we have :
$$f(y)-f(-y)=2y$$
And stuck !
Edit: This is IMO2002 Shortlisted Problem A1 (CZE).
 A: For convenience, let $P(x, y)$ represent the equation $f(f(x)+y)=2x+f(f(y)-x)$.
$P(x, -f(x))$ gives $f(f(-f(x))-x)=f(0)-2x$. Thus $f(x)$ is surjective.
Suppose $f(a)=f(b)$ for some $a, b$. Then $P(x, a)$ and $P(x, b)$ give 
$$f(f(x)+a)=2x+f(f(a)-x)=2x+f(f(b)-x)=f(f(x)+b)$$
Since $f(x)$ is surjective, $f(x+a)=f(x+b) \, \forall x \in \mathbb{R}$.
Now using the above equation and $P(a, y), P(b, y)$ give 
\begin{align}
2a=f(f(a)+y)-f(f(y)-a) & =f(f(a)+y)-f(f(y)-(a+b)+b) \\
&=f(f(a)+y)-f(f(y)-(a+b)+a) \\
& =f(f(b)+y)-f(f(y)-b) \\
& =2b
\end{align}
Thus $f(x)$ is also injective.
Finally, $P(0, y)$ gives $f(y+f(0))=f(f(y))$, so since $f(x)$ is injective, $f(y)=y+f(0) \, \forall y \in \mathbb{R}$. Checking, this is indeed a family of solutions.
A: Purely from a calculus perspective:
Taking the derivative of the equation with respect to $x$, we have
$$
f'(f(x)+y)f'(x) = 2-f'(f(y)-x)
$$
Taking the derivative with respect to $y$ instead, we have
$$
f'(f(x)+y) = f'(f(y)-x)f'(y)
$$
Combining these, we can note that
$$
f'(f(y)-x)(f'(x)f'(y)+1) = 2
$$
When $x=f(y)$, this becomes
$$
f'(f(y))f'(y) = \frac{2}{f'(0)}-1
$$
Which we may integrate to get
$$
f(f(y)) = \left(\frac{2}{f'(0)}-1\right)y+C
$$
From the original equation, when $x=0$, we have
$$
f(f(0)+y) = f(f(y))
$$
So we have
$$
f(f(0)+y) = \left(\frac{2}{f'(0)}-1\right)y+C
$$
Or
$$
f(y) = \left(\frac{2}{f'(0)}-1\right)y+\hat C
$$
Now, taking the derivative with respect to $y$ at $y=0$, we have
$$
f'(0) = \left(\frac{2}{f'(0)}-1\right)
$$
Which tells us that $f'(0)=1$ or $f'(0)=-2$. But we also have $f'(y)=f'(0)$, and so
$$
f'(0)^2 = \frac{2}{f'(0)}-1
$$
Which immediately tells us that $f'(0)=1$. Therefore,
$$
f(x) = x + \hat C
$$
And this is the only solution family to the equation.
A: Since this is an IMO2002 SL problem, here is a solution from The IMO Compendium
A Collection of Problems Suggested for The International Mathematical Olympiads: 1959-2009:

Notice that $f$ is surjective. Indeed, setting $y=-f(x)$ gives $f(f(-f(x))-x)=f(0)-2x$, where the right-hand expression can take any real value.
In particular, there exists $x_0$ for which $f(x_0)=0$. Now setting $x=x_0$ in the functional equation yields $f(y)=2x_0+f(f(y)-x_0)$, so we obtain
  $$
f(z)=z-x_0\mbox{ for }z=f(y)-x_0.
$$
  Since $f$ is surjective, $z$ takes all real values. Hence for all $z$, $f(z)=z+c$ for some constant $c$, and this is indeed a solution.

