Founded in the eighteenth century, the calculus of variations grew into a much favored mathematical tool among physicists. Scientific problems thus became the impetus for the development of the subject. William Rowan Hamilton advanced it in his course to construct a deductive framework for optics; he then applied the same ideas to mechanics. With an appropriate variational principle, one could deduce the equations of motion for a given mechanical or optical system. Soon, scientists worked out the variational principles for the theory of elasticity, electromagnetism, and fluid mechanics (and, in the future, relativity and quantum theory). Whilst variational principles did not necessarily provide a simpler way to solve problems, they were of interest for philosophical or aesthetic reasons, though scientists at this time were not as motivated by religion in their work as their predecessors. Hamilton's work in physics was great achievement; he was able to provide a unifying mathematical framework for wave propagation and particle motion. In light of this description, it becomes clear why the wave and corpuscle theories of light were equally able to account for the phenomena of reflection and refraction. Hamilton's equations also proved useful in calculating planetary orbits.