Find all functions $f: \mathbb{R} \to \mathbb{R}$ which satisfies $f(x)-y+f(f(y))=f(x+y)+f(f(x))$.
My Attempt
\begin{align} &P(x, x): f(x)-x+f(f(x))=f(2x)+f(f(x)). \\ &\Rightarrow f(2x)=f(x)-x. \\ \ \\ &P(x, y): f(x)-y+f(f(y))=f(x+y)+f(f(x)). \\ &P(y, x): f(y)-x+f(f(x))=f(x+y)+f(f(y)). \\ &\therefore f(x)+f(y)-x-y+f(f(x))+f(f(y))=2f(x+y)+f(f(x))+f(f(y)). \\ &\therefore f(2x)+f(2y)=2f(x+y). \\ &x=\frac {a+b}{2}, y=\frac{a-b}{2} \Rightarrow f(a+b)+f(a-b)=2f(a) \end{align}
There are no such functions.
Set $y=0$. Then $$\require{cancel}\cancel{f(x)}+f(f(0))=\cancel{f(x)}+f(f(x))$$ So $f^2$ is constant. Now set $x=0$. Then $$f(0)-y+\cancel{f(f(y))}=f(y)+\cancel{f(f(0))}$$ (The canceled terms are equal because $f^2$ is constant.)
But then $$f(f(y))=f(f(0)-y)=\cancel{f(0)}-\cancel{f(0)}+y$$ which is not constant.