Exercise 8. Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that there exists a real number $A$ satisfying $A > f(x)$ for all $x \in \mathbb{R}$, and such that for all real numbers $x, y$, we have:

$$
f(x f(y)) + y f(x) = x f(y) + f(x y)
$$
Solution to Exercise 8 The zero function is clearly a solution. Suppose now that $\mathrm{f}$ is not zero everywhere on $\mathbb{R}$.

By setting $x=0$, we have $y f(0)=f(0)$ for all real $y$ so $f(0)=0$. By setting $y=1$, we have $f(x f(1))=x f(1)$ for all real $x$, so if $f(1) \neq 0$, we contradict the statement by choosing $x=\frac{A}{f(1)}$. Therefore, $f(1)=0$. By setting $x=1$, we have $f(f(y))=2 f(y)$. Suppose there exists $z$ such that $f(z)>0$. By composing $z \cap$ times by $\mathrm{f}$, for $n \geqslant 0$, we find $f(\ldots f(z) \ldots)=2^{n} f(z)$. For $n$ large enough, $2^{n} f(z)>A$, contradiction. Therefore, for all $x \in \mathbb{R}, f(x) \leqslant 0$.

If $f(y)=0$ for some $y \neq 0$, then $y f(x)=f(x y)$ for all real $x$. If $x$ is such that $f(x) \neq 0$, $f(x y) \neq 0$. Therefore, $f(x)$ and $f(x y)$ have the same sign according to the previous paragraph, so $y>0$. It follows that $\mathrm{f}$ is strictly negative on $\mathbb{R}_{-}^{*}$.

Take $x \neq 0$ and $y=\frac{1}{x}$ in the initial equation. We get

$$
f\left(x f\left(\frac{1}{x}\right)\right)+\frac{f(x)}{x}=x f\left(\frac{1}{x}\right)
$$

By swapping $x$ and $\frac{1}{x}$, we get

$$
f\left(\frac{f(x)}{x}\right)+x f\left(\frac{1}{x}\right)=\frac{f(x)}{x}
$$

By adding these two equalities, we arrive at

$$
f\left(\frac{f(x)}{x}\right)+f\left(x f\left(\frac{1}{x}\right)\right)=0
$$

since $\mathrm{f}$ takes negative values, so $\mathrm{f}\left(\frac{\mathrm{f}(\mathrm{x})}{\mathrm{x}}\right)=\mathrm{f}\left(\mathrm{xf}\left(\frac{1}{\mathrm{x}}\right)\right)=0$ for all $x \neq 0$.

If $x>0, \frac{f(x)}{x} \neq 0$, so $\frac{f(x)}{x}=0$, i.e., $f(x)=0$ (we recall that $f$ is strictly negative on $\mathbb{R}_{-}^{*}$). By taking $y>0$ in the initial equation, we have $y f(x)=f(x y)$ for all $x \in \mathbb{R}$. In particular, for $x=-1$, we get $f(-y)=y f(-1)$ and $f$ is linear on $\mathbb{R}_{-}$. Therefore, for $y<0$, since $f(y)<0$,
we have $f(f(y))=-f(-1) f(y)$. With $x=1$ in the initial equation, we get $f(f(y))=2 f(y)$, so $f(-1)=2$.

Thus, $f(x)=2 x$ if $x<0$ and 0 otherwise. We quickly verify that it satisfies the initial equation. We thus have two functions that solve the problem, along with the zero function.