I am self-studying analytical mechanics, and I am stuck in an intermediate derivation of the equation for energy dissipation in a Lagrangian context.
Frictional forces cannot be derived from any generalized potential $U$. It holds in case of holonomic constraints:
\begin{align} \frac{d\ \partial T}{dt\ \partial \dot q_j} -\frac{\partial T}{\partial q_j}=Q_j^{(V)}+Q_j^{(R)}. \end{align} Thereby, the part $Q_j^{(V)}$ is derivable from a potential, while $Q_j^{(R)}$ provides the influence of the friction force.
The Lagrangian \begin{align} L=T-V \end{align} ($V$ from $Q_j^{(V)}$) then obeys the equations of motion: \begin{align} \frac{d\ \partial L}{dt\ \partial \dot q_j} -\frac{\partial L}{\partial q_j}=Q_j^{(R)}. \end{align} With "Rayleigh's dissipation function" we get "modified" Lagrange equations of the form: \begin{align} \frac{d\ \partial L}{dt\ \partial \dot q_j} -\frac{\partial L}{\partial q_j}+\frac{\partial D}{\partial \dot q_j}=0. \end{align} Also $\frac{dW^{(R)}}{dt}=2D$. The energy dissipation corresponds to the temporal change of the total energy ($T+V$): \begin{align} \frac{d}{dt}(T+V)&=\sum_{j=1}^S(\frac{\partial T}{\partial q_j}\dot q_j+\frac{\partial T}{\partial \dot q_j}\ddot q_j)+\frac{dV}{dt},\\ \sum_{j=1}^S \frac{\partial T}{\partial \dot q_j}\ddot q_j &=\frac{d}{dt}(\sum_{j=1}^S \frac{\partial T}{\partial \dot q_j}\dot q_j)-\sum_{j=1}^S \dot q_j \frac{d\ \partial T}{dt\ \partial \dot q_j}. \end{align} We presume scleronomic constraints. The kinetic energy $T$ is then a homogeneous function of the generalized velocities of second order. Furthermore, except for the friction terms, the system shall be conservative: \begin{align} \sum_{j=1}^S\frac{\partial T}{\partial \dot q_j}\ddot q_j=\frac{d}{dt}(2T)-\sum_{j+1}^S\dot q_j\frac{d\ \partial L}{dt\ \partial \dot q_j}. \end{align}
This last equation is where I am stuck. Where does it come from? The only allowable possible first step I can think of to derive the last equation is: \begin{align} \iff \sum_{j=1}^S\frac{\partial T}{\partial \dot q_j}\ddot q_j &=\frac{d}{dt}(2T)-\sum_{j+1}^S\dot q_j\frac{d\ \partial (T+V)}{dt\ \partial \dot q_j}.\\ \iff \sum_{j=1}^S\frac{\partial T}{\partial \dot q_j}\ddot q_j &=\frac{d}{dt}(2T)-\sum_{j+1}^S\dot q_j\frac{d\ \partial T}{dt\ \partial \dot q_j}, \end{align} because $V$ does not depend on $\dot q_j$. But even that does not seem to explain how the previous equations imply this last one, because $\frac{d}{dt}(2T)\neq \frac{d}{dt}(\sum_{j=1}^S \frac{\partial T}{\partial \dot q_j}\dot q_j)$ (or does it?). What does the author even mean with "except for the friction terms, the system shall be conservative"?
ps. which apps do you guys use (if any) to translate equations from a photo of the page in the textbook to Latex? It must have taken me 30 minutes or so only to copy this manually.