Are all continuous one one functions differentiable?

I was reading about one one functions and found out that they cannot have maxima or minima except at endpoints of domain. So their derivative , if it exists, must not change it sign , i.e. , the function should be either strictly increasing or strictly decreasing. From this I've a feeling that all continuous one one functions must be differentiable . Is this true?


Not by a long shot. Take, for example, the function

$$f(x) = \begin{cases}x & x\leq 0\\ 2x & x\geq 0\end{cases}$$

Which is continuous and one-to-one on $\mathbb R$, but is not differentiable at $0$.

This is of course just one example, but in general, any time you "stick" two functions together at a point where their derivatives are not equal, like in my example, you can cause the resulting function to have a point at which it is not differentiable.


enter image description here

$x^{1/3}$ is not differentiable at $0$. See its graph above. It's qualitatively different from the example given by 5xum.

The Cantor function $ +\, x$ is an example of a function that's continuous and one-to-one, but non-differentiable at uncountably many points.

There's a limit to how bad an example can get. The set of points where a continuous one-to-one functions is non-differentiable always has Lebesgue measure $0$.