[Math] Function that is continuous and monotone increasing but not differentiable at 0

calculusderivativesreal-analysis

Give an example of a function $f: (-1,1) \rightarrow \mathbb{R}$ which is continuous and monotone increasing, but which is not differentiable at 0. Explain why this does not contradict the fact that if a function is monotone increasing and differentiable at $x_0$ then $f'(x_0) \leq 0$.

My first thought was to use the function $f(x) = |x|$, however I don't believe this function is monotone increasing. Am I right?

Best Answer

Write $f(x)=x$ if $x\geq0$ and $f(x)=2x$ if $x<0$.

To make the second conclusion, you would need $f'$ to exist throught the open interval $(-1,1)$, which is obviously not true here.