4A. Determine all real functions $f$ defined for every real number $x$, such that $f(x) + x f(1-x) = x^2 - 1$.
Solution. Let $f$ be a function that satisfies the equation. If we introduce the substitution $1-x=t$, we get $f(1-t)+(1-t) f(t)=t^{2}-2 t$.

We will multiply the last equation by $t$ and form the system

$$
\left\{\begin{array}{l}
t f(1-t)+\left(t-t^{2}\right) f(t)=t^{3}-2 t^{2} \\
f(t)+t f(1-t)=t^{2}-1
\end{array}\right.
$$

If we subtract the first equation from the second equation, we get:

$$
f(t)\left(t^{2}-t+1\right)=-t^{3}+3 t^{2}-1
$$

from which we obtain $f(t)=\frac{-t^{3}+3 t^{2}-1}{t^{2}-t+1}$.

It is not difficult to verify the converse, i.e., that the function $f(x)=\frac{-x^{3}+3 x^{2}-1}{x^{2}-x+1}$ satisfies the given equation.