Finding a partial derivative of a double summation. How to find $$\frac{\partial T }{ \partial {\dot q_i}},$$ given that
$$T= \sum_i\sum_j{\alpha_{ij}\dot q_i\dot q_j}?$$
 A: Separate the entity $T$ into two parts: terms where $i=j$ and $i \neq j$. We have $$T = \sum_{i,j} \alpha_{ij} \dot{q_i} \dot{q_j} = \sum_i \alpha_{ii} (\dot{q_i})^2 + \sum_{i \neq j} \alpha_{ij} \dot{q_i} \dot{q_j}.$$ When you differentiate partially you get $$\frac{\partial T}{\partial \dot{q_i}} = 2 \alpha_{ii} \dot{q_i} + \sum_{i \neq j} \alpha_{ij} \dot{q_j}.$$
Example: Consider the case where $i,j \in \{ 1,2,3 \}.$ Writing explicitly $T$ gives $$\begin{align}T & = \alpha_{11} (\dot{q_1})^2 + \alpha_{22} (\dot{q_2})^2 + \alpha_{33} (\dot{q_3})^2 \\ & \\ &  + (\alpha_{12} + \alpha_{21})\dot{q_1} \dot{q_2} + (\alpha_{23} + \alpha_{23})\dot{q_2} \dot{q_3} + (\alpha_{13} + \alpha_{31})\dot{q_1} \dot{q_3}. \end{align}$$ Differentiating with respect to $\dot{q_1}$ yields $$\frac{\partial T}{\partial \dot{q_1}} = 2 \alpha_{11} \dot{q_1} + (\alpha_{12}+\alpha_{21}) \dot{q_2} + (\alpha_{13} + \alpha_{31}) \dot{q_3}.$$ Try writing the above in sum notation to see how they are equivalent.
A: Hint
Assuming that your summations are for $i=1,n$ and $j=1,n$, try expanding first a few terms in order to identify a pattern.  $$T=\sum _{i=1}^n \sum _{j=1}^n q(i) q(j) \alpha (i,j)$$
If, for example, you use $n=2$, you will get $$T=q(1)^2 \alpha (1,1)+q(2) q(1) \alpha (1,2)+q(2) q(1) \alpha (2,1)+q(2)^2 \alpha (2,2)$$ If you use $n=3$, you will get $$T=q(1)^2 \alpha (1,1)+q(2) q(1) \alpha (1,2)+q(3) q(1) \alpha (1,3)+q(2) q(1) \alpha
   (2,1)+q(3) q(1) \alpha (3,1)+q(2)^2 \alpha (2,2)+q(2) q(3) \alpha (2,3)+q(2) q(3)
   \alpha (3,2)+q(3)^2 \alpha (3,3)$$ Do you percieve the pattern of the derivatives ?
