The functional equation $ f \big( x - f ( y ) \big) = f \big( f ( y ) \big) + x f ( y ) + f ( x ) - 1 $
I came across the functional equation $$ f \big( x - f ( y ) \big) = f \big( f ( y ) \big) + x f ( y ) + f ( x ) - 1 \text . $$
So far I tried plugging $ x = f ( y ) $ and got $ f ( x ) = \frac { f ( 0 ) - x ^ 2 + 1 } 2 $ which holds for every $ x $ that is equal to $ f ( y ) $ for some $ y $. I suppose that $ f ( 0 ) = 1 $ and $ f ( x ) = 1 - \frac { x ^ 2 } 2 $, which would be true if I prove that $ f $ is surjective, which I still haven't proven. Could anybody help me?
You can show that the only function $ f : \mathbb R \to \mathbb R $ satisfying $$ f \big( x - f ( y ) \big) = f \big( f ( y ) \big) + x f ( y ) + f ( x ) - 1 \tag 0 \label 0 $$ for all $ x , y \in \mathbb R $ is $ f ( x ) = 1 - \frac { x ^ 2 } 2 $. It's straightforward to check that this function indeed satisfies \eqref{0}. We prove the converse.
Let $ c = f ( 0 ) $ and put $ y = 0 $ in \eqref{0} to get $$ f ( x - c ) - f ( x ) = c x + f ( c ) - 1 \text . \tag 1 \label 1 $$ In particular, setting $ x = 0 $ in \eqref{1}, we have $ f ( - c ) - c = f ( c ) - 1 $, which shows that $ c $ cannot be equal to $ 0 $. This mean that the right-hand side of \eqref{1} is a surjective function, and thus for any $ x \in \mathbb R $, there are $ a _ x , b _ x \in \mathbb R $ such that $ f ( a _ x ) - f ( b _ x ) = x $. Also, letting $ x = f ( y ) $ in \eqref{0} we have $$ f \big( f ( y ) \big) = \frac { c + 1 - f ( y ) ^ 2 } 2 \text . \tag 2 \label 2 $$ Now, we can substitute $ f ( a _ x ) $ for $ x $ and $ b _ x $ for $ y $ in \eqref{0}, and use \eqref{2} to get $$ f \big( f ( a _ x ) - f ( b _ x ) \big) = f \big( f ( a _ x ) \big) + f ( a _ x ) f ( b _ x ) + f \big( f ( b _ x ) \big) - 1 = \\ \frac { c + 1 - f ( a _ x ) ^ 2 } 2 + f ( a _ x ) f ( b _ x ) + \frac { c + 1 - f ( b _ x ) ^ 2 } 2 - 1 = c - \frac { \big( f ( a _ x ) - f ( b _ x ) \big) ^ 2 } 2 \text , $$ or equivalently $$ f ( x ) = c - \frac { x ^ 2 } 2 \text . \tag 3 \label 3 $$ Finally, we can set $ x = f ( y ) $ in \eqref{3} and compare the result to \eqref{2} and see that $ c = 1 $, which implies $ f ( x ) = 1 - \frac { x ^ 2 } 2 $ for all $ x \in \mathbb R $.