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$.