Find all $f : \mathbb R\to\mathbb R$ such that
$$f(f(x+y)) = f(x+y) + f(x)f(y) -xy$$ for all reals $x,y.$ (Belarusian Mathematical Olympiad-1995)
My answer:
Consider $f(0) = c. ...(i)$
Let $x,y = 0$ at first.
$$f(f(x+y)) = f(x+y) + f(x)f(y) -xy$$ $$\implies f(f(0+0)) = f(0+0) + f(0)f(0) -0 \times 0$$ $$\implies f(f(0)) = f(0) + f(0)f(0) + 0$$ $$\implies f(c) = c + c \times c + 0$$ $$\implies f(c) = c + c^2$$ $$\implies f(c) - c = c^2 ...(ii)$$
Now, let $y = -x.$
Therefore, $$f(f(x+y)) = f(x+y) + f(x)f(y) -xy$$ $$\implies f(f(x-x)) = f(x-x) + f(x)f(y) -(x\times -x)$$ $$\implies f(f(0)) = f(0) + f(x)f(-x) + x^2$$ $$\implies f(c) = c + f(x)f(-x) + x^2$$ $$\implies f(c)-c = f(x)f(-x) + x^2$$
From $..(ii),$
Therefore, $$c^2 = f(x)f(-x) + x^2$$
Now, let $x = c$
$$Therefore, c^2 = f(x)f(-x) + c^2$$ $$\implies c^2 - c^2 = f(c)f(-c)$$ $$\implies 0 = f(c)f(-c)$$
Hence,
$f(c) = 0 ...(iii)$
$f(-c) = 0 ...(iv)$
Multiplying $(i) and (iii),$ $$f(0) \times f(c) = c \times 0$$ $$\implies f(0) \times f(c) = 0$$ $$\implies f(0) = 0$$ $$\implies c = 0$$
Similarly, Multiplying $(i) and (iv)$
$\implies c = 0$
Hence $c = 0.$
But $f(c) = 0,$
Therefore, $f(c) = c$
I can't go further than that can anyone help me out.
$$f(f(x+y))=f(x+y)+f(x)f(y)-xy$$
As mentioned above, I have assumed $f(0)=c$ for some real $c$.