The Moon is the Earth’s nearest celestial neighbour and the most prominent object in the night sky. People have been tracking, observing and recording the movements of the Moon for thousands of years, so one could assume that calculating its orbit around the Earth should be a reasonable simple matter, however in reality it is anything but.

The problem can be found in the law of gravity itself, which states that any two bodies mutually attract each other. However, that attraction is not restricted to just those two bodies but all bodies attract each other simultaneously. Given the relative masses of somebody standing next to you and the Earth, when calculating the pull of gravity on you, we can, in our calculation, neglect the pull exercised by the mass of your neighbour. With planets, however, it is more difficult to ignore multiple sources of gravitational force. We briefly touched on the gravitational effect of Jupiter and Saturn, both comparatively large masses, on the flight paths of comets, so called perturbation. In fact when calculating the Earth orbit around the Sun then the effects of those giant planets, whilst relatively small, are in fact detectable.

With the Moon the problem is greatly exacerbated. The gravitation attraction between the Earth and the Moon is the primary force that has to be considered but the not inconsiderable gravitational attraction between the Sun and the Moon also plays an anything but insignificant role. The result is that the Moon’s orbit around the ~~Sun ~~Earth is not the smooth ellipse of Kepler’s planetary laws that it would be if the two bodies existed in isolation but a weird, apparently highly irregular, dance through the heavens as the Moon is pulled hither and thither between the Earth and the Sun.

Kepler in fact did not try to apply his laws of planetary motion to the Moon simply leaving it out of his considerations. The first person to apply the Keplerian elliptical astronomy to the Moon was Jeremiah Horrocks (1618–1641), an early-convinced Keplerian, who was also the first person to observe a transit of Venus having recalculated Kepler’s Rudolphine Tables in order to predict to correct date of the occurrence. Horrocks produced a theory of the Moon based on Kepler’s work, which was far and away the best approximation to the Moon’s orbit that had been produced up till that time but was still highly deficient. This was the model that Newton began his work with as he tried to make the Moon’s orbit fit into his grand gravitational theory, as defined by his three laws of motion, Kepler’s three laws of planetary motion and the inverse square law of gravity; this would turn into something of a nightmare for Newton and cause a massive rift between Newton and John Flamsteed the Astronomer Royal.

What Newton was faced with was attempting to solve the three-body problem, that is a general solution for the mutual gravitational attraction of three bodies in space. What Newton did not and could not know was that the general analytical solution simple doesn’t exist, the proof of this lay in the distant future. The best one can hope for are partial local solutions based on approximations and this was the approach that Newton set out to use. The deviations of the Moon, perturbations, from the smooth elliptical orbit that it would have if only it and the Earth were involved are not as irregular as they at first appear but follow a complex pattern; Newton set out to pick them off one by one. In order to do so he need the most accurate data available, which meant new measurement made during new observations by John Flamsteed the Astronomer Royal.

For Newton solving the lunar orbit was the most pressing problem in his life and he imperiously demanded that Flamsteed supply him with the data that he required to make his calculations. For Flamsteed the important task in his life, as an observational astronomer, was to complete a new star catalogue on a level of observational accuracy hitherto unknown. The principle interests of the two men were thus largely incompatible. Newton demanded that Flamsteed use his time to supply him with his lunar data and Flamsteed desired to use his time to work on his star catalogue, although to be fair he did supply Newton, if somewhat grudgingly with the desired data. As Newton became more and more frustrated by the problems he was trying to solve the tone of his missives to Flamsteed in Greenwich became more and more imperious and Flamsteed got more and more frustrated at being treated like a lackey by the Lucasian Professor. The relations between the two degenerated rapidly.

The situation was exacerbated by the presence of Edmond Halley in the mix, as Newton’s chief supporter. Halley had started his illustrious career as a protégée of Flamsteed’s when he, still an undergraduate, sailed to the island of Saint Helena to make a rapid survey of the southern night skies for English navigators. The men enjoyed good relations often observing together and with Halley even deputising for Flamsteed at Greenwich when he was indisposed. However something happened around 1686 and Flamsteed began to reject Halley. It reached a point where Flamsteed, who was deeply religious with a puritan streak, disparaged Halley as a drunkard and a heathen. He stopped referring him by name calling him instead Reymers, a reference to the astronomer Nicolaus Reimers Ursus (1551–1600). Flamsteed was a glowing fan of Tycho Brahe and he believed Tycho’s accusation that Ursus plagiarised Tycho’s system. So Reymers was in his opinion a highly insulting label.

Newton only succeeded in resolving about half of the irregularities in the Moon’s orbit and blamed his failure on Flamsteed. This led to one of the most bizarre episodes in the history of astronomy. In 1704 Newton was elected President of the Royal Society and one of his first acts was to call Flamsteed to account. He demanded to know what Flamsteed had achieved in the twenty-nine years that he had been Astronomer Royal and when he intended to make the results of his researches public. Flamsteed was also aware of the fact that he had nothing to show for nearly thirty years of labours and was negotiating with Prince George of Denmark, Queen Anne’s consort, to get him to sponsor the publication of his star catalogue. Independently of Flamsteed, Newton was also negotiating with Prince George for the same reason and as he was now Europe’s most famous scientist he won this round. George agreed to finance the publication, and was, as a reward, elected a member of the Royal Society.

Newton set up a committee, at the Royal Society, to supervise the work with himself as chairman and the Savilian Professors of Mathematics and Astronomy, David Gregory and Edmond Halley, both of whom Flamsteed regarded as his enemies, Francis Robartes an MP and teller at the Exchequer and Dr John Arbuthnotmathematician, satirist and physician extraordinary to Queen Anne. Although Arbuthnot, a Tory, was of opposing political views to Newton, a Whig, he was a close friend and confidant. Flamsteed was not offered a place on this committee, which was decidedly stacked against him.

Flamsteed’s view on what he wanted published and how it was to be organised and Newton’s views on the topic were at odds from the very beginning. Flamsteed saw his star catalogue as the centrepiece of a multi-volume publication, whereas all that really interested Newton was his data on the planetary and Moon orbits, with which he hoped to rectify his deficient lunar theory. What ensued was a guerrilla war of attrition with Flamsteed sniping at the referees and Newton and the referees squashing nearly all of Flamsteed wishes and proposals. At one point Newton even had Flamsteed ejected from the Royal Society for non-payment of his membership fees, although he was by no means the only member in arrears. Progress was painfully slow and at times virtually non-existent till it finally ground completely to a halt with the death of Prince George in 1708.

George’s death led to a two-year ceasefire in which Newton and Flamsteed did not communicate but Flamsteed took the time to work on the version of his star catalogue that he wanted to see published. Then in 1710 John Arbuthnot appeared at the council of the Royal society with a royal warrant from Queen Anne appointing the president of the society and anybody the council chose to deputise ‘constant Visitors’ to the Royal Observatory at Greenwich. ‘Visitor’ here means supervisor in the legal sense. Flamsteed’s goose was well and truly cooked. He was now officially answerable to Newton. Instead of waiting for Flamsteed to finish his star catalogue the Royal Society produced and published one in the form that Newton wanted and edited by Edmond Halley, the man Flamsteed regarded as his greatest enemy. It appeared in 1712. In 1713 Newton published the second edition of his *Principia* with its still defective lunar theory but with Flamsteed name eliminated as far as possible.

The farce did not end here. In 1714 Queen Anne died and the Visitor warrant thus lost its validity. The Tory government fell and the Whigs regained power. Newton’s political sponsor, Charles Montagu, 1^{st} Earl of Halifax, died in 1715 leaving him without a voice in the new government. Flamsteed, however, was friends with the Lord Chamberlain, Lord Boulton. On 30 November 1715 Boulton signed a warrant ordering Newton and co to hand over the remaining 300 copies of their ‘pirate’ catalogue to Flamsteed. After some procrastination and some more insults aimed at Flamsteed they finally complied on 28 March 1716. Flamsteed “made a *Sacrifice of them to Heavenly truth*”, that is he burnt them. Flamsteed had in the mean time published his star catalogue at his own expense and devoted the rest of his life to preparing the rest of his life’s work for publication. He died in 1719 but his widow, Margaret, and two of his former assistants, Joseph Crosthwait and Abraham Sharp, edited and published his *Historia coelestis britannia *in three volumes in 1725; it is rightly regarded as a classic in the history of celestial observation. Margaret also took her revenge on Halley, who succeeded Flamsteed as Astronomer Royal. Flamsteed had paid for the instruments in the observatory at Greenwich out of his own pocket, so she stripped the building bare leaving Halley with an empty observatory without instruments. For once in his life Newton lost a confrontation with a scientific colleague, of which there were quite a few, game, set and match

The bitter and in the end unseemly dispute between Newton and Flamsteed did nothing to help Newton with his lunar theory problem and to bring his description of the Moon’s orbit into line with the law of gravity. In the end this discrepancy in the *Principia *remained beyond Newton’s death. Mathematicians and astronomers in the eighteen century were well aware of this unsightly defect in Newton’s work and in the 1740s Leonhard Euler (1707–1783), Alexis Clairaut (1713–1765) and Jean d’Alembert (1717–1783) all took up the problem and tried to solve it, in competition with each other. For a time all three of them thought that they would have to replace the inverse square law of gravity, thinking that the problem lay there. Clairaut even went so far as to announce to the Paris Academy on 15 November 1747 that the law of gravity was false, to the joy of the Cartesian astronomers. Having then found a way of calculating the lunar irregularities using approximations and confirming the inverse square law, Clairaut had to retract his own announcement. Although they had not found a solution to the three-body problem the three mathematicians had succeeded in bringing the orbit of the Moon into line with the law of gravity. The first complete, consistent presentation of a Newtonian theory of the cosmos was presented by Pierre-Simon Laplace in his *Traité de mécanique céleste*, 5 Vol., Paris 1798–1825.

Mathematicians and astronomers were still not happy with the lack of a general solution to the three-body problem, so in 1887 Oscar II, the King of Sweden, advised by Gösta Mittag-Leffler offered a prize for the solution of the more general n-body problem.

Given a system of arbitrarily many mass points that attract each according to Newton’s law, under the assumption that no two points ever collide, try to find a representation of the coordinates of each point as a series in a variable that is some known function of time and for all of whose values the series converge uniformly.

Nobody succeeded in solving the challenge but Henri Poincaré’s attempt to find a solution although not successful, contained enough promising leads that he was awarded the prize. As stated a solution to the problem was found for three bodies by Karl F Sundman in 1912 and generalised for more than three bodies by Quidong Wang in the 1990s.

The whole episode of Newton’s failed attempt to find a lunar theory consonant with his theory of gravitation demonstrates that even the greatest of mathematicians can’t solve everything. It also demonstrates that the greatest of mathematicians can behave like small children having a temper tantrum if they don’t get their own way.