Prove that $f'(x_o) =0$ Let $f$ be a function defined on an interval $I$  differentiable at a point $x_o$ in the interior of $I$.
Prove that if $\exists  a>0$   $ \ [x_o -a, x_o+a] \subset I$ and  $ \ \forall x \in [x_o -a, x_o+a]  \ \ f(x) \leq f(x_o)$, then $f'(x_o)=0$.
I did it as follows:
Let b>0.
Since $f$ is differentiable at $x_o$,
$$ \exists a_o>0 \ \ \text{s.t} \ \ \forall x \in I \ \ \ \ \  0<|x-x_o|<a_o \implies \left| \frac{f(x)-f(x_o)}{x-x_0} - f'(x_o)\right| <b$$
Let $x_1 \in (x_o,x_o+a) \forall x \in I; f(x_1) \leq f(x_o)$
$$ \left| \frac{f(x_1)-f(x_o)}{x_1-x_0} - f'(x_o)\right| <b \\
-b < f'(x_o)-\frac{f(x_1)-f(x_o)}{x_1-x_0} <b \\
f'(x_o) < b+ \frac{f(x_1)-f(x_o)}{x_1-x_0} < b$$
$$f'(x_o) < b \tag{1} $$
Similarly Let $x_2 \in (x_o-a,x_o) \forall x \in I; f(x_2) \leq f(x_o)$
$$ \left| \frac{f(x_2)-f(x_o)}{x_2-x_0} - f'(x_o)\right| <b \\
-b < \frac{f(x_2)-f(x_o)}{x_2-x_0} - f'(x_o) <b \\
-b< -b + \frac{f(x_2)-f(x_o)}{x_2-x_0} < f'(x_o)$$
$$-b<f'(x_o)  \tag{2} $$
From $(1)$ and $(2)$,
$$ -b < f'(x_o) <b \\
|f'(x_o)|<b  $$
I'm stuck here, how can I go to $f'(x_o)=0$ from here?
Any help?

This is not an answer, but is too long for the comments.
Another approach is to show that if $f'(x_0) > 0$, where $x_0$ is in the interior of $I$, then for some $\delta>0$, then if $x \in (x_0-\delta,x_0)$ we have $f(x) <f(x_0)$ and for $x \in (x_0, x_0+\delta)$ we have $f(x) > f(x_0)$.
A corresponding result will hold for $f'(x_0)<0$, of course.
The proof is straightforward, since if $f'(x_0)>0$, we can find some $\delta>0$ such that ${ f(x)-f(x_0) \over x-x_0 } \ge {f'(x_0) \over 2}$ for all $x$ such that $|x-x_0|< \delta$. For $x>x_0$ this gives $f(x) \ge f(x_0) + {1 \over 2} (x-x_0) f'(x_0)$, and similarly for $x<x_0$ this gives $f(x) \le f(x_0) + {1 \over 2} (x-x_0) f'(x_0)$.
Hence if $f$ has a local maximum (or indeed a local minimum) at $x_0$, we must have $f'(x_0) = 0$ (otherwise we could find nearby points that violate the assumption).
