If $f \bigl ( x - f ( y ) \bigr ) = f ( - x ) + \bigl ( f ( y ) - 2 x \bigr ) \cdot f ( - y )$ what is $f ( x )$

Determine all functions $$f : \mathbb R \to \mathbb R$$ such that $$f \bigl ( x - f ( y ) \bigr ) = f ( - x ) + \bigl ( f ( y ) - 2 x \bigr ) \cdot f ( - y )$$ for all $$x , y \in \mathbb R$$.

It's easy to see that $$f ( x ) = x ^ 2$$ is a function satisfying the above equation. Thus I thought it would be wise to first prove that $$f$$ is an even function. The best I did is to conclude that $$f \bigl ( - f ( y ) \bigr ) = f \bigl ( - f ( - y ) \bigr )$$. Then I tried to prove that $$f ( 0 ) = 0$$ but failed.

• The functional equation looks cleaner if we replace $f$ by $g : s \mapsto f(-s)$, and $x$ by $t+f(y)/2$. Commented Apr 25, 2016 at 20:24
• This functional equation has appeared on AOPS here and here. Each post has received a different elegant answer by the user pco. I posted an answer based on the one in the first link above. Commented Aug 15, 2023 at 5:28

It's straightforward to verify that $$f ( x ) = 0$$ and $$f ( x ) = x ^ 2 + a$$ for any constant $$a \in \mathbb R$$ satisfy $$f \bigl ( x - f ( y ) \bigr ) = f ( - x ) + \bigl ( f ( y ) - 2 x \bigr ) f ( - y ) \tag 0 \label 0$$ for all $$x , y \in \mathbb R$$. We show that these are the only solutions. For this, first note that for any $$y , z \in \mathbb R$$ if we have $$f ( y ) = f ( z )$$ then we also have $$f ( - y ) = f ( - z )$$, as can be seen by choosing $$x$$ in \eqref{0} such that $$f ( y ) \ne 2 x$$. For example, one can set $$x = \frac { f ( y ) - 1 } 2$$ in \eqref{0} to get $$f ( - y ) = f \left ( - \frac { 1 + f ( y ) } 2 \right ) - f \left ( \frac { 1 - f ( y ) } 2 \right )$$ for all $$y \in \mathbb R$$, which clearly has the desired property as a consequence. Letting $$a = f ( 0 )$$ and putting $$x = 0$$ in \eqref{0} we get $$f \bigl ( - f ( y ) \bigr ) = f ( y ) f ( - y ) + a \tag 1 \label 1$$ for all $$y \in \mathbb R$$. Substituting $$- y$$ for $$y$$ in \eqref{1} and comparing to \eqref{1} itself, we have $$f \bigl ( - f ( y ) \bigr ) = f \bigl ( - f ( - y ) \bigr )$$, and thus $$f \bigl ( f ( y ) \bigr ) = f \bigl ( f ( - y ) \bigr ) \tag 2 \label 2$$ for all $$y \in \mathbb R$$. Setting $$y = 0$$ in \eqref{0}, we get $$f ( x - a ) = f ( - x ) + a ( a - 2 x ) \tag 3 \label 3$$ for all $$x \in \mathbb R$$. Now, substituting $$- f ( y )$$ for $$x$$ in \eqref{3} we have $$f \bigl ( - f ( y ) - a \bigr ) = f \bigl ( f ( y ) \bigr ) + a \bigl ( a + 2 f ( y ) \bigr ) \text ,$$ while setting $$x = - a$$ in \eqref{0} gives $$f \bigl ( - a - f ( y ) \bigr ) = f \bigl ( a \bigr ) + \bigl ( f ( y ) + 2 a \bigr ) f ( - y )$$ for all $$y \in \mathbb R$$. Comparing the last couple of equations, we get $$f \bigl ( f ( y ) \bigr ) = 2 a \bigl ( f ( - y ) - f ( y ) \bigr ) + f ( y ) f ( - y ) + f ( a ) - a ^ 2 \tag 4 \label 4$$ for all $$y \in \mathbb R$$. Substituting $$- y$$ for $$y$$ in \eqref{4} and comparing to \eqref{4} itself, we get $$a \bigl ( f ( - y ) - f ( y ) \bigr ) = 0$$ for all $$y \in \mathbb R$$, using \eqref{2}. Now, if for some $$y \in \mathbb R$$ we had $$f ( - y ) \ne f ( y )$$, then we would have $$a = 0$$, which then contradicts \eqref{3}. Therefore, we must have $$f ( - y ) = f ( y )$$ for all $$y \in \mathbb R$$, which helps us rewrite \eqref{0} as $$f \bigl ( x - f ( y ) \bigr ) = f ( x ) + \bigl ( f ( y ) - 2 x \bigr ) f ( y ) \text , \tag 5 \label 5$$ and \eqref{1} as $$f \bigl ( f ( y ) \bigr ) = f ( y ) ^ 2 + a \text . \tag 6 \label 6$$ Substituting $$f ( x )$$ for $$x$$ in \eqref{5} and using \eqref{6}, we get $$f \bigl ( f ( x ) - f ( y ) \bigr ) = \bigl ( f ( x ) - f ( y ) \bigr ) ^ 2 + a \tag 7 \label 7$$ for all $$x , y \in \mathbb R$$. Now, if there is some $$b \in \mathbb R$$ with $$f ( b ) \ne 0$$, substituting $$\frac { x + f ( b ) ^ 2 } { 2 f ( b ) }$$ for $$x$$ and $$b$$ for $$y$$ in \eqref{5} we get $$f \left ( \frac { x + f ( b ) ^ 2 } { 2 f ( b ) } \right ) - f \left ( \frac { x - f ( b ) ^ 2 } { 2 f ( b ) } \right ) = x \text ,$$ which then substituting $$\frac { x + f ( b ) ^ 2 } { 2 f ( b ) }$$ for $$x$$ and $$\frac { x - f ( b ) ^ 2 } { 2 f ( b ) }$$ for $$y$$ in \eqref{7}, gives us $$f ( x ) = x ^ 2 + a$$ for all $$x \in \mathbb R$$. Therefore, the function $$f$$ must be of this form, unless it is the constant zero function.

• It took me a while to follow why $f(y)=f(z)$ implies $f(-y)=f(-z)$. Maybe you could write that part out. Commented Aug 15, 2023 at 6:39
• @aschepler I added a brief explanation in that regard. Commented Aug 15, 2023 at 21:54

This is a loose derivation.

Let $x = 0$, to have: $$f(-f(y))=f(0)+f(y)\cdot f(-y)$$ Let $y = -y$: $$f(-f(-y))=f(0)+f(-y)\cdot f(y)$$ So $f(-(f(y)) = f(-f(-y))$, I think this is sufficient to conclude that $f$ is even, by apply $f^{-1}$ on both sides and multiply $-1$.

Now with $f$ even, $$f(-f(y))=f(0)+f(y)\cdot f(y)$$ Let $f(y) = x$, we have: $$f(-x)=f(x)=f(0)+x^2$$

You can not determine what $f(0)$ is.

• Why do you think an inverse $f^{-1}$ exists? Are you aware that $y=-y$ implies $y=0$? Commented Apr 25, 2016 at 20:44
• @flawr That's why I said it's loose :-) By $y = -y$ what I meant is substitute $y$ by $-y$. Commented Apr 25, 2016 at 21:03
• Oh now I see what you did, perhaps you should switch the sign in the most rigth hand term of the second equation too (just for readability). Commented Apr 25, 2016 at 21:11
• @flawr, I see, updated. Commented Apr 25, 2016 at 21:21