# a function which is monotone in an open interval but it is not continuously differentiable at that interval.

Can you give an example of a function $$f(x)$$ which is differentiable but not continuously differentiable and there exists a nbd $$N$$ around a point $$c$$ such that $$f'(x) >(<) 0 \forall x \in N$$ and $$f'(x)$$ is not continuous at the point $$c$$?

I am basically trying to search a function which is monotone in an open interval but it is not continuously differentiable at that interval.

• A function $g:\Bbb R\to \Bbb R$ can be increasing and differentiable and such that $\{f'(x): |x|<r\}$ is unbounded above for every $r>0.$ Then $f(x)=x+g(x)$ is strictly increasing and differentiable and $f'(x)=1+g'(x)\ge 1$ for all $x,$ but $f'(x)$ is discontinuous at $x=0.$ Sep 25, 2019 at 11:08
$$f(x) = \begin{cases} 10x + x^2 \cos \left( \frac{1}{x} \right) & x \neq 0 \\ 0 & \text{otherwise} \end{cases}$$
Take $$N = (-0.5 , 0.5)$$ and $$f'(0) =10 , f'(x) > 0$$ for all $$x \in N$$, and $$f'(x)$$ is not continuous at $$0$$.
Let $$g(x) = \begin{cases} x^2 \sin\left(\frac{1}{x}\right) & \text{if } x \neq 0 \\ 0 & \text{if } x = 0.\end{cases}$$ Then $$g'(x) = \begin{cases} 2x \sin\left(\frac{1}{x}\right) - \cos\left(\frac{1}{x}\right) & \text{if } x \neq 0 \\ 0 & \text{if } x = 0.\end{cases},$$ hence $$g'$$ is discontinuous at $$x = 0$$. Note that, on the interval $$(-1, 1)$$, we have $$|g'(x)| \le 2|x| \cdot\left|\sin\left(\frac{1}{x}\right)\right| + \left|\cos\left(\frac{1}{x}\right)\right| \le 3.$$ Hence, if we let $$f(x) = 4x + g(x),$$ then $$f'(x)$$ is discontinuous at $$x = 0$$, and on the interval $$(-1, 1)$$, we have $$f'(x) = 4 + g'(x) \ge 4 - |g'(x)| \ge 4 - 3 > 0.$$