  Onsager and Machlup proposed a second order variational-principle in order to include inertial effects into the Langevin-equation, giving a Lagrangian with second order derivatives in time. This but violates Ostrogradysky's theorem, which proves that Lagrangians with higher than first order derivatives are meaningless. As a consequence, inertial effects cannot be included in a standard way. By using the canonical formalism, we suggest a solution to this fundamental problem. Furthermore, we provide elementary arguments about the hierarchy of immersions and actions between an ideal system and several environments and show, that the structure of the Lagrangian sensitively depends on this hierarchy. 
On Newton's equation of motion with friction and stochastic noise, the   Ostrogradsky-instability and the hierarchy of environments, An application of   the Onsager-Machlup theory II