## Task 1.

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

$$
x f(x) - y f(y) = (x - y)(f(x + y) - xy)
$$
## Solution.

Let $P(x, y)$ denote the equation $x f(x)-y f(y)=(x-y)(f(x+y)-x y)$.

The equation $P(x, 1)$ is $x f(x)-f(1)=(x-1)(f(x+1)-x)$, from which we have

$$
x f(x)-(x-1) f(x+1)=f(1)-x(x-1), \quad \forall x \in \mathbb{R}
$$

On the other hand, $P(x+1,-1)$ is $(x+1) f(x+1)+f(-1)=(x+2)(f(x)+x+1)$, from which it follows that

$$
(x+2) f(x)-(x+1) f(x+1)=f(-1)-(x+1)(x+2), \quad \forall x \in \mathbb{R}
$$

Equations (1) and (2) form a system of two linear equations with unknowns $f(x)$ and $f(x+1)$, and by eliminating $f(x+1)$, we obtain

$$
f(x)=x^{2}+\frac{f(1)-f(-1)}{2} x+(f(1)+f(-1)-1), \quad \forall x \in \mathbb{R}
$$

By introducing the notation $b=\frac{f(1)-f(-1)}{2}$ and $c=f(1)+f(-1)-1$, we get $f(x)=x^{2}+b x+c, \forall x \in \mathbb{R}$, where $b, c \in \mathbb{R}$. Direct verification shows that every function of this form is indeed a solution.