Suppose we have the following equation :
$$L=\frac{1}{2}\sum_{ij}\dot{q_i}\space T_{ij}\space\dot{q_j}$$
Here $T_{ij}$ is a symmetric matrix, that depends on $q_i,t$. Suppose, I want to evaluate $\frac{\partial L}{\partial\dot{q_j}}$. So now we have,
$$\frac{\partial L}{\partial\dot{q_k}}=\frac{1}{2}\frac{\partial }{\partial\dot{q_k}}\sum_{ij}\dot{q_i}\space T_{ij}\space\dot{q_j}$$
In one of the lecture notes, my professor wrote that this is equivalent to,
$$\sum_i T_{ik}\space\dot{q_k}$$
However, this doesn't seem correct to me. According to me,
$$\frac{\partial L}{\partial\dot{q_k}}=\frac{1}{2}\frac{\partial }{\partial\dot{q_k}}\sum_{ij}\dot{q_i}\space T_{ij}\space\dot{q_j}=\sum_i T_{ik}\space\dot{q_i}$$
This should be the correct equation ( note that I've replaced $\dot{q_k}$ by $\dot{q_i}$, which is what we are summing over. )
Suppose both $i,j$ range from $1$ to $3$. Then according to my teacher,
$$\frac{\partial L}{\partial \dot{q_3}}=T_{13}\dot{q_3}+T_{23}\dot{q_3}+T_{33}\dot{q_3}$$
According to me however,
$$\frac{\partial L}{\partial \dot{q_3}}=T_{13}\dot{q_1}+T_{23}\dot{q_2}+T_{33}\dot{q_3}$$
Can someone tell me who is correct ? Was there a simple printing error in my teacher's notes, or am I making an obvious mistake in here ?
We have,
$$ L = \frac12 \sum \dot{q}_i T_{ij} \dot{q}_j$$
Taking the derivative of both side with $p$th coordinate and interchanging derivative with sum:
$$ \partial_{\dot{q}_p} L = \frac12 \sum \partial_{\dot{q}_p} (\dot{q}_i T_{ij} \dot{q}_j)$$
Tricky term is $\partial_{\dot{q}_p} (\dot{q}_i T_{ij} \dot{q}_j)$, we will work that out seperately:
$$ \partial_{\dot{q}_p} (\dot{q}_i T_{ij} \dot{q}_j)= \delta_{ip} T_{ij} \dot{q}_j + \dot{q}_i T_{ij} \delta_{pj} $$
Now, let's put this back in the summation:
$$ \partial_{\dot{q}_p} L = \frac12 \sum_{i,j} \delta_{ip} T_{ij} \dot{q}_j + \dot{q}_i T_{ij} \delta_{pj} + \dot{q}_i \dot{q}_j\partial_{\dot{q}_p} T_{ij} = \frac12 \left[\sum_{i,j} \delta_{ip} T_{ij} \dot{q}_j + \sum_{i,j} \dot{q}_i T_{ij} \delta_{pj} \right]$$
Now suppose we consider the second summation $ \sum_{i,j} \dot{q}_i T_{ij} \delta_{pj}$, since $i,j$ are dummy and further more the matrix is symmetric we can swap $i <--> j$, this gives the same thing as first term giving us:
$$ \partial_{\dot{q}_p} L= \sum_{i,j} \dot{q}_i T_{ij} \delta_{pj}$$
At this point , we can use the property of the $\delta$ symbol. Since the it is only equal $1$ when $p=j$, we can replace all our $j$ with $p$:
$$ \partial_{\dot{q}_p} L= \sum_{i,p} \dot{q}_i T_{ip} $$
But, $p$ is just one number (derivative index, so we have:
$$ \partial_{\dot{q}_p} L= \sum_{i} \dot{q}_i T_{ip} = \dot{q}_1 T_{1p} + \dot{q}_2 T_{2p} + \dot{q}_3 T_{3p} $$
*:Note that I am abusing tensor notation a bit, but I am doing it so that it is smthn OP is familiar with. Many physics book don't get the right index placement so who cares anyways.