# Deriving the Nielsen form of Lagrange's equations (Goldstein)

In chapter 1 problem 11 of Goldstein I'm asked to show that Lagrange's equations: $$\frac d {dt} \biggr(\frac {\partial T} {\partial \dot {q_j}} \biggr) - \frac {\partial T} {\partial {q_j}}=Q_j$$ can be written as:

$$\frac {\partial \dot T} {\partial \dot {q_j}} - 2\frac {\partial T} {\partial {q_j}}=Q_j.$$

$$\dot T = \sum_i \frac {\partial T} {\partial q_i} \dot {q_i} +\sum_i \frac {\partial T} {\partial \dot {q_i}} \ddot {q_i} +\frac {\partial T} {\partial t}$$

$$\frac {\partial \dot T} {\partial \dot {q_j}} = \sum_i \frac {\partial T} {\partial q_i \partial \dot {q_j}} \dot {q_i} +\sum_i \frac {\partial T} {\partial \dot {q_i} \partial \dot {q_j}} \ddot {q_i} +\frac {\partial T} {\partial t} +\frac {\partial T} {\partial q_j}=\frac d {dt} \biggr(\frac {\partial T} {\partial \dot {q_j}} \biggr)+\frac {\partial T} {\partial q_j}$$ and move on from here.

My problem is that the $$\ddot q_i$$ are not being held constant when taking the partial derivative, they are functions of $$\textbf q,\dot {\textbf {q}},t$$, so the second line should include another term: $$\sum_i \frac {\partial T} {\partial \dot {q_i}} \frac {\partial \ddot {q_i}} {\partial \dot q_j},$$ which messes up the derivation. What am I missing here?

The short answer is that $$\ddot{q}_i$$ does not depend on $$\dot{q}_j$$.

Let's repeat the computation, explicitly writing the independent variables the functions depends on. The kinetic energy $$T$$ is a function of the generalized coordinates $$q_i$$, their time derivative $$\dot{q}_i$$ and time $$t$$. Generalized coordinates and their derivative are functions of time $$q_i(t)$$, $$\dot{q}_i(t)$$. The kinetic energy can be written as

$$T(\dot{q}_i(t), q_i(t), t)$$.

Before computing time derivative of $$T$$, let's clearly state that the partial derivative w.r.t. $$\dot{q}_j$$ is a function of $$\dot{q}_i(t), q_i(t), t$$ as well,

$$\dfrac{\partial T}{\partial \dot{q}_k} (\dot{q}_i(t), q_i(t), t)$$,

so that its time derivative reads

$$\dfrac{d}{dt} \left(\dfrac{\partial T}{\partial \dot{q}_k}(\dot{q}_i(t), q_i(t), t) \right)= \left[\dfrac{\partial}{\partial t} + \ddot{q_j}(t) \dfrac{\partial}{\partial \dot{q}_j} + \dot{q_j}(t) \dfrac{\partial}{\partial q_j} \right] \dfrac{\partial T}{\partial \dot{q}_k}(\dot{q}_i(t), q_i(t), t) \qquad \qquad (1)$$.

Now, we can evaluate the time derivative of the kinetic energy

$$\dfrac{d T}{dt}(\ddot{q}_i(t), \dot{q}_i(t), q_i(t), t) = \dfrac{\partial T}{\partial t}(\dot{q}_i(t), q_i(t), t) + \ddot{q_j}(t) \dfrac{\partial T}{\partial \dot{q}_j} (\dot{q}_i(t), q_i(t), t) + \dot{q_j}(t) \dfrac{\partial T}{\partial q_j}(\dot{q}_i(t), q_i(t), t)$$,

so that its derivative w.r.t. $$\dot{q}_j$$ reads (without explicitly writing the independent variables of the functions, for brevity),

$$\dfrac{\partial}{\partial \dot{q}_k}\dfrac{d T}{dt} = \underbrace{\dfrac{\partial}{\partial \dot{q}_k}\dfrac{\partial T}{\partial t} + \ddot{q_j}(t) \dfrac{\partial}{\partial \dot{q}_k}\dfrac{\partial T}{\partial \dot{q}_j} + \dot{q_j}(t) \dfrac{\partial}{\partial \dot{q}_k}\dfrac{\partial T}{\partial q_j}}_{\frac{d}{dt}\frac{\partial T}{\partial \dot{q}_k}} + \dfrac{\partial T}{\partial q_k} \qquad \qquad (2)$$.

Finally, using (2) in Lagrange equation, you get the desired equation

$$\dfrac{\partial}{\partial \dot{q}_k} \dfrac{d T}{d t} - 2 \dfrac{\partial T}{\partial q_k} = Q_k$$.