# Find a $f$ function such that$f'(x)\geq 0$ but not continuous

I just started reading continuity, differentiability etc. So I was thinking of an example of following type:

Let $f: [a,b]\rightarrow \mathbb{R}$, where $f(x)$ is monotonically increasing continuous function and differentiable on $(a,b)$ or simply $f'(x)\geq 0$ for $x\in (a,b)$.

can we find such function for which $f'(x)$ is not continuous?

I could not find any, whatever function I take $f'(x)$ is becoming continuous. Is there such function even exists!

For every $x\in (-1,1).$ Define, $$f(x) = 100x+ x^2\sin\frac{1}{x} \qquad\text{with f(0)=0}$$ which is differentiable and $$f'(x) = 100+ 2x\sin\frac{1}{x}-\cos\frac{1}{x} \qquad\text{with f'(0)=100}$$ $f'$ is not continuous a $x=0$ and you might choose the interval $[a,b]$ around $x=0$ as it suite to you. Indeed

$$f'(x)=100+2x\sin\frac{1}{x}-\cos\frac{1}{x} \ge 100+ 2x\sin\frac{1}{x}-1$$

Since $|\sin a| \le |a|$ and $-1\le-\cos a\le 1$ then $|2x\sin\frac{1}{x}|\le 2$ i.e $$2x\sin\frac{1}{x}\ge -2$$

therefore

$$f'(x)=100+2x\sin\frac{1}{x}-\cos\frac{1}{x} \ge 100-2-1= 97>0$$ for every $x\in \mathbb R$. so $f$ is increasing and $f'$ is not continuous at $x=0$.

• Defined on what closed interval? – Dave Aug 17 '17 at 13:27
• but the function is increasing in near $0$ – user467365 Aug 17 '17 at 13:28
• Monotone?${}{}{}{}$ – David Mitra Aug 17 '17 at 13:29
• you can choose your interval from the left of o or from the right both will give monotonicity for sure. – Guy Fsone Aug 17 '17 at 13:30
• I don't understand, is this function monotonically increasing in $[-\epsilon,\epsilon]$, $\epsilon>0$ – user467365 Aug 17 '17 at 13:32