# Why does the path modification ($\delta$) commute with the time derivative in the derivation of the Euler-Lagrange equation?

When deriving the Euler-Lagrange equation my notes bring the $$\delta$$ into the action integral, which is fine, which gives

$$\delta S=\int_{t_0}^{t_1}dt \frac{\partial \mathcal L}{\partial q_i}\delta q_i+\frac{\partial \mathcal L}{\partial \dot q_i}\delta \dot q_i \tag{1}.$$

We then use the fact that the time derivative of $$q_i$$ and the path modification $$\delta$$ commute to find:

$$\delta \left(\frac{dq_i}{dt}\right)=\frac{d}{dt}(\delta q_i) \tag{2}.$$

From here the derivation is fairly standard, my problem is why these two operations commute. $$dq_i/dt$$ is the "velocity" of that coordinate at a point along the trajectory, but surely if we modify the trajectory the velocity at that same point is no longer guaranteed to be the same? So why are we allowed to modify the path and then take the time derivative and guarantee we get the same value?

Let's start by assuming $$q_i$$ and $$\dot q_i$$ are completely separate coordinates. They both have to be varied separately $$q_i\rightarrow q_i'=q_i+\delta q_i\\ \dot q_i\rightarrow \dot q_i'=\dot q_i+\delta\dot q_i$$ Now we know that in reality $$\dot q_i$$ is the time derivative of $$q_i$$, so we can impose $$\dot q_i=\frac d{dt}q_i$$. Plugging this in the varied form gives $$\dot q_i'=\frac d{dt}\left(q_i+\delta q_i\right)=\dot q_i+\frac d{dt}\delta q_i$$ By definition $$\delta \dot q_i=\dot q_i'-\dot q_i$$. Combining this with this last equation gives $$\frac d{dt}\delta q_i=\delta \dot q_i=\delta\left(\frac d{dt}q_i\right)$$
• Ahh actually that phrase "$q_i$ and $\dot q_i$ are completely separate coordinates" does sound familiar. Solved, thank you! May 15 '20 at 10:38