The stability of the Solar System is a subject of much inquiry in astronomy. Though the planets have been stable when historically observed, and will be in the short term, their weak gravitational effects on one another can add up in unpredictable ways. For this reason (among others) the Solar System is stated to be chaotic, and even the most precise long-term models for the orbital motion of the Solar System are not valid over more than a few tens of millions of years.
The Solar System is stable in human terms, and far beyond, given that none of the planets will probably collide with each other or be ejected from the system in the next few billion years, and the Earth's orbit will be relatively stable.
Since Newton's law of gravitation (1687), mathematicians and astronomers (such as Laplace, Lagrange, Gauss, Poincaré, Kolmogorov, Vladimir Arnold and Jürgen Moser) have searched for evidence for the stability of the planetary motions, and this quest led to many mathematical developments, and several successive 'proofs' of stability of the Solar System.
The orbits of the planets are open to long-term variations, and modeling the Solar System is subject to the n-body problem.
Resonance happens when any two periods have a simple numerical ratio. The most fundamental period for an object in the Solar System is its orbital period, and orbital resonances pervade the Solar System. In 1867, the American astronomer Daniel Kirkwood noticed that asteroids in the asteroid belt are not randomly distributed. There were distinct gaps in the belt at locations that corresponded to resonances with Jupiter. For example, there were no asteroids at the 3:1 resonance – a distance of 2.5 AU – or at the 2:1 resonance at 3.3 AU (AU is the astronomical unit, or essentially the distance from sun to earth).