How can I prove that a function is uniquely differentiable? Say that we have function $f: \mathbb{R} \to \mathbb{R}$ and it is differentiable for all real values. Also, with $a,b \in \mathbb{R}$, the following is also true: $f'(x)=a$ for all $x$ and $f(0)=b$. Then, I am asked to find $f$ and prove that it is the only unique differentiable function with these properties.
I think it would be a good idea to use this proposition: If $f: [a,b] \to \mathbb{R}$ is differentiable, and for each $x \in [a,b], f'(x) = 0$, then $f$ is a constant function. So it seems that $f$ is $f(x) = ax + b$ where its derivative is constant for some $a$. But how can I utilize the $b$ to conclude that this is unique for $f$?
 A: 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$.
A: Suppose, for the sake of contradiction, that $f$ is not unique; thatis, there exists a function $g$ such that $g'(x) = a$ for all $x$, $g(0) = b$, but there eixsts a $z$ such that $g'(z) \neq f(z)$ (which means $g$ is different from $f$ but has all the same properties). Since $f'(x) = g'(x) = a$ for all $x$, we know $f-g'(x) = 0$ for all $x$. Then observe that by the Mean Value Theorem, we have
$$ \frac{f(z)-g(z) - (f(0)-g(0))}{z-0} = 0$$
But $f(0) = g(0) = b$ so $f(0) - g(0) = 0$. Thus, we have
$$ \frac{f(z)-g(z)}{z} = 0$$
or
$$ f(z) - g(z) = 0 $$
which implies $f(z) = g(z)$, and hence a contradiction.
