6. find all surjective functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that $x, y \in \mathbb{R}$ holds for all $x, y \in \mathbb{R}$:

$$
f(x+f(x)+2 f(y))=f(2 x)+f(2 y)
$$

##
1st solution

Let $a \in f^{-1}(0)$, such an $a$ exists for sure, since $f$ is surjective. Inserting $x=y=a$ leads to $f(2 a)=0$. If you now insert $x=a, 2 a$ you get $f(a+2 f(y))=$ $f(2 y)=f(2 a+2 f(y)) \forall y$, since $f$ is surjective, it follows that $f$ is periodic with period $a$, in particular $f(0)=0$ and therefore $f(2 f(y))=f(2 y) \forall y$. Let $b(x)$ be such that $2 f(b(x))=x-f(x)$ holds. Inserting $y=b(x)$ leads to

$$
0=f(2 b(x))=f(2 f(b(x)))=f(x-f(x)) \quad \forall x
$$

This means that $f$ has period $x-f(x)$ for each $x$ and therefore $f(x)=f(f(x)) \forall x$, since $f$ is surjective, $f(x)=x \forall x$ and this is obviously a solution.

##