The existence of a shadow HamiltonianH for discrete classical dynamics, obtained by an asymptotic expansion for a discrete symplectic algorithm, is employed to determine the limit of stability for molecular dynamics (MD) simulations with respect to the time-increment h of the discrete dynamics. The investigation is based on the stability of the shadow energy, obtained by including the first term in the asymptotic expansion, and on the exact solution of discrete dynamics for a single harmonic mode. The exact solution of discrete dynamics for a harmonic potential with frequency ω gives a criterion for the limit of stability h ≤ 2/ω. Simulations of the Lennard-Jones system and the viscous Kob-Andersen system show that one can use the limit of stability of the shadow energy or the stability criterion for a harmonic mode on the spectrum of instantaneous frequencies to determine the limit of stability of MD. The method is also used to investigate higher-order central difference algorithms, which are symplectic and also have shadow Hamiltonians, and for which one can also determine the exact criteria for the limit of stability of a single harmonic mode. A fourthorder central difference algorithm gives an improved stability with a factor of √ 3, but the overhead of computer time is a factor of at least two. The conclusion is that the second-order "Verlet"-algorithm, most commonly used in MD, is superior. It gives the exact dynamics within the limit of the asymptotic expansion and this limit can be estimated either from the conserved shadow energy or from the instantaneous spectrum of harmonic modes.