Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that

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

for all real numbers $x, y$.
(Solved by Raphaël Ruimy and Moїse Blanchard)

$$
y^{2} f(x)+x^{2} f(y)+x y=x y f(x+y)+x^{2}+y^{2} \Leftrightarrow y^{2}(f(x)-1)+x^{2}(f(y)-1)=x y(f(x+y)-1)
$$

Let $g: x \rightarrow(x)-1$. Hence:

$$
y^{2} g(x)+x^{2} g(y)=x y g(x+y)
$$

For $y=1, g(x)+x^{2} g(1)=x g(x+1)$ Thus if $x \neq 0$,

$$
g(x+1)=x g(1)+g(x) / x
$$

For $x=0$, for any $y, y^{2} g(0)=0$. Therefore $g(0)=0$.

Let $g(1)=a$. Then:

$$
\begin{gathered}
g(1+1)=g(1)+g(1)=2 a \\
g(2+1)=2 g(1)+\frac{g(2)}{2}=3 a
\end{gathered}
$$

By quick induction, $g(n)=$ an with (3). Thanks to (2) and still by induction, we prove that $g\left(\frac{1}{2^{n}}\right)=\frac{a}{2^{n}}$. Let $(p, q) \in \mathbb{N}^{2}$. By taking $x=\frac{1}{2^{p}}$ and $y=\frac{1}{2^{q}}$ we find

$$
g\left(\frac{1}{2^{p}}+\frac{1}{2^{q}}\right) \times \frac{1}{2^{p}} \times \frac{1}{2^{q}}=\frac{1}{2^{2 q}} \times \frac{a}{2^{p}}+\frac{1}{2^{2 p}} \times \frac{a}{2 q} \Leftrightarrow g\left(\frac{1}{2^{p}}+\frac{1}{2^{q}}\right)=a\left(\frac{1}{2^{p}}+\frac{1}{2^{q}}\right)
$$

Any rational number $r$ in $[0,1]$ can be written in the form $: r=\sum_{i=1} a_{i} \frac{1}{2^{i}}$. By repeating (4), we find $g(r)=r$. Since $\mathbb{Q}$ is dense on $[0,1]$, we have $g(x)=a x$ on $[0,1]$. By writing any positive real number as the sum of its integer part and its decimal part: $x=n+r$, we find

$$
g(n+r) * n * r=n^{2} g(r)+r^{2} g(n)=n^{2} a r+r^{2} a n \Leftrightarrow g(n+r)=a(n+r)
$$

Finally, with $y=-x$ in (2), we find $g(-x)=-g(x)=a(-x)$. Conversely, the function g works.

Ultimately, $\forall x \in \mathbb{R}, g(x)=a x$ thus $f(x)=a x-1$.