Find all continuous functions over reals such that $f(x)+f(y) = f(x+y)-xy-1$ for all $x,y \in \mathbb{R}$.
I saw first that $f(0) = -1$ but then I am struggling to see how to get a formula for $f(x)$. If I do $x = 0$ we get $f(0) + f(x) = f(x)-1$ which doesn't really help. Is there a better way to get a formula for $f(x)$ here?
Let $g(x) = f(x) + 1-x^2/2$. Then $g$ is continuous and
$$g(x+y) = g(x) + g(y)$$
The only functions with those properties (continuous and additive) are those of the form $g(x) = ax$, for $a \in \mathbb{R}$. (See Continuous and additive implies linear )
Hence $f(x) = -1+ax + \frac{x^2}{2}$ for some constant $a$.
EDIT: Why that $g$? First, $xy = \frac{1}{2} (x+y)^2 - \frac{1}{2}x^2 - \frac{1}{2} y^2$, so the relation can be written as
$$f(x) - \frac{1}{2}x^2 + f(y) - \frac{1}{2} y^2 = f(x+y) - \frac{1}{2}(x+y)^2 -1. $$
If $h(x) = f(x) -\frac{1}{2} x^2$, then
$$h(x)+h(y) = h(x+y) -1.$$
There are two $h$ on the left and only one on the right, and the balance is $-1$. So if we define $g(x) = h(x) +1$, then
$$g(x)-1 + g(y) -1 = g(x+y)-1 -1.$$