I have been trying to prove the statement:
Let $D\subset \mathbb{R}$ and $f\colon D\to\mathbb{R}$.If $f'(c)<0$ then there exists a nbd $I$ of $c$ such that $f'(x)<0$ for all $x\in I$.
Here's my attempt:
Let $S:=\{|x-c| : f'(x)\ge 0\ \text{for some } x\in D\}$. Clearly, $S$ is bounded below by $0$. Now if $S$ is empty, then for all $x \in D$, we have $f'(x) <0$ and we are done. Now, suppose that $S$ is not empty. Then let $\delta := \inf S$. Now, we have that for all $|x-c| < \delta$, $|f'(x)|<0$.
Is this proof okay? Or did I go wrong? Alternative proofs?
It's not true. Take $$ f(x)=\cases{x^2\sin(1/x)+x/2& if $x\neq0$\\0& otherwise} $$ Then $f'(0)=0.5$, but for there are $x$ arbitrarily close to $0$ such that $f'(x)=-0.5$.