Born at Woolsthorpe, England, Sir Isaac Newton was educated at Trinity College, Cambridge University, where he graduated in 1665. During the plague of 1666, he remained at Woolsthorpe, during which time he formulated his theory of fluxions (the infinitesimal calculus) and the main outlines of his theories of mechanics, astronomy, and optics, including the theory of universal gravitation. The results of his researches were not circulated until 1669, but when he returned to Trinity in 1667, he was immediately appointed to succeed his teacher as professor of mathematics. His greatest work, the Mathematical Principles of Natural Philosophy, was published in 1687 to immediate and universal acclaim. Newton was elected to Parliament in 1689. In 1699, he was appointed head of the royal mint, and four years later he was elected president of the Royal Society; both positions he held until his death. In later life, Newton devoted his main intellectual energies to theological speculation and alchemical experiments. In April 1705, Queen Anne knighted Newton during a royal visit to Trinity College, Cambridge. He was only the second scientist to have been awarded knighthood. Newton died in his sleep in London on March 31, 1727, and was buried in Westminster Abbey. Because of his scientific nature, Newton's religious beliefs were never wholly known. His study of the laws of motion and universal gravitation became his best-known discoveries, but after much examination he admitted that, "Gravity explains the motions of the planets, but it cannot explain who set the planets in motion. God governs all things and knows all that is or can be done."