If $f$ is differentiable in $B(a)$ and $f(x) \leq f(a)$ for all $x$ in $B(a)$, then $\nabla f(a) = 0$ 
Assume $f$ is differentiable at each point of an n-ball $B(a)$. Prove that if $f(x) \leq f(a)$ for all $x$ in $B(a)$, then $\nabla {f(a)} = 0.$

I had my proof, but I'm not sure it is correct.
Proof:
Since f is differentiable at each point of the n-ball B(a), meaning
$$\lim_{h \to 0} \frac{f(a+hy)-f(a)}{h} = \nabla f(a) \cdot y$$
, where y is an arbitrary unit vector.
From the mean value theorem, we know that 
$$\lim_{h \to 0} \frac{f(a+hy)-f(a-hy)}{h} = \nabla f(c) \cdot y$$
for some c where $||c|| < r$.
Since
$$\lim_{h \to 0} \frac{f(a+hy)-f(a)}{h} = \nabla f(c) \cdot y = - \lim_{h \to 0} \frac{f(a)-f(a-hy)}{h}$$
Since the RHS of the the first equation is 0, we have $\nabla f(a) = 0$.
So, is there any mistake of any suggestion about the point that I can improve mathematically or about the way that I wrote ?
 A: You never used the fact that $f(x)\leq f(a)$. I may be missing something, but it seems that your proof would imply that all differentiable functions have this property.
My proof is the following: Compute
$$\lim_{h\to 0 } \frac{f(a+hy)-f(a)}{h} = \nabla f(a) \cdot y,$$
and note that $f(a+hy)\leq f(a)$ for all $h$ sufficiently small, so $\nabla f(a)\cdot y\leq 0$.  However, taking $y\mapsto -y=:\tilde{y}$ we again have
$$\lim_{h\to 0} \frac{f(a+h\tilde{y})-f(a)}{h} = \nabla f(a)\cdot \tilde{y},$$
implying $\nabla f(a) \cdot \tilde{y} \leq 0$.  But, since $\tilde{y}=-y$ we have $\nabla f(a)\cdot y \geq 0$. Combining this with the first inequality we derive $\nabla f(a) \cdot y =0$.  Since $y$ was arbitrary it immediately follows that $\nabla f(a)=0.$
EDIT: To make the last argument explicit: Our above work implies that $\nabla f(a) \cdot y =0 $ for any $y$. In particular, take $y=\nabla f(a)$ so that
$$0 = \nabla f(a) \cdot \nabla f(a) = |\nabla f(a)|^2.$$
Then, $|\nabla f(a)|^2 = 0$ only if $\nabla f(a) =0.$
A: Let $y \in R^n$ an arbitrary vector and let be $\alpha: (-\epsilon,\epsilon) \to B(a)$ given $\alpha(h) = a + hy$. Then the differentiable function $g: (-\epsilon,\epsilon) \to R$  where $g = f \circ \alpha$ has critical value in $h=0$ and therefore $$ 0 = g´(0) = \nabla f . y$$, how $y$ is arbitrary, this implies that $\nabla  f = 0$
