## T-2 A

Let $\mathbb{R}$ denote the set of real numbers. Determine all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that

$$
f(x) f(y)=x f(f(y-x))+x f(2 x)+f\left(x^{2}\right)
$$

holds for all real numbers $x$ and $y$.

Answer. There are two solutions:

$$
f: \mathbb{R} \rightarrow \mathbb{R}: x \mapsto 0, \quad g: \mathbb{R} \rightarrow \mathbb{R}: x \mapsto 3 x
$$


Solution. We set $x=0$ and get $f(0) f(y)=f(0)$, so $f(0)=0$ or $f(y)=1$ for all $y$. The latter leads to a contradiction.

We set $y=x+z$ and get

$$
f(x) f(x+z)=x f(f(z))+x f(2 x)+f\left(x^{2}\right)
$$

for all $x$ and $z$. Setting $z=0$ yields

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

We set $C=f(1)$. For $x=1$ and $x=2$, we get $f(2)=C(C-1)$ and $f(4)=C^{2}(C-1)^{2} / 3$, respectively.

If $C=0$, so (1) with $x=1$ yields $f(f(z))=f(2)=0$, so (1) reads $f(x) f(x+z)=x f(2 x)+f\left(x^{2}\right)$ for all $z$, which implies that $f(x)=0$ for all $x$.

Setting $x=1$ and $x=2$ in (1) leads to

$$
\begin{aligned}
C f(z+1) & =f(f(z))+C^{2} \\
C(C-1) f(z+2) & =2 f(f(z))+C^{2}(C-1)^{2}
\end{aligned}
$$

Eliminating $f(f(z))$ and division by $C \neq 0$ leads to

$$
(C-1) f(z+2)-2 f(z+1)=C\left(C^{2}-2 C-1\right)
$$

for all $z$. Setting $z=-1$ leads to $C(C-1)=C\left(C^{2}-2 C-1\right)$. In view of $C \neq 0$, this implies $C=3$. Inserting this in (3), dividing by 2 and shifting $z$ leads to

$$
f(z+1)-f(z)=3
$$

for all $z$.

We set $z=1$ in (1) and get

$$
f(x)(f(x)+3)=9 x+x f(2 x)+f\left(x^{2}\right)
$$

Together with (2), we get $3 f(x)=9 x$, i.e., $f(x)=3 x$ for all $x$.

Both $f(x)=3 x$ and $f(x)=0$ are solutions.
