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

calculusderivativesreal-analysis

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.

Can anyone please help me to find that kind of a function?

Best Answer

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