Euler's father, Paul, was a mathematically inclined Protestant minister who provided his son's elementary education... At the age of seventeen, the young man [Leonhard Euler] received his master's degree in philosophy. According to his father's wishes, he entered the theology department, but his heart yearne dfor mathematics. His father agreed to a switch in studies. Despite his turn to math, Euler retained his firm Calvinist beliefs throughout life, holding daily prayer and worship in his home and sometimes preaching...
When Russia became politically unstable in 1741, Euler accepted an invitation to move to Berlin and sailed to Prussia with his family. There he slaved for Frederick the Great, contributing enormously to the prestige of the Berlin Academy... Euler was not without enemies. Frederick, an atheist, was an unpleasant master who continually sneered at Euler's faith. Euler's Letters to a German Princess, intended to educate Frederick's niece, combined piety and the sciences. This did not sit well with the king, although it enjoyed wide readership in seven European langauges.
To make matters worse, Euler's philosophy was roundly ridiculed by the French deist Voltaire, the most articulate and glib philosopher of the day. Euler argued back by writing apologetics that defended Christianity, but his troubles grew more and more intolerable as Frederick interferred with the mathematician's work and openly gibed at him.
...Euler had lost sight in one eye in 1735, overexerting himself to solve in three days a problem intended to take months. In 1766 he lost sight in his other eye. An operation to restore the better of the two was successful, but infection invated both eyes. After horrible agony he permanently lost his sight. He later said that only his faith in God enabled him to bear those days of torment.
Undeterred, Euler continued to solve problems, using the black slate of his mind... His work actually became clearer and more concise... He worked bravely almost to the day of his death. Leonhard Euler's name is a pillar in mathematics... his defense of his faith in the face of biting criticism stands as a lasting monument to his Savior.