According to p. 107 of the book Advanced Calculus by Fitzpatrick,
Assuming that the periodicity and differentiability properties of the sine function are familiar, the following is an example of a differentiable function having a positive derivative at $x = 0$ but such that there is no neighborhood of $0$ on which it is monotonically increasing: $$f(x) = \begin{cases}x^2\sin 1/x & \text{if}\ x\neq 0 \\ 0 & \text{if}\ x = 0\end{cases}$$ The source of this counterintuitive behavior is that the derivative $f'$ is not continuous at $x = 0$.
There are two confusing things about it:
a. By the definition of derivative (at $x=0$), $$\lim_{x\to 0} \dfrac{f(x)-f(0)}{x-0} = \lim_{x\to 0} \dfrac{x^2 \sin \bigl(\frac{1}{x}\bigr)}{x} = 0,$$ since $\bigl\lvert\sin\bigl(\frac{1}{x}\bigr)\bigr\rvert \le 1$.
b. By use of rules for the derivative of products and quotients, $$f'(0) = \biggl[ 2x \sin \biggl(\frac{1}{x}\biggr) + x^2 \biggl(-\frac{1}{x^2} \cos \biggl(\frac{1}{x}\biggr)\biggr) \biggr]_{x=0} $$ which is not defined since $\cos\bigl(\frac{1}{0}\bigr)$ is not defined.
So why the text says that its derivative exists and its value is $>0$?
The function $f(x)$ is monotonically increasing because it is an odd function so for any neighborhood abound $x=0$, $f(x_1>0)>f(x_2<0)$. So why the text says otherwise?