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.

• This one is good. But it doesn't "feel" good enough. I mean, your function is not differentiable on $\Bbb R$, but it's still differentiable almost everywhere. Apr 14 '15 at 8:54
• No, an increasing function is differentiable a.e.
– zhw.
Apr 14 '15 at 9:10
• To me, "not by a long shot" does not mean "the counterexample is simple and easy to find'; rather, it means "the assertion is very far from the truth". There is no need to tell the OP that his "feeling" was totally wrong, when in fact his intuition was mostly right, in that a strictly monotone continuous function is differentiable almost everywhere. And, regardless of how wrong someone's conjecture may be, there is no need to intruduce the refutation with "hell no!" or "of course not!".
– bof
Apr 14 '15 at 9:45
• @bof It was in no way meant as an insult to the OP when I wrote "not by a long shot". It is just my way of saying "no, and look, here is a very simple counterexample". As far as "being close to the truth" is concerned, a statement is either true or false, there is no "close" to being true. We can, arbitrarily, define the closeness, but then I say "'close' to me means hard to find a counterexample", so this statement is "far" from true.
– 5xum
Apr 14 '15 at 9:49
• @AGoogler: For an example of an injective (increasing) continuous function that is non-differentiable in an uncountable number of points (but still of measure zero) take the Cantor function and add the identity to it to make it injective. Apr 14 '15 at 12:03 $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$.

• I personally feel like this should be higher. Piecewise continuity is such a small generalization on continuity, while I feel like this is at the heart of the question. Apr 15 '15 at 0:15

Well, you could do something like: Let $a_i$ be an enumeration of the rationals.

Define $f_i(x)$ as a continuous, nondecreasing function, strictly between $0$ and $1$ which is differentiable everywhere but $a_i$.

Define $g(x) := x + \sum_{i=0}^{\infty} f_i(x)\times 2^{-i}$

That should give a function that is continuous, but not differentiable at any rational number. (It's differentiable at every irrational number, though.)

$\newcommand{\Reals}{\mathbf{R}}$There exists a strictly increasing continuous function $F:\Reals \to \Reals$ that fails to be differentiable at each rational number.

Let $(a_{k})_{k=1}^{\infty}$ be an enumeration of your favorite dense countable set $A$, such as the set of rational numbers, and $H:\Reals \to \Reals$ the unit step function $$H(x) = \begin{cases} 0 & \text{if x \leq 0,} \\ 1 & \text{if 0 < x.} \end{cases}$$ Form the sum of scaled translates $$f(x) = \sum_{k=1}^{\infty} 2^{-k} H(x - a_{k}),$$ and its definite integral $$F(x) = \int_{0}^{x} f(t)\, dt.$$

The following are easy "honors calculus"/elementary analysis exercises:

1. The function $f$ is strictly positive (in fact, $0 < f(x) < 1$ for all real $x$), strictly increasing (hence Riemann integrable over an arbitrary compact interval), has a jump discontinuity at each point of $A$, and is continuous elsewhere.

2. The function $F$ is continuous (as a definite integral), strictly increasing (positive integrand), strictly convex (increasing integrand), and differentiable at $x$ if and only if $f$ is continuous at $x$ (fundamental theorem of calculus, since $f$ has only jump discontinuities), hence non-differentiable at each point of $A$.

• No need to emphasize that $A$ is dense, since it's not needed for any of the assertions. Apr 14 '15 at 21:26
• @MarioCarneiro: You're perfectly correct, if course; just emphasizing for posterity that the answer to the OP's "global" question is no, not even locally. :) Apr 14 '15 at 21:58