In 1821 Alexis Bouvard published the predicted motion of Uranus, but the planet deviated from its predicted orbit.
Two mathematicians tried independently to calculate the position of an unknown planet whose attraction might have led to the discrepancy: John Couch Adams, a Cambridge graduate trained in mathematical astronomy, and an astronomer at the Paris observatory, Urbain Le Verrier.
Adams made the first predictions, in 1845, but his communications with astronomers (and sometimes, his relations with them) were not consistent. He guessed the distance of Neptune from the Titius-Bode law and several times predicted where in the sky Neptune could be found. The Bode-Titius law unfortunately is a poor guide here--it suggested 38 AU, whereas the observed mean distance is near 30 AU. James Challis, of the Cambridge observatory, actually searched for the planet but could not find it. Perhaps Adams got less attention because he was young, not well established and a bit of a loner.
Le Verrier was a graduate of the Ecole Polytechnique and presented his prediction only in 1846. It was more accurate than the one by Adams, but again, astronomers in his own country were not keen to search for the planet. LeVerrier therefore sent his prediction to Johann Gottfried Galle, head of the Berlin observatory, who at once started looking. A student with Galle, Heinrich Louis d'Arrest (who apparently also lodged at the observatory), pointed out a sky map existing of the same region, and by comparing it to actual observations, Neptune was located that very same night.
A few weeks later William Lassell discovered a moon orbiting Neptune, and it was named Triton (after the mythological son of Poseidon-Neptune). It is quite big--diameter 2700 km. The orbits of planets and of almost all other moons, as well as the rotation of planets and of the Sun, are counter-clockwise when viewed from the northern side of the ecliptic. Triton however orbits in the opposite direction (as do 4 small moons of Jupiter and one of Saturn). It is therefore widely believed to be a captured minor planet, probably from the Kuiper belt lying beyond Neptune
Neptune itself is a gas planet very much like Uranus, with radius 3.83 times Earth's and a mean density 1.64 times that of water. Its visible disk contains mostly hydrogen and its rotation period is 16.11 hours. One big difference is the rotation axis, which is close to the perpendicuar to the ecliptic, making an angle 28.32 degrees, not too far from Earth's 23.5 degrees.
Voyager 2 passed Neptune on 25 August 1989 and observed a magnetic field, with "magnetic moment" about 25 times Earth's (for Uranus the number is about 50), but as with Uranus, the magnetic axis was also inclined steeply to the rotation axis, by 47°, making its precess rapidly around a cone.
Voyager's sensors observed Neptune to be blue like Uranus, but a different and much more intense shade of blue, and while the atmosphere of Uranus was bland, this one contained a large white cloud and a large dark spot near it, south of the equator. The Hubble telescope in 1994 no longer found that spot, but instead another one appeared north of the equator, about as big.
In addition to Triton, Neptune has 12 small moons and a narrow ring structure, which seem to change over time
Two last notes. First, modern scholars examining Galileo's drawing based on his telescope observations have noted that he did, in fact, observe Neptune, but marked it down as another distant star. The planet's motion was too slow to observe the difference between the two observations, and Galileo's telescope did not have enough resolution to make out the planetary disk.
Second, LeVerrier also calculated the motion of the planet Mercury and found a discrepancy, which renewed the search for an unknown planet "Vulcan" inside the orbit of Mercury. Such a planet was sought previously and not found, and it was never seen in total eclipses, yet the rotation of Mercury's perihelion (point closest to the Sun) was observed to exceed the calculated effect of all planets by 43 seconds of arc per century. This was explained in 1915 by Einstein's general theory of relativity,and is considered one of the crucial tests of that theory.