Fermat's theorem (stationary points) of higher dimensions

Look at this page and the Proof part,

Fermat's theorem (stationary points) - Wikipedia, the free encyclopedia

How to change the proof 2 into a proof of higher dimensions or can you give a proof of Fermat's theorem of higher dimensions?

To clarify, I need to prove this:

Let $\displaystyle E\subset \mathbb{R}^n$ and $\displaystyle f:E\rightarrow\mathbb{R}$ be a continuous function. Prove that if $\displaystyle a$ is a local maximum point for $\displaystyle f$, then either $\displaystyle f$ is differentiable at $\displaystyle x=a$ with $\displaystyle Df(a)=0$ or $\displaystyle f$ is not differentiable at $\displaystyle a$.

Re: Fermat's theorem (stationary points) of higher dimensions

Df(x) is, for each x, a vector (or can be represented by such a vector, depending upon exactly how you are defining Df(x)) pointing in the direction of fastest increase. Show that if f is differentiable at a and Df(a) is not 0 then moving a short distance in the direction of Df(a) will give a higher value of f and in the opposite direction will give a lower value. You can use the mean value theorem for that.