Let $g : \mathbb R \to \mathbb R$ be defined by $g(x) :=x+ 2x ^ 2 \sin\frac{1}{x}$ for $x \neq 0$ and $g(0) := 0$. Show that $g'(0) = 1$, but in every neighborhood of $0$ the derivative $g'(x)$ takes on both positive and negative values. Thus $g$ is not monotonic in any neighborhood of $0$.
I could show that $g'(0)=1$. Why do $g$ is not monotonic in any neighborhood of $0$? Here, $g'(0)>0$. Suppose $f:\mathbb R \to \mathbb R$ differentiable function. Let $f'(c)>0$. Choose $\epsilon=\frac{f'(c)}{2}$;$\exists \delta>0:\forall x (0<|x-c|<\delta \implies |\frac{f(x)-f(c)}{x-c}-f'(c)|<\frac{f'(c)}{2}).$ Re-arrangeing, $\forall x (0<|x-c|<\delta \implies \frac{f'(c)}{2}<\frac{f(x)-f(c)}{x-c}<3\frac{f'(c)}{2}).$ $i,e$ slope of the secant line is positive in some neighbourhood of $c$.ie function is increasing. right? Why it is not possible here? Please help me.
You are right: The slope of every sufficiently short secant line (i.e., with end point in a sufficiently small neighbourhood of $0$) starting at $(0,f(0))$ is positive. However, for $f$ to be increaing in a neighbourhood $U$ of $0$, you need positive slope for any pair of endpoints in that $U$, not jsut those wit one end at $x=0$.