Fixing a demonstration that a differentiable function whose derivative is nowhere $1$ has at most one fixed point. Suppose that $f:\mathbb{R}\rightarrow\mathbb{R}$ is a differentiable function such that $f'(x)\neq 1$ for all real $x$. We want to prove that if $f$ has a fixed point $x_0$ then it is unique. I came up with the following proof:
$f'$ is continuous* therefore if $f(p)>1$ and $f(q)<1$ then by the intermediate value theorem there's a point between $p$ and $q$ where $f'(x)=1$, contradicting the hypothesis. Therefore $f'$ is either greater or smaller than $1$ for all real $x$. For the first case:
We can write $f(x)=x_0+\int_{x_0}^x f'(x)dx$ and if $x>x_0$,
$$f(x)>x_0+\int_{x_0}^x 1dx=x$$
so $f(x)>x$ and there can be no fixed points greater than $x_0$ and in the case where $x<x_0$ we find that $f(x)<x$. The case for $f'(x)<1$ is analogous.
*this is the problem with the proof. We don't necessarily know that $f'$ is continuous, but I haven't been able to find a counterexample to this either. That is, a function that is differentiable on the entire real line, but whose derivative isn't continuous. So, is it possible to fix the proof? I am aware of the proof using the mean value theorem, but I still wanted to have a proof in this mold. I like this idea because I think it has a nice intuition like "either $f$ grows faster or slower than the identity function therefore they can only cross once".
 A: If there existed $\;a,\;b\in\mathbb R\;(\text{without loss of generality } a<b)$ such that $\;f’(a)<1\;$ and $\;f’(b)>1\;,\;$ then the function $\;g(x)=f(x)-x:[a,b]\to\mathbb R\;$ would have $\;g’(a)<0\;$ and $\;g’(b)>0\;,\;$ consequently the point $\;c\;$ such that $\;g(c)=\min\limits_{x\in [a,b]}g(x)\;$ could be neither $\;a\;$ nor $\;b\;$, therefore $\;c\in (a,b)\;$, hence $\;g’(c)=0\;$ and $\;f’(c)=1\;,\;$ but it is a contradiction because $\;f’(x)\ne1\;$ for any $\;x\in\mathbb R\;.$
So, it results that $\;f’(x)<1\;$ for all $\;x\in\mathbb R\;$ or $\;f’(x)>1\;$ for all $\;x\in\mathbb R\;.$
Without loss of generality, we can suppose that
$\;f’(x)<1\;$ for all $\;x\in\mathbb R\;.$
We consider the function $\;g(x)=f(x)-x:\mathbb R\to\mathbb R\;.$
It results that $\;g’(x)<0\;$ for any $\;x\in\mathbb R\;,\;$ hence the function $\;g(x)\;$ is monotonically decreasing on $\;\mathbb R\;.$
Consequently if there exists $\;x_0\in\mathbb R\;$ such that $\;f\left(x_0\right)=x_0\;,\;$ then $\;g(x_0)=0\;$ and $\;g(x)\ne0\;$ for all $\;x\in\mathbb R\;\land\;x\ne x_0\;,$
hence,
$f(x)\ne x\;$ for all $\;x\in\mathbb R\;\land\;x\ne x_0\;,$
and it means that $\;x_0\;$ is the unique fixed point of $\;f(x)\;.$
A: Another way to prove the statement assuming $f'$ is continuous, is letting $G(x) = f(x)-x$, then $f'\neq 1$ assures that $G$ is monotone and hence inyective, so in case there exists a fixed point it is unique. I'm feeling that the hypothesis that $f'$ is continuous is also necessary, for a counter example maybe it is possible to construct a function $f$ such that $f(0)>0$ and $f'(x)<1$ for $x>0$ and $f'(x)>1$ for $x<0$, this would ensure that $f$ cuts the identity function on both sides of the real line. I believe this can be done by glueing adequate functions but maybe I'm wrong.
*By the comments below it follows that a function like what I proposed would not be differentiable at $x=0$ (because in other case applying the Darboux theorem would yield $f'(x)=1$ for some $x$), thus violating the hypothesis of the problem and hence being no such counter example.
A: Assume that $f$ has two different fixed points $a<b$. The mean value theorem applied to $g(x):=f(x)-x$ on $[a.b]$ yields some $\xi \in (a,b)$ such that
$$
0=\frac{g(b)-g(a)}{b-a}=g'(\xi)=f'(\xi)-1,
$$
a contradiction.
