2. Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that for all real numbers $x, y$ the following holds

$$
f(f(x)+y)=f(f(x)-y)+4 f(x) y
$$

(Bulgaria)
2. By substituting $(x, f(x))$ and $(z, 2 f(x) - f(z))$ for $(x, y)$, we obtain $f(2 f(x)) = f(0) + 4 f(x)^2$ and $f(2 f(x)) = f(2 f(z) - 2 f(x)) + 8 f(x) f(z) - 4 f(z)^2$. Subtracting the first equation from the second, we get

$$
f(2 f(x) - 2 f(z)) - (2 f(x) - 2 f(z))^2 = f(0)
$$

Notice that if $f \not\equiv 0$ (where $f \equiv 0$ is one solution), any real number $t$ can be represented as $2 f(x) - 2 f(z)$: indeed, from the original equation, we have $2(f(f(u) + y) - f(f(u) - y)) = 8 f(u) y = t$ for $y = \frac{t}{8 f(u)}$ where $f(u) \neq 0$. Therefore, from (1) it follows that $f(t) - t^2 = f(0) = c$, i.e., $f(t) = t^2 + c$. It is easy to verify that this is also a solution.