Mayer takes over the Goettingen Chair of Mathematics, without ever having studied at a university. In Göttingen he finds an ideal environment for his research: The prestigious Academy of Sciences welcomes him and allows him to exchange with well-known colleagues. His lectures reflect his extensive knowledge: In them are practical geometry, military architecture, Algebra, trigonometry, astronomy and mechanics are treated. He combines theoretical and practical issues.
Mayer presents his lunar tables in a lecture and explains how to use them to determine the longitude. His colleagues are enthusiastic about the method and advise Mayer to apply for the longitude price which the British Parliament has declared 40 years earlier. Because the longitude at that time could only be determined inaccurately and seafarers could not determine their position, the British fleet had experienced devastating catastrophes. To find a solution, the Longitude Committee was founded.
Mayer becomes director of the new Göttingen Observatory, which is soon considered one of the most modern in Europe. There he continues to develop Astronomic measuring instruments and takes precise measurements of many hundreds of stars. His lunar chart and lunar tables set new standards. Tables of this type were still used in the 20th century.
In the course of a longer correspondence with Leonard Euler, the renowned mathematician and physicist, he develops a theory to predict the motion of the moon. Mayer thus clarifies Newton’s theory of gravitation. Mayer is now considered one of the greatest scientists of his time. He has sent his contribution to the longitude price to London. He is offered professorships in Berlin and St. Petersburg. King George II personally supports Mayer’s whereabouts: His remuneration and powers are then significantly increased.