A proof for $\delta(dq(t)/dt)=d(\delta(q(t))/dt$? I have seen that in the calculation of dynamics we use the variational principle for the action.
This eqality is used in the integration by parts of the integral that defines the action:
$\delta(dq(t)/dt)=d(\delta(q(t))/dt$
Looking for a proof!
In words, we say that the variation of the derivative is equal to the derivative of the variation, but that is not trivial to me!
Is this proof correct?:
Consider a function $q(t)$, and let $\delta q$ be the small, finite change in the value of this function at a particular point in time. Mathematically, we can write this as:
$\delta q = q(t + \epsilon) - q(t)$, where $\epsilon$ is an infinitesimal quantity.
Next, we take the derivative of both sides with respect to time:
$\frac{d}{dt}(\delta q) = \frac{d}{dt} \left( q(t + \epsilon) - q(t) \right)$.
Using the definition of the derivative, we can simplify this to:
$\frac{d}{dt}(\delta q) = \frac{dq(t + \epsilon)}{dt} - \frac{dq(t)}{dt}$.
Finally, we can use the definition of $\delta$ to obtain:
$\frac{d}{dt}(\delta q) = \frac{dq(t + \epsilon)}{dt} - \frac{dq(t)}{dt} = \delta(\frac{dq}{dt})$.
This completes the proof of the equality $\delta(\frac{dq}{dt}) = \frac{d}{dt}(\delta q)$.
 A: This is the very simple and classical theorem on equality on mixed partials (which I will not prove, since you can follow the link there or refer to any respectable multivariable calculus text)… after you wrap your head around the annoyingly sloppy and confusing definitions Physics texts provide.
Suppose you first have a curve $q:J\to\Bbb{R}^n$, where $J\subset\Bbb{R}$ is an open interval. A one-parameter deformation of this curve is by definition a mapping $Q:I\times J\to\Bbb{R}^n$, where $I\subset\Bbb{R}$ is an open interval around the origin, such that $Q(0,\cdot)=q(\cdot)$. What this is saying is you start with a curve $t\mapsto q(t)$, defined for $t\in J$. A one-parameter deformation means I have to provide for each $\epsilon\in I$ (think of $\epsilon$ as a sufficiently small number), a curve $t\mapsto Q(\epsilon,t)$, i.e one curve for each $\epsilon$, and such that at $\epsilon=0$, I have the original curve. By imposing smoothness conditions on $Q$, I can think of $Q(\epsilon,\cdot)$ as being a “slightly perturbed curve” of $q(\cdot)$.
Now, we define the variation of the one-parameter family $Q$  to be the curve $\delta q:J\to\Bbb{R}^n$, defined by $\delta q(t)=\frac{\partial Q}{\partial \epsilon}(0,t)$ (derivative with respect to $\epsilon$ at $\epsilon=0$). Likewise, you can consider the variation of the one-parameter family of curves $\frac{\partial Q}{\partial t}:I\times J\to\Bbb{R}^n$, which Physicists denote $\delta\dot{q}:J\to\Bbb{R}^n$, and is defined to be $\frac{\partial}{\partial\epsilon}\left(\frac{\partial Q}{\partial t}\right)(0,t)$.
So, the equality you seek is just expressing the fact that if $Q$ is a smooth enough mapping, then $\frac{\partial^2Q}{\partial\epsilon\partial t}(0,t)=\frac{\partial^2Q}{\partial t\partial\epsilon}(0,t)$, i.e “variation of time derivative is time derivative of variation”.
