>>11514747Differentiability is a brainlet assumption.
Assume f is continuous. I will prove that either:
a) f is the zero function.
b) f is of the form f(x)=x+f(0)
Proof:
1.f(-f(0))=0 so the image of f is (by the intermediate value theorem) some interval containing 0.
2. Assume f is not the zero function. W.l.o.g. If f(a)>0 for some a (the argument works the same for negative values).
3. f(a) + f(a) = f(f(a)+a) = 2a is in the image and similarly na is in the image for all natural numbers n, so the interval contains [0, infinity).
4. Let x>0. Take a s.t. f(a)=x. Then f(a)+f(0)=f(f(a)+0) <=> f(x)=x+f(0)
5. We want to prove that the range is whole of R:
Let b<0
Take a such that f(a)=-b.
Then f(a)+f(b)=f(f(a)+b)=f(0)
But as |b| grows, f(a) grows so f(b) must be negative for some b. Hence again by IVT we see that the range of f is the whole of R.
6. Repeating step 4 but now for all values of x shows f(x)=x+f(0).