This is an exercise from Rudin's Real and Complex Analysis book.

Construct a monotonic function $f$ on $\Bbb R$ so that $f'(x)$ exists (finitely) for every $x\in \Bbb R$ but $f'$ is not a continuous function.

How can I construct such a function?

  • 1
    $\begingroup$ What does this question have to do with measure theory? $\endgroup$ – Omnomnomnom Feb 26 '17 at 23:28
  • $\begingroup$ Discontinuous in how many points? $\endgroup$ – Yiorgos S. Smyrlis Feb 26 '17 at 23:31
  • $\begingroup$ @Omnomnomnom Maybe the function is almost an integral or something like that? I don't know. It is in a measure theory book. $\endgroup$ – Filburt Feb 26 '17 at 23:32
  • $\begingroup$ @YiorgosS.Smyrlis At least one, I think $\endgroup$ – Filburt Feb 26 '17 at 23:32
  • $\begingroup$ @YiorgosS.Smyrlis Well it has to be a finite amount otherwise $f^\prime$ wouldn't exist over every $x\in \mathbb R$. However one should work. $\endgroup$ – Sentinel135 Feb 26 '17 at 23:35

Example $$ f(x)=\left\{ \begin{array}{ccc} 2x & \text{if} & x\le 0,\\ 2x+x^2+x^2\sin(1/x) & \text{if} & x> 0. \end{array} \right. $$ Then $$ f'(x)=\left\{ \begin{array}{ccc} 2 & \text{if} & x\le 0,\\ 2+2x+2x\sin(1/x)-\sin(1/x) & \text{if} & x> 0. \end{array} \right. $$

Clearly $f$ is increasing and differentiable everywhere, but $f'$ is discontinuous at $x=0$.


Start with

$$f(x)=\begin{cases} x^2\sin(1/x) & x\neq 0\\ 0 & x=0 \end{cases}$$

It is well known that

$$f'(x)=\begin{cases} 2x\sin(1/x) -\cos(1/x) & x\neq 0 \\ 0 & x = 0 \end{cases} $$ is discontinous at $x=0$. However $f'(x)$ is bounded. So let $C$ be some lower bound of $f'$. Define $g(x)=f(x)+Cx$. Then $g'(x)=f'(x)+C > 0$ everywhere and thus by the first derivative test $g$ is increasing yet $g'$ is still discontinous at $x=0$.

  • $\begingroup$ I would like to accept your answer too, but Yiorgos had this idea first, although your answer is more simple. Thanks man +1 $\endgroup$ – Filburt Feb 27 '17 at 0:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.