Background : We know that Brownian path oscillates infinitely often changing signs in any neighbourhood of $0$. I was trying to understand if this property holds because that Brownian paths are not differentiable. So my question is as follows.
Question : If $f :\mathbb{R} \rightarrow \mathbb{R}$ is differentiable and $f'(x)=0$ for some $x$, does it mean there exists $\delta > 0$ such that $f(y) \geq 0 \quad \forall \; x\leq y \leq x+\delta$ or $f(y) \leq 0 \quad \forall \; x\leq y \leq x+\delta$
Attempt : I assumed the contrary that there exists sequences $(a_n)$ and $(b_n)$ such that $f(a_n) >0$ and $f(b_n) < 0$, $x-a_n < \frac{1}{n}$, $x-b_n < \frac{1}{n}$. But I could not get any contradiction following the lines.
It is highly appreciated if some one could or disprove my claim. Thanks
As Daniel Fischer pointed out in the comments, the claim is false and a counter example is $f(x) = x^3\sin(\frac{1}{x})$.