definition of gradient vector field. I don't understand the definition of gradient vector field.
Let $M$ be a manifold, $f:M\rightarrow \mathbb{R}$ be a smooth function and $\varphi_1,\varphi_2:U\rightarrow \mathbb{R}^n$ be coordinate charts of $M$. It's my understanding that grad$f$ on $U$ is the tangent vector firld$:U\rightarrow TU$ 
$$p \mapsto \frac{\partial f_1}{\partial x^1_1}(\varphi_1(p))\frac{\partial}{\partial x^1_1}+\dots +\frac{\partial f_1}{\partial x^1_n}(\varphi_1(p))\frac{\partial}{\partial x^1_n}$$,
 where $f_1=f\circ\varphi_1^{-1}:\varphi_1(U)\rightarrow \mathbb{R}$ and $(x^1_1,...,x^1_n)$ is the coordinate system of $\varphi_1(U)$.
If this definition is correct and it doesn't depend on the choice of chart, it must coincide with 
$$p \mapsto \frac{\partial f_2}{\partial x^2_1}(\varphi_2(p))\frac{\partial}{\partial x^2_1}+\dots +\frac{\partial f_2}{\partial x^2_n}(\varphi_2(p))\frac{\partial}{\partial x^2_n}$$,
 where $f_2=f\circ\varphi_2^{-1}:\varphi_2(U)\rightarrow \mathbb{R}$ and $(x^2_1,...,x^2_n)$ is the coordinate system of $\varphi_2(U)$.
However, these two coincides iff 
$$
\begin{pmatrix}
\frac{\partial f_2}{\partial x^2_1}(\varphi_2(p))\\
\dots\\
\frac{\partial f_2}{\partial x^2_n}(\varphi_2(p))
\end{pmatrix}
=D(\varphi_2\circ \varphi_1^{-1})
\begin{pmatrix}
\frac{\partial f_1}{\partial x^1_1}(\varphi_1(p))\\
\dots\\
\frac{\partial f_1}{\partial x^1_n}(\varphi_1(p))
\end{pmatrix}=
D(\varphi_2\circ \varphi_1^{-1})(D(\varphi_2\circ \varphi_1^{-1}))^T\begin{pmatrix}
\frac{\partial f_2}{\partial x^2_1}(\varphi_2(p))\\
\dots\\
\frac{\partial f_2}{\partial x^2_n}(\varphi_2(p))
\end{pmatrix}
$$, where $D(\varphi_2\circ \varphi_1^{-1})$ is the Jacobian matrix, and this doesn't necessarily hold.
Where is the misunderstanding?
 A: The misunderstanding is, of course, that the definition of $\nabla f$ is incorrect. Indeed, one should define the differential $df$ of $f$, which is not a vector field, but a differential one form on $M$. By definition, we have
$$df_x( v) := \nabla _v f (x)= (f\circ \gamma )'(0) ,\ \ \ \forall x\in T_xM,$$
where $\gamma :(-\epsilon, \epsilon)\to M$ is a curve so that $\gamma(0) = x$, $\gamma'(0) = v$. 
Locally $df$ is given by 
$$
df = \frac{\partial f}{\partial x^1 } dx^1 + \cdots +\frac{\partial f}{\partial x^n} dx^n.
$$
It looks like the gradient vector you defined. But this one can be checked to be independent of coordinates (well, $df$ is defined without using any coordinates anyway): if $(y^1, \cdots, y^n)$ is another coordinates, then 
$$\begin{split} \sum_j \frac{\partial f}{\partial y^j} dy^j
&= \sum_{j} \left( \sum_i \frac{\partial f}{\partial x^i} \frac{\partial x^i}{\partial y^j}\right)\left(\sum_k \frac{\partial y^j}{\partial x^k } dx^k\right)\\
&= \sum_{i,k}\left(\sum_j \frac{\partial x^i}{\partial y^j}\frac{\partial y^j}{\partial x^k } \right) \frac{\partial f}{\partial x^i}dx^k \\
&= \sum_{i,k}\delta_{ik} \frac{\partial f}{\partial x^i}dx^k \\
&=\sum_i \frac{\partial f}{\partial x^i}dx^i
\end{split}$$
If you really want a vector field, you need a way to identify $T_xM$ with $T_xM^*$. This is possible if $M$ is given a metric $g$. In that case, the gradient vector fields is given by definition: 
$$g(\nabla f , v) = df (v),\ \ \ \ \forall v\in T_xM.$$
That is, 
$$ \nabla f = \sum_{i,j} g^{ij} \frac{\partial f}{\partial x^i} \frac{\partial }{\partial x^j}.$$
