Derivatives of the lagrangian of generalized coordinates I know that
$$U= \frac{1}{2} \sum_{j,k} A_{jk} q_j q_k \quad \quad  T= \frac{1}{2} \sum_{j,k} m_{jk} \dot{q}_j \dot{q}_k $$
and the lagrangian is
$$ \frac{\partial U}{\partial q_k} - \frac{d}{dt} \frac{\partial T}{\partial \dot{q}_k} = 0$$
If I derivate
$$ \frac{\partial U}{\partial q_k} = \frac{\partial}{\partial q_k} (\frac{1}{2} \sum_{j,k} A_{jk} q_j q_k) = \frac{1}{2} \sum_{j,k} A_{jk} (\frac{\partial q_j}{\partial q_k} \delta_{jk} \quad q_k + q_j \quad \frac{\partial q_k}{\partial q_k} \delta_{kk} )$$
and
$$ \frac{\partial T}{\partial \dot{q}_k} = \frac{\partial}{\partial \dot{q}_k} (\frac{1}{2} \sum_{j,k} m_{jk} \dot{q}_j \dot{q}_k) = \frac{1}{2} \sum_{j,k} m_{jk} (\frac{\partial \dot{q}_j}{\partial \dot{q}_k} \delta_{jk} \quad \dot{q}_k + \dot{q}_j \frac{\partial \dot{q}_k}{\partial \dot{q}_k} \delta_{kk})$$
but, the results is
$$ \frac{\partial U}{\partial q_k} = \sum_{j} A_{jk} q_j $$
and
$$ \frac{\partial T}{\partial \dot{q}_k} = \sum_{j} m_{jk} \dot{q}_j $$
I don't understand this, how this happened ? Where is $\frac{1}{2}$?
This is a passage from Marion (Classical Mechanics), I found it curious and tried to solve it, because the derivative was meaningless to me, and the subindexes are very confusing to understand.
The lagrangian is $$ \frac{\partial L}{\partial q_k} - \frac{d}{dt} \frac{\partial L}{\partial \dot{q}_k} = 0$$ but it uses this other relation with $U$ and $T$, How can this be valid?
 A: First, there are some mistakes in question:

*

*potential is not always a quadratic form of the generalized coordinates. As an example, the potential of a gravitational field close to Earth surface reads $U= m g q_z$, if $q_z$ is the generalized coordinate representing the vertical displacement of a mass $m$, or the gravitational field coming from Newton's universal gravitation law, $U = - \frac{GMm}{q}$, being $q$ the generalized coordinated representing the distance between the point masses $m$, $M$


*Lagrange equations read
$\dfrac{d}{dt} \left(\dfrac{\partial L}{\partial \dot{q}}\right) - \dfrac{\partial L}{\partial q} = 0$
if no non-conservative force is present.
Then, let's perform the derive of a quadratic form, like the kinetic energy,
$K = \dfrac{1}{2} \sum_{i j } A_{ij} \dot{q}_i \dot{q}_j$, with $A_{ij} = A_{ji}$ with respect to the independent variable $\dot{q}_{\ell}$,
$\dfrac{\partial K}{\partial \dot{q}_{\ell}} = \dfrac{1}{2} \sum_{ij} \left( A_{ij} \delta_{i \ell} \dot{q}_j + A_{ij} \dot{q}_i \delta_{j \ell}  \right) = \\
\qquad = \dfrac{1}{2} \sum_{j} A_{\ell j} \dot{q}_j + \dfrac{1}{2} \sum_{i} A_{i \ell} \dot{q}_i = (\text{since $A_{ij} = A_{ji}$}) \\
\qquad = \dfrac{1}{2} \sum_{j} A_{\ell j} \dot{q}_j + \dfrac{1}{2} \sum_{i} A_{\ell i} \dot{q}_i = (\text{$i$, $j$ dummy, saturated by summations}) \\
\qquad = \sum_{i} A_{\ell i } \dot{q}_i$.
The same occurs for any other quadratic form.
