Checking if the solution to the functional equation is correct $f(2x+f(y))=x+y+f(x)$ Find all functions $f:\Bbb R\rightarrow \Bbb R$ such that 
$$f(2x+f(y))=x+y+f(x)$$
for all real $x, y$.
Ok, so I started off by proving that the function is surjective. Let us choose a number $c$ in the range of the function. Now set $x=c$ and $y=-f(c)$. From the equation above we obtain that
$$f(2c+f(-f(c))=c$$
therefore to  obtain any $c$ in the range we just have to input $2c+f(-f(c))$ in the function argument.
Now since the function is surjective there exists an $a$ such that $f(a) = 0$. Let us set $y = a$. Then we get that
$$f(2x)=x+a+f(x)$$
From the above we obtain that $a$ must be $0$. From the original equation we get that
$$f(f(y))=y+f(0)$$
$$f(f(y)) = y$$
That means that the function is it's own inverse. This implies that $f$ is the identity function or $f(x)=x$.
And indeed it does satisfy the functional equation.
I just want to know if I made any critical errors.
 A: The only critical error you made is 
$$f(f(x))=x \implies f(x)=x$$
This is a huge mistake, try $f(x)=c-x$ or $f(x)=\frac{c}{x}$ and you'll get also that $f(f(x))=x$
The step you were missing is putting $x=f(x)$ in the original equation to get:
$$f(2f(x)+f(y))=f(x)+y+f(f(x))=f(x)+y+x=f(2x+f(y))$$
and since $$f(a)=f(b)\implies f(f(a))=f(f(b)) \implies a=b$$
then $$f(2f(x)+f(y))=f(2x+f(y)) \implies2f(x)+f(y)=2x+f(y)\implies f(x)=x$$
That's it!
Another solution that would be useful for others is this:
$$P(x,y)\implies f(2x+f(y))=x+y+f(x)$$
$$P(0,0) \implies f(f(0))=f(0)$$
$$P(0,x) \implies f(f(x))=x+f(0)\implies f(f(f(x)))=f(x+f(0))=f(x)+f(0)$$
So putting $x=0$ in the last equation, we get
$$f(f(0))=2f(0) \implies f(0)=2f(0) \implies f(0)=0 \implies f(f(x))=x$$
Now, again, combining $P(f(x),y)$ and $P(x,y)$ , we get, by injectivity,
$$f(2f(x)+f(y))=f(2x+f(y)) \implies f(x)=x \ \ \Box.$$
The trick I used here to get that $f(0)=0$ is called tripling an involution: $$f(f(x))=g(x) \implies f(f(f(x))=f(g(x))=g(f(x))$$hopefully, you see how that works. It's a very useful trick indeed.
A: I was checking my answer to this problem, but I found another very interesting solution:
$$P(x,y) := f(2x+f(y))=x+y+f(x)$$
$$P(-f(x),x) \implies f(-f(x))=-f(x)+x+f(-f(x)) \iff f(x)=x$$
A: You're not quite done. You've successfully concluded that $f(f(x))=x$ for all $x$, and $f(0)=0$. For a hint as to how to continue, note that firstly $f$ must be injective and secondly
$$x+f(x)=f(f(x))+f(x).$$
Can you see how this helps?
A: You can continue with $f(f(x))=x$. So $f$ is bijective. For any $x$ there exists one and only one $y_x$ such that $f(y_x)=-x$. Replace $y_x$ in original equation give you $y_x=-x$ so $f(-x)=-x$ for any $x$, i.e., $f(x)=x$.
