$f(x)=2x^4+x^4\sin(\dfrac 1x) , \forall x \ne 0 ; f(0):=0$ ; it's derivative has both positive and negative values in every neighbourhood of $0$? Let $f:\mathbb R \to \mathbb R$ a function defined as $f(x)=2x^4+x^4\sin\left(\dfrac 1x\right) , \forall x \ne 0 ; f(0):=0$ ; then how to show that it's derivative has both positive and negative values in every neighbourhood of $0$ ?

Note that $f'(x) = 8x^3 + 4x^3 \sin \frac 1 x - x^2 \cos \frac 1 x$ for $x \ne 0$. Now $f' \Big( \frac 1 {2 n \pi} \Big) = \frac 1 {n^3 \pi^3} - \frac 1 {4 n^2 \pi^2} = \frac {4 - n \pi} {4 n^3 \pi^3} < 0$ for $n \ge 2$ and $f' \Big( \frac 1 {(2n+1) \pi} \Big) = \frac 8 {(2n+1)^3 \pi^3} + \frac 1 {(2n+1)^2 \pi^2} > 0$ for $n \ge 1$. Since the sequences $\frac 1 {2 n \pi}$ and $\frac 1 {(2n+1) \pi}$ both tend to $0$, this shows that in any neighbourhood of $0$ $f'$ will take infinitely many negative values and infinitely many positive values.
