Let $\alpha \neq 0$. Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that $f\left(x^{2}+y+f(y)\right)=f(x)^{2}+\alpha y$.
It is clear, given the equation, that $f$ is surjective and also that $f(x)^{2}=f(-x)^{2}$.

Let $c$ be a preimage of 0; with $x=0$ and $y=c$ we find that $\alpha c+f(0)^{2}=0$. The equation $\alpha X+f(0)^{2}=0$ having only one solution, we deduce $f(x)=0 \Longleftrightarrow x=c$.

Choose in the equation $y=-\frac{f(x)^{2}}{\alpha}$; we then have $f\left(x^{2}+y+f(y)\right)=0$, that is, $x^{2}-\frac{f(x)^{2}}{\alpha}+$ $f\left(-\frac{f(x)^{2}}{\alpha}\right)=c$, for all real $x$.

Notice that $f(-c)=0$ because $f(-c)^{2}=f(c)^{2}=0$. Therefore, $-c=c$ so $c=0$.

Thus, if $f(x)= \pm f\left(x^{\prime}\right)$, the previous equation forces $x= \pm x^{\prime}$.

Let $x \neq 0$ be a real number. Choose $x^{\prime}$ such that $f\left(x^{\prime}\right)=-f(x)$. We have $f(x) \neq f\left(x^{\prime}\right)$ and $x= \pm x^{\prime}$; therefore, $x=-x^{\prime}$ and thus $f(-x)=-f(x)$. $f$ is then odd. $(f(0)=0)$

If $f(x)=f\left(x^{\prime}\right)$, we have $x= \pm x^{\prime}$ but given the oddness $x=x^{\prime}$: $f$ is injective.

With $y=0, f\left(x^{2}\right)=f(x)^{2}$ and with $x=0$ we have $f(y+f(y))=\alpha y$.

Let $z \geq 0$ and $y \in \mathbb{R}$; we have $f(z+y+f(y))=f(z)+\alpha y$ by writing $z=(\sqrt{z})^{2}$.

Let $z \leq 0$ and $y \in \mathbb{R}$; we have by the previous point $f(-z-y+f(-y))=f(-z)+\alpha(-y)$, that is, using the oddness $f(z+y+f(y))=f(z)+\alpha z$.

The equation $f(z+y+f(y))=f(z)+\alpha y$ is therefore always true.

By setting $z=x+f(x)$ in the above equation, we finally have $f(x+f(x)+y+f(y))=$ $\alpha x+\alpha y=\alpha(x+y)=f(x+y+f(x+y))$ and thus, by injectivity, $f(x+y)=f(x)+f(y)$. Since $f(x)^{2}=f\left(x^{2}\right)$, it is well known that $f$ is either the identity or the zero function.

Finally, if $\alpha=2, f(x)=x$ is the unique solution (the converse is clear), otherwise there is no solution.

It appeared during the course that another solution to the previous exercise exists, using a more or less classical functional equation (we used a particular case of Cauchy's equation) as follows: