We develop structure-preserving variational integrators for non-autonomous Lagrangian systems by extending the prolongation–collocation variational integrator framework to explicitly time-dependent dynamics. The proposed method is obtained by discretizing Hamilton’s principle for non-autonomous Lagrangians, leading to a family of discrete Lagrangian functions defined at a fixed time step. By combining Hermite interpolation, the Euler–Maclaurin quadrature formula, and collocation applied to the Euler–Lagrange equations and their prolongations, the resulting scheme retains key qualitative properties of variational integrators, including a discrete symplectic (or cosymplectic) structure and favorable long-time behavior. We clarify the relationship between the proposed integrator and classical variational integrators for autonomous systems, showing that the method naturally reduces to the standard prolongation–collocation formulation in the time-independent case. Numerical experiments on representative examples illustrate the effectiveness of the approach and demonstrate its advantages over standard integration methods for non-autonomous systems.
Li et al. (Tue,) studied this question.