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?
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?
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$.