# Function that is continuous and monotone increasing but not differentiable at 0

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?

• $|x|$ is not monotone increasing, you are correct. – Michael Burr May 5 '16 at 15:38
• Make your example monotone increasing by considering $$f(x)=|x|+2x.$$ – Did May 5 '16 at 21:13
• I can't propose an edit because it's too small, but shouldn't $f'(x_0) \geq 0$, rather than the other way around? – 4D enthusiast Dec 29 '16 at 10:54

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.
• or should I let $f$ be a piece wise function consisting of the functions you mentioned? – Ben May 5 '16 at 15:54
• I have defined $f$ piecewise. So, yes, define $f$ in this way. – Landon Carter May 5 '16 at 16:06