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

$$
f(y - xy) = f(x) y + (x-1)^2 f(y).
$$

(Pavel Calábek)
Solution. By substituting $x=1$, we get that for all real $y$, $f(0)=f(1) y$, hence necessarily $f(0)=f(1)=0$. Substituting $y=1$ into the given equation then for each $x$ we get

$$
f(1-x)=f(x)
$$

Let $t$ be any real number, substituting $x=1-t$ we get

$$
f(t y)=f(1-t) y+t^{2} f(y)=f(t) y+t^{2} f(y)
$$

for each real $y$. By swapping the variables $t$ and $y$, we further obtain

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

so $f(t)\left(y^{2}-y\right)=f(y)\left(t^{2}-t\right)$, which for $y=2$ gives

$$
f(t)=\frac{1}{2} f(2)\left(t^{2}-t\right), \quad t \in \mathbb{R}
$$

Substituting into the original equation from the problem, we can easily verify that the constant $a=f(2) / 2$ in the derived formula $f(x)=a x(x-1)$ can be any real number:

$$
\begin{aligned}
f(x) y+(x-1)^{2} f(y) & =a x(x-1) y+(x-1)^{2} a y(y-1)= \\
& =a(x-1) y(x+x y-x-y+1)= \\
& =a(1-x) y((1-x) y-1)=f((1-x) y)=f(y-x y) .
\end{aligned}
$$