Astronomer William Herschel discovered Uranus in 1781. It was the first planet to be discovered through a telescope and the first that had not been under constant observation since ancient times. In the years after its discovery, astronomers tracked the new planet very carefully. They discovered perturbations in its orbit, some of which could be explained by the gravitational effects of known planets such as Jupiter and Saturn, while others led to the discovery of the hitherto unknown planet Neptune.
Solar System Dynamics
By the time that Uranus was discovered, the physical laws governing the dynamics of the solar system were very well understood. The only force involved is gravity, which can be combined with Newton's laws of motion to provide a comprehensive mathematical description of planetary orbits. The resulting equations are extremely rigorous, allowing the motion of a planet across the sky to be predicted with a high degree of accuracy. This had already been done for the previously known planets, and it was done for Uranus within two years of its discovery.
Initially, the motion of Uranus appeared to follow the predictions very well. Gradually, however, the observed location of the planet began to diverge from its expected position. By 1830 the discrepancy was more than four times the diameter of the planet and could no longer be ignored. One explanation, favored by some astronomers, was that Newton's formulation of gravity was in error, resulting in predictions that were approximately but not precisely correct. The only other possibility was that an unknown object was orbiting somewhere in the outer reaches of the solar system.
Predicting a New Planet
The original calculations of the orbit of Uranus took into account the gravitational effects of all the known objects in the solar system. The primary effect was from the sun, but there were perturbing effects from the giant planets Jupiter and Saturn. The observed discrepancy suggested that there was another large planet waiting to be discovered beyond the orbit of Uranus. In theory, the orbit of this undiscovered planet could be calculated with reasonable precision based on the observed perturbations in the position of Uranus. These calculations were carried out in 1843 by an English astronomer, John Couch Adams, but unfortunately their significance was not recognized in England at the time.
The Discovery of Neptune
Calculations very similar to those of Adams were carried out by a French scientist, Urbain Le Verrier, shortly afterward. Using Le Verrier's figures, astronomers at the Berlin Observatory discovered the predicted planet in 1846, and it was subsequently given the name of Neptune. Following the discovery of Neptune and well into the 20th century, there was controversy over whether its existence fully explained the residual perturbations in the orbit of Uranus. But most astronomers today believe that this is indeed the case.