Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that for all real numbers $x$ and $y$:

$$
f\left(f(x)^{2}+f(y)\right)=x f(x)+y
$$
Considering $x=0$, we then have $f\left(f(0)^{2}+f(y)\right)=y$ so $f$ is bijective.

Let $a$ be the antecedent of 0, we consider $x=a$, we have $f(f(y))=y$, $f$ is involutive!

By evaluating $f(x)$ instead of $x$ in the equation, the right-hand side does not change but the left-hand side does. Thus:

$$
f\left(f(x)^{2}+f(y)\right)=f\left(x^{2}+f(y)\right)
$$

By injectivity: $x^{2}=f(x)^{2}$. This means that for all $x$, we have $f(x)=x$ or $f(x)=-x$. (Note that this does not mean $f: x \longmapsto x$ or $f: x \longmapsto -x$)

We assume there exist $b$ and $c$ two real numbers such that $f(b)=b$ and $f(c)=-c$, then by taking $x=b$ and $y=c$:

$$
f\left(b^{2}-c\right)=b^{2}+c
$$

We then have $b^{2}-c=b^{2}+c$ or $b^{2}-c=-b^{2}-c$, in both cases, $b$ or $c$ is zero. Thus we have $f: x \longmapsto x$ or $f: x \longmapsto -x$. These functions satisfy the statement, so they are the solutions.