## Task A-4.1.

Determine all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that for all real numbers $x$ and $y$,

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

By substituting $x=y=0$ into the given equation, we obtain

$$
f(0)^{2}=0, \quad \text { i.e. } \quad f(0)=0
$$

By substituting $x=y=1$ into the given equation, we obtain

$$
f(1)(1+f(1))=2 f(1), \quad \text { i.e. } \quad f(1)^{2}=f(1)
$$

We distinguish two cases: $f(1)=0$ or $f(1)=1$.

If $f(1)=0$, by substituting $x=1$ into the initial equation, we obtain that for every $y \in \mathbb{R}$,

$$
f(y)(1+f(y))=f(y), \quad \text { i.e. } \quad f(y)=0
$$

If $f(1)=1$, by substituting $y=1$ into the initial equation, we obtain that for every $x \in \mathbb{R}$,

$$
f(x)(x+1)=x^{2}+f(x), \quad \text { i.e. } \quad x f(x)=x^{2}
$$

For $x \neq 0$, dividing by $x$ gives $f(x)=x$.

Since $f(0)=0$ as well, it follows that $f(x)=x$ for every $x \in \mathbb{R}$.

By substitution, we see that the functions $f(x)=0$ and $f(x)=x$ indeed satisfy the initial equation, and these are the solutions we seek.