Let $M \subset R^n$ be a $k$ dimensional manifold. Let $f: R^n \to R$ be a smooth function. Let $x \in M$ be a local extremum of $f$ on $M$.
The task is to prove that $\nabla f_x (v) = 0$ for every $v \in T_xM$ (the tangent space at $x$).
I am not really sure fro where to start. What I find weird is that I remember that if $y$ is a local extremum of $f$, then $\nabla f_y = 0$ (it is the gradient at the point $y$). But then the question is trivial, so I am probably getting something wrong here.
Can some one show me what is the problem and give me a direction on how to solve it? Help would be appreciated.
I also need to such an example of such a function so that $\nabla f_x \ne 0$.
Edit: Let $M \subset R^n$ be a $k$-dimensional manifold and let $ f : R^n \to R$ be a smooth function s.t $ x_0 /in M $ is a local extremum point of $f$ on $M$
(i) Show that $\nabla f_{x_0}(h) = 0$ for every $h \in T_{x_0}M$.
(ii) Find such a function with $\nabla f{x_0} \ne 0$
Fix $v\in TM_x$. The function $g:t\mapsto f(x+tv)$ has an extremum at $t=0$ and since $g'(t)=\nabla f(x+tv)\cdot v,\ $ it follows that $0=g'(0)=\nabla f(x)\cdot v$ from which the claim follows.
For the second part, use the rank theorem: set $x=(x_1,\cdots, x_k, x_{k+1},\cdots, x_n)$. There are diffeomorphisms $\psi$ and $\phi$ such that
$\psi\circ f\circ \phi^{-1}(x_1,\cdots, x_k, x_{k+1},\cdots, x_n)=(x_1,\cdots x_k, 0,\cdots, 0)$.
The gradient of this function at $x_0$ is $(\underbrace{1,1,\cdots,1}_{\text k},\underbrace{0,0,\cdots,0)}_{\text n-k}$, clearly non-zero, and the chain rule now shows that $\nabla f(x_0)\neq 0.$