## Task A-4.2.

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

$$
f(x) + x f(2 - x) = 3x - x^2
$$
## Solution.

By substituting $x=1$, we get $f(1)+f(1)=2$, from which we conclude that $f(1)=1$.

Furthermore, let $x \neq 1$. By substituting $2-x$ for $x$, we get:

$$
f(2-x)+(2-x) f(x)=3 \cdot(2-x)-(2-x)^{2}=2+x-x^{2}
$$

Multiply this equation by $x$ and subtract the resulting equation from the given one. We get:

$$
(x-1)^{2} f(x)=x(x-1)^{2}
$$

We conclude that for every $x \neq 1$, it is necessary that $f(x)=x$, and at the beginning, we showed that $f(1)=1$. Therefore, the only candidate for the solution is the function $f(x)=x$.

By verification, we confirm that this is indeed the solution.