1. Determine all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that for all $x, y \in \mathbb{R}$,

$$
f(x f(x)+f(y))=(f(x))^{2}+y
$$
1. The right-hand side of the given equation (*) can take all real values, so the function $f$ is "onto". This means there exists $c$ such that $f(c)=0$. Substituting $x=c$ in (*) gives $f(f(y))=y$. Now, substituting $f(x)$ for $x$ in (*) yields $f(x f(x) + f(y)) = x^2 + y$, which together with (*) gives $f(x)^2 = x^2$ for all $x$.

Assume there exist $a$ and $b$ (with $ab \neq 0$) such that $f(a) = -a$ and $f(b) = b$. Substituting $(x, y) = (a, b)$ into (*) gives $f(-a^2 + b) = a^2 + b$, which is impossible if $a, b \neq 0$. Therefore, the only possible functions are $f(x) \equiv x$ and $f(x) \equiv -x$, and they are indeed solutions.

Note. It is interesting that this problem is exactly the same as Problem 4 from the Balkan Mathematical Olympiad 1997.