It is known that both Bach and Euler were at the court of Frederick II in Berlin at the same time. It is therefore quite possible that they met. Leonhard Euler was one of the greatest mathematicians the world has ever seen. Of course, Bach was in many people’s eyes the greatest composer in history. So there would certainly have been some brain power in that room.
In 1739 Euler wrote the Tentamen novae theoriae musicae, hoping to eventually incorporate musical theory as part of mathematics. This part of his work, however, did not receive wide attention and was once described as too mathematical for musicians and too musical for mathematicians.
According to Stacy Langton at the University of San Diego, at least part of this work was translated into German by J.S. Bach’s student Lorenz Christoph Mizler. Mizler founded the Correspondierende Societät der musicalischen Wissenschaften (de) (or “Corresponding Society of the Musical Sciences”) in 1738 of which Bach was a member. It is highly likely therefore that Bach was familiar with both Euler and Euler’s paper.
Leonhard Euler (15 April 1707 – 18 September 1783) was a pioneering Swiss mathematician and physicist. He made important discoveries in fields as diverse as infinitesimal calculus and graph theory. He also introduced much of the modern mathematical terminology and notation, particularly for mathematical analysis, such as the notion of a mathematical function. He is also renowned for his work in mechanics, fluid dynamics, optics, and astronomy.
Euler is considered to be the pre-eminent mathematician of the 18th century and one of the greatest mathematicians ever. He is also one of the most prolific mathematicians ever; his collected works fill 60–80 quarto volumes. He spent most of his adult life in St. Petersburg, Russia, and in Berlin, Prussia.
Lorenz Christoph Mizler von Kolof (26 July 1711 – 8 May 1778) was a German physician, historian, printer, mathematician, Baroque music composer, and precursor of the Polish Enlightenment. Mizler, an amateur composer, was deeply interested in music theory, advocating the establishment of a musical science based firmly on mathematics; philosophy; and the imitation of nature in music.
He founded the Correspondierende Societät der musicalischen Wissenschaften (de) (or “Corresponding Society of the Musical Sciences”) in 1738. Its aim was to enable musical scholars to circulate theoretical papers in order to further musical science by encouraging discussion of the papers via correspondence. The entry requirements of this society resulted in both the famous 1746/1748 Haussmann portrait of Bach and his Canonic Variations on “Vom Himmel hoch da komm’ ich her” for organ, BWV 769. George Frideric Handel was also a member.