The works by Copernicus on the heliocentric theory were preceded by his discovery of two principal difficulties in various versions of geocentric theories that were then recognised by astronomers, philosophers, and theologians.
However, it is difficult to determine precisely when and where this happened: perhaps it was during his studies or in Cracow (1491-1494), or somewhat later in Italy.
The first difficulty lay in the incompatibility of various versions of the theory of concentric spheres (homocentric) and of Ptolemaic theories with astronomic phenomena. In the case of the theory of homocentric spheres this concerned, among other things, misrepresentation of the retrograde planetary motion (reverse movement of planets), and in the Ptolemaic theories – slow changes, such as inclination of the ecliptic and precession. Another difficulty consisted in the construction of an equant in the Ptolemaic theories, due to its being incompatible with the axioms of astronomy and cosmology (celestial physics) of Ancient Greece, namely the principle of the uniformity of circular motions in relation to the physical centre.
Both problems led Copernicus to see in the scientific texts and those devoted to philosophy (beginning with ancient works, to the works of the Renaissance period) alternative scientific hypotheses. And thus he discovered in Plato, Aristotle, Pliny, Plutarch and representatives of the Jean Buridan school an idea of the motions of the Earth: the daily motion, yearly motion, and so-called declination motion, which was propagated by the Pythagoreans (Pythagoras, Philolaus of Crotona, Ecphantus of Siracus, Heraclides of Pont, Hicetas) and by Aristarchus of Samos, as well as by the followers of Buridan.
On the basis of these cosmological ideas Copernicus created the first version of his theory. It was presented in a treatise, which is known today under this title: Nicolai Copernici de hypothesibus motuum coelestium a se constitutis commentariolus (Nicholas Copernicus's little treatise on the hypothesis formulated by himself for the heavenly motions), which was probably written around 1507–1508 and in his lifetime distributed only in transcripts. In the cosmological sense Copernicuss theory radically negated geostatic and geocentric theories that were universal in ancient times, in the Middle Ages, and in the Renaissance period, for it postulated the mobility of the Earth and immobility of the Sun, and that the Earth was no longer in the centre of the universe. In the mathematical-empirical sphere, however, Copernicuss theory was so conceived in relation to observations as to be consistent with the version of Ptolemys theory presented in the Alfonsine Tables with the exception of certain phenomena, such as stellar parallax or precession.
Between 1514 and 1529, taking into account the works on the calendar reform under the auspices of Pope Leo X, Copernicus conducted numerous observations of the Moon, the Sun, and the planets in order to determine more precisely the pattern of their motions (in the case of the Sun these observations were conducted to determine the motion of the Earth), and to specify the value of the parameters of these motions. He then discovered, among other things, the variability of the eccentricity of the Earths orbit and of the lines of apsides of the planets, and with reference to medieval astronomy, he acknowledged the variability of precessions, which in the Ptolemaic theories were considered as constant. He also developed gradually his theory in accordance with the postulated correspondence (compatibility) of empirical predictions of his theory and Ptolemaic theory in the range of the observation data used by astronomers before Copernicus (such as Ptolemy and the authors of the Alfonsine Tables).
In this regard he formulated a second, more developed version of his theory. Although the theories of Copernicus and Ptolemy postulate radically different cosmologies (heliocentric and geocentric), they are connected by certain more general rules of correspondence in the mathematical-empirical sphere, just as in the case of relations linking modern scientific theories, such as quantum and classical mechanics.
Copernicus presented the developed version of his theory in his work which today is known under the title De revolutionibus orbium coelestium (On the Revolutions of the Heavenly Spheres). The writing of this treatise started not later than in 1515–1516 and ended in June 1542. It was published in Nuremberg in 1543. The manuscript of this work is kept in the Jagiellonian Library in Cracow, and its electronic version is available on the Internet.