Clarification in the way I have to do derivatives in this problem of Riemannian geometry (Euler-Lagrange equations) Let be $X$ a Riemannian manifold.
I fix a local chart $(U,\varphi)$
If $ \phi : [a,b] \rightarrow U$ is $C^\infty$ I consider
$$H(\phi )= \int_a^b k(\phi (t),\dot{\phi(t)})\; dt$$ where
$$ k(\phi(t),\dot{\phi(t)})= \sum_{\alpha, \beta} g_{\alpha,\beta}(\phi(t)) \:\dot{\phi}(t)^\alpha\: \dot{\phi}(t)^\beta$$
and $\phi^1(t),\dots,
\phi^n(t)$ are the local coordinates of $\phi(t)$ (i.e. $\varphi \circ \phi=(\phi^1, \dots \phi^n)$)
I have that $k$ satisfies the Euler-Lagrange equations:
$$ \frac{d}{dt}\big(\frac{\partial k}{\partial \dot{x}^\gamma}\big)-\frac{\partial k}{\partial x^\gamma}=0.$$
I don't understand why I have that:
$$ \frac{\partial k}{\partial x^\gamma}= \sum_{\alpha, \beta} \frac{\partial g_{\alpha,\beta}} {\partial x^ \gamma} \:\dot{\phi}^\alpha\: \dot{\phi}^\beta$$ 
and $$ \frac{\partial k}{\partial \dot{x}^\gamma}=2 \sum_{\alpha}  g_{\alpha,\gamma}\dot{\phi}^\alpha.$$
Why, when I do these derivatives, have I to consider  $\phi^j$ as  $x^j$ and the $\dot{\phi}^j$ as $\dot{x}^j$ ?
Thanks for the clarification.
 A: In fact, the mistake comes from the definition of $k$: the one that you gave above is correct only up to an abuse of notation (usually tolerated in books, but not rigorous): since $k$ must be defined on the tangent bundle and since you work in a chart (which induces a local trivialization above $U$ of the tangent bundle), you must tell what the value of $k$ is in a point $(x,v) \in T_x U$. According to your formula above, this should be $k(x,v) = \sum \limits _{\alpha, \beta} g_{\alpha, \beta} (x) v^\alpha v^\beta$.
(Many authors use the notation $\dot x$ instead of $v$, but do not make the mistake of (yet) thinking of it as a time derivative, because so far we haven't yet seen any curve (we shall, briefly). With this notation, $k(x,\dot x) = \sum \limits _{\alpha, \beta} g_{\alpha, \beta} (x) \dot x ^\alpha \dot x ^\beta$.)
You obtain, then, that $\frac {\partial k} {\partial v^i} = \sum \limits _\alpha g_{i, \alpha} (x) v^\alpha + \sum \limits _\alpha g_{\alpha, i} (x) v^\alpha = \sum \limits _\alpha (g_{i, \alpha} + g_{\alpha, i}) (x) v^\alpha$. In most cases $g$ will be the Riemannian structure so the above becomes $2 \sum \limits _\alpha g_{i, \alpha} (x) v^\alpha$.
Similarly, $\frac {\partial k} {\partial x^i} = \sum \limits _{\alpha, \beta} \frac {\partial g_{\alpha, \beta}} {\partial x^i} (x) v^\alpha v^\beta$.
Now, evaluate the above along the curve $\phi$, i.e. apply both quantities computed above in the point $\left( \phi (t), \dot \phi (t) \right) \in T_{\phi(t)} X$ - which means to replace $x$ with $\phi(t)$ and $v$ (or $\dot x$, if you prefer this notation) with $\dot \phi (t)$ (thus replacing the dependence on $(x,v)$ with one on $t$), derive $\frac {\partial k} {\partial v^i} \left( (\phi (t), \dot \phi (t) \right)$ with respect to $t$ and equate the results. These are the E-L equations.
