. Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ satisfying for all $x, y$ real

$$
f(x+f(y))=f(x)+f(y)^{2}+2 x f(y)
$$
. First solution. The null function fits well, as does the function $f(x)=x^{2}+c$ where $c \in \mathbb{R}$ is a constant. Conversely, suppose that $f$ is non-zero and let $a \in \mathbb{R}$ such that $f(a) \neq 0$. By setting $y=a$, it follows for all $x \in \mathbb{R}, f(a+f(y))-f(x)=$ $f(a)^{2}+2 x f(a)$. Thus, for any real $t$ there exist real numbers $x$ and $y$ such that $f(x)-f(y)=t$. By setting $x=-f(y)$ this gives $f(-f(y))=f(y)^{2}+f(0)$. Finally, by replacing $x$ with $-f(x)$ and using the previous equality: $f(f(y)-f(x))=(f(y)-f(x))^{2}+f(0)$. According to the first point, we have $f(t)=t^{2}+f(0)$ for all real $t$.

Second solution. For $x=0$ we get $f(f(y))=f(y)^{2}+f(0)$ for all real $y$. By replacing $x$ with $f(x): f(f(x)+f(y))=(f(x)+f(y))^{2}+f(0)$. We can see the solutions $f(x)=x^{2}+c$ where $c$ is a constant. These functions are indeed solutions, as is the null function. We set $g(x)=f(x)-x^{2}$. The functional equation then becomes, after calculations:

$$
\text { for all real } x, y \quad g\left(x+g(y)+y^{2}\right)=g(x)
$$

In particular, for all real $x$:

$$
g\left(g(x)+x^{2}\right)=g(0)
$$

Let's reason by contradiction assuming that $g$ is not constant. Then there exists a real $a$ such that $g(a) \neq g(0)$. According to (III.12), for all real $x$ we have $g(x)+x^{2} \neq a$ and according to (III.11) for all real $x$ and $y: g(x)+x^{2} \neq a+g(y)+y^{2}$ or equivalently

$$
g(x)-g(y)+x^{2}-y^{2} \neq a
$$

We choose $x=y+g(u)+u^{2}$ where $u$ is arbitrary. Then for all $u, y$, according to (III.13): $(y+g(u)+$ $\left.u^{2}\right)^{2}-y^{2} \neq a$, or equivalently

$$
2 y\left(g(u)+u^{2}\right) \neq a-\left(g(u)+u^{2}\right)^{2}
$$

Since $f$ is not the null function, there exists $u$ such that $f(u) \neq 0$ and thus $g(u) \neq-u^{2}$. For this $u$, the equation $2 y\left(g(u)+u^{2}\right)=a-\left(g(u)+u^{2}\right)^{2}$ has a solution in $y$. Contradiction. Thus, $g$ is constant and consequently for all real $x$, we have $f(x)=x^{2}+c$ where $c$ is a constant.