Find the functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that, for all $x, y$ we have

$$
f(x-f(y))=f(f(y))+x f(y)+f(x)-1
$$
Let $c=f(0)$. Let $z \in \operatorname{Im}(f)$, and $y$ such that $z=f(y)$. For $x=z$ we have

$$
c=f(z-z)=f(z)+z^{2}+f(z)-1
$$

This gives $\mathrm{f}(z)=\frac{1}{2}\left(c-z^{2}+1\right)$ for all $z \in \operatorname{Im}(f)$. We are tempted to set $z=0$ and obtain $c=1$, but we do not know if $0 \in \operatorname{Im}(f)$. By setting $x=y=0$ in (III.5) we get $c \neq 0$. We set $y=0$ in (III.5) and see that any real number is the difference of two elements of the image:

$$
x=\frac{f(x-c)-f(c)-f(x)+1}{c}
$$

Let $z$ be a real number and $\mathrm{y}_{1}, \mathrm{y}_{2}$ such that $z=\mathbf{f}\left(\mathbf{y}_{1}\right)-\mathrm{f}\left(\mathrm{y}_{2}\right)$. We denote $\mathbf{u}=\mathbf{f}\left(\mathbf{y}_{1}\right)$ and $v-\mathrm{f}\left(\mathrm{y}_{2}\right)$. We inject $f\left(y_{1}\right)$ and $y_{2}$ into (III.5) and find

$$
f\left(f\left(y_{1}\right)-f\left(y_{2}\right)\right)-f\left(f\left(y_{1}\right)\right)+f\left(y_{1}\right) f\left(y_{2}\right)+f\left(f\left(y_{2}\right)\right)-1
$$

Since we know the expression of $f(u)$ for all $u \in \operatorname{Im}(f)$, we find $f(z)=c-\frac{z^{2}}{2}$. By comparing with the expression $\mathrm{f}(z)=\frac{1}{2}\left(c-z^{2}+1\right)$ for all $z \in \operatorname{Im}(f)$, we deduce that $\mathbf{c}=1$. The only possibility is therefore $f(z)=1-\frac{z^{2}}{2}$, which is indeed a solution to the equation.