I am trying to derive the equations of motion for a Lagrangian which depends on $(q, \dot{q}, \ddot{q}).$ I proceed by the typical route via Hamilton's Principle, $\delta S = 0$ by effecting a variation $\epsilon \eta$ on the path with $\eta$ smooth and vanishing on the endpoints. After some integrating by parts and vanishing of surface terms, I arrive at (to first order in $\epsilon$): $$\delta S = \int\left[\eta\frac{\partial L}{\partial q} - \eta\frac{\mathrm{d}}{\mathrm{d} t}\left(\frac{\partial L}{\partial \dot{q}}\right) + \eta\frac{\mathrm{d}^2}{\mathrm{d}t^2}\left(\frac{\partial L}{\partial \ddot{q}}\right) + \frac{\mathrm{d}^2}{\mathrm{d}t^2}\left(\frac{\partial L}{\partial \ddot{q}} \eta \right)\right]\mathrm{d} t.$$
It is clear to me that either the last term in the integral above should vanish, or else I made an error and it ought not to appear at all. If it is the former case, by what argument does this term vanish?
@JahanClaes The part I do not like is that $q,$ $\dot{q}$, $\ddot{q}$ are to be treated as independent coordinates in the variational formalism; so then I do not believe it is the case that $\frac{\mathrm{d}}{\mathrm{d} t} \left[\frac{\partial L}{\partial \ddot{q}} \eta\right]$ is only a function of $q$ and $t,$ since it is not the case that we can write $\dot{q}$ or $\ddot{q}$ as functions of $q$ and $t$ before effecting the variation.
Is the root of my confusion clearer?
– Diffycue Dec 07 '16 at 20:08