Determining all the functions $f:\mathbb{R}\to\mathbb{R}$ with the property $f\bigl(x-f(y)\bigr) f\bigl(f(x)+y\bigr)=x f(x) - y f(y)$ [closed]

It's straightforward to verify that the constant zero function, the identity function and the negation function are all solutions to the functional equation $$ f \bigl ( x - f ( y ) \bigr ) f \bigl ( f ( x ) + y \bigr ) = x f ( x ) - y f ( y ) \tag 0 \label 0 $$ over $ \mathbb R $. We prove that any $ f : \mathbb R \to \mathbb R $ satisfying \eqref{0} for all $ x , y \in \mathbb R $ is of one of those forms. Letting $ y = x $ in \eqref{0}, we have $$ f \bigl ( x - f ( x ) \bigr ) f \bigl ( f ( x ) + x \bigr ) = 0 \tag 1 \label 1 $$ for all $ x \in \mathbb R $. For any $ x \in \mathbb R $, if $ f \bigl ( x - f ( x ) \bigr ) = 0 $, then setting $ y = x - f ( x ) $ in \eqref{0}, we get $ f ( x ) \bigl ( f ( x ) - x \bigr ) = 0 $. Similarly, for any $ y \in \mathbb R $, if $ f \bigl ( f ( y ) + y \bigr ) = 0 $, then letting $ x = f ( y ) + y $ in \eqref{0}, we get $ f ( y ) \bigl ( f ( y ) + y \bigr ) = 0 $. Combining these with \eqref{1}, we get $$ f ( x ) \bigl ( f ( x ) - x \bigr ) \bigl ( f ( x ) + x \bigr ) = 0 \tag 2 \label 2 $$ for all $ x \in \mathbb R $. In particular, we get $ f ( 0 ) = 0 $ by putting $ x = 0 $ in \eqref{2}. Letting $ y = 0 $ in \eqref{0}, we can see that $$ f ( x ) \ne 0 \implies f \bigl ( f ( x ) \bigr ) = x \tag 3 \label 3 $$ for all $ x \in \mathbb R $. Also, setting $ x = 0 $ in \eqref{0}, we have $$ f ( y ) \ne 0 \implies f \bigl ( - f ( y ) \bigr ) = - y $$ for all $ y \in \mathbb R $, applying $ f $ to both sides of which, we get $$ f ( y ) \ne 0 \implies f ( - y ) = - f ( y ) \tag 4 \label 4 $$ for all $ y \in \mathbb R \setminus \{ 0 \} $, using \eqref{3}. \eqref{4} implies $ f ( - y ) \ne 0 \iff f ( y ) \ne 0 $ for all $ y \in \mathbb R \setminus \{ 0 \} $, which then using \eqref{4} and $ f ( 0 ) = 0 $, implies that $ f $ is an odd function.

Now, assume that there is $ a \in \mathbb R \setminus \{ 0 \} $ with $ f ( a ) \ne 0 $. Then, $ 0 $ will be the only $ y \in \mathbb R $ for which $ f ( y ) = 0 $. To see this, assume $ f ( y ) = 0 $ and let $ x = a $ in \eqref{0} to get $ f \bigl ( f ( a ) + y \bigr ) = a $, and using \eqref{3} conclude $$ f ( a ) + y = f \Bigl ( f \bigl ( f ( a ) + y \bigr ) \Bigr ) = f ( a ) \text . $$ This, together with \eqref{2} shows $ f ( x ) \in \{ - x , x \} $ for all $ x \in \mathbb R \setminus \{ 0 \} $. Equivalently, we have $ f ( x ) \in \{ - k x , k x \} $ for all $ x \in \mathbb R \setminus \{ 0 \} $, where $ k = \frac { f ( a ) } a \in \{ - 1 , 1 \} $. Note that $ f ( k x ) = k f ( x ) $ for all $ x \in \mathbb R $, since $ f $ is odd, and also $ f ( x ) ^ 2 = x ^ 2 $ for all $ x \in \mathbb R $. Now, if $ f ( x ) = - k x $ for some $ x \in \mathbb R \setminus \{ 0 \} $, then using \eqref{0} and \eqref{3} we get \begin{align*} k a ^ 2 + 2 k a x + k x ^ 2 & = k ( a + x ) ^ 2 \\ & = k f ( a + x ) ^ 2 \\ & = f \bigl ( k ( a + x ) \bigr ) f ( a + x ) \\ & = f \bigl ( k a - ( - k x ) \bigr ) f ( a + x ) \\ & = f \bigl ( f ( a ) - f ( x ) \bigr ) f \Bigl ( f \bigl ( f ( a ) \bigr ) + x \Bigr ) \\ & = f ( a ) f \bigl ( f ( a ) \bigr ) - x f ( x ) \\ & = ( k a ) a - x ( - k x ) \\ & = k a ^ 2 + k x ^ 2 \text , \end{align*} which leads to a contradiction. As we also have $ f ( 0 ) = k \cdot 0 $, we must have $ f ( x ) = k x $ for all $ x \in \mathbb R $. Therefore, the only nonzero solutions of \eqref{0} over $ \mathbb R $ are the identity function and the negation function.