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?
 A: You proved that $$\forall b>0, |f'(x_0)|<b$$
and this means that $f'(x_0)=0$. So your proof is already finish.
A: It seems you're pretty much there. There are a couple of things you can do to make the argument clearer, both in the early line using the property of differentiable:
1.Differentiation talks about a limit, make sure you say $\forall b > 0 $, as this is what gets you the final step.
2.You want to include the given property here, because it seems you have assumed this. What it should say is something like:
By differentiability at $x_0$ and the property given (about $f$ being max at $x_0$ ) we have:
$$ \forall b> 0 \ \ \exists a > 0 \ \ \text{s.t} \ \ \forall x \in (x_0-a,x_0+a) \subset I  \ \ \left| \frac{f(x)-f(x_0)}{x-x_0} - f'(x_0) \right| < b \ \ \text{and} \ \ f(x) \le f(x_0)$$
A: 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).
A: As answer to your question see my comment.
A more elegant way of working is:
Define $g\left(x\right):=f\left(x+x_{0}\right)-f\left(x_{0}\right)$
and $J:=x_{0}+I$.
Then $g$ is a function defined on interval $J$ differentiable at
$0\in\left[-a,a\right]\subset J$ with $g\left(0\right)=0$ and $g\left(x\right)\leq0$
for each $x\in\left[-a,a\right]$.
Since $g$ is differentiable at $0$ and $g\left(0\right)=0$ both
limits $\lim_{x\rightarrow0+}\frac{g\left(x\right)}{x}$ and $\lim_{x\rightarrow0-}\frac{g\left(x\right)}{x}$
exist and coincide.
Here $\frac{g\left(x\right)}{x}\geq0$ for $x\in\left[-a,0\right)$
implying that $\lim_{x\rightarrow0-}\frac{g\left(x\right)}{x}\geq0$
and $\frac{g\left(x\right)}{x}\leq0$ for $x\in\left(0,a\right]$
implying that $\lim_{x\rightarrow0+}\frac{g\left(x\right)}{x}\leq0$. 
So the limits can only coincide if both equal $0$. 
This proves that $g'\left(0\right)=0$ or equivalently that $f'\left(x_{0}\right)=0$.
