How can I prove that a function is uniquely differentiable?
Solution 1:
There is a "standard" trick to proving uniqueness in analysis. It consists in showing (or immediately using) that two functions $f$ and $g$ with certain properties have the same derivative, and thus differ only by an additive constant, and then showing that this constant is $0$.
In this specific example it goes like this: Let $g:\mathbb R\to\mathbb R$ be another differentiable function with $g'(x)=a$ for all $x\in\mathbb R$ and $g(0)=b$. Then $$(f-g)'(x)=f'(x)-g'(x)=a-a=0,$$ so $f-g$ is a constant function. But since $f(0)-g(0)=b-b=0$, it must be zero. So we actually have $f=g$.
This shows that any function satisfying your desired properties is equal to $f$.