### Instruction: Let $f : \mathbb{R} \to \mathbb{R}$ be a function such that
\[f(f(x - y)) = f(x) f(y) - f(x) + f(y) - xy\]for all $x,$ $y.$  Find the sum of all possible values of $f(1).$.### Response: I notice that this is a functional equation, so I want to find a way to simplify it or get some information about $f(x)$ by plugging in special values of $x$ and $y.$
One thing I can try is to set $x = y,$ which gives me \[f(f(0)) = f(x)^2 - f(x) + f(x) - x^2\] or \[f(f(0)) = f(x)^2 - x^2.\]
This looks interesting, because it means that $f(f(0))$ is constant, regardless of what $x$ is.
Let me call this constant $c,$ so $f(f(0)) = c.$
Then I have \[c = f(x)^2 - x^2\] or \[f(x) = \pm \sqrt{x^2 + c}.\]
This means that $f(x)$ is either the positive or negative square root of $x^2 + c,$ for some constant $c.$
I can try to find $c$ by plugging in another special value, say $x = 0.$
This gives me \[f(f(0)) = f(0)^2\] or \[c = f(0)^2.\]
So I have $f(x) = \pm \sqrt{x^2 + f(0)^2}.$
Now I can find $f(1)$ by plugging in $x = 1.$
This gives me \[f(1) = \pm \sqrt{1 + f(0)^2}.\]
Since $f(0)$ is a constant, $f(1)$ can only have two possible values, depending on the sign of the square root.
The sum of these two values is \[f(1) + (-f(1)) = 0.\]