Afterwards Leonhard Euler developed the calculus of variations that was to become the most important tool in the tool kit of the theoretical physicist. The calculus of variations was useful for finding curves that were the maximal or minimal length given some set of conditions. Joseph-Louis Lagrange took Euler's results and applied them to Newtonian mechanics, now called the Principle of Least Action, in which the differential equations of motion of a given physical system are derived by minimizing the action of the system in question. For a finite system of objects, the action S is an integral over time of a function called the Lagrange function or Lagrangian L(q, dq/dt), which depends on the set of generalized coordinates and velocities (q, dq/dt) of the system in question.
The differential equations that describe the motion of the system are found by demanding that the action be at its minimum (or maximum) value, where the functional differential of the action vanishes:
This condition gives rise to the Euler-Lagrange equations
which, when applied to the Lagrangian of the system in question, gives the equations of motion for the system. As an example, take the system of a single massive particle with space coordinate x (in zero gravity). The Lagrangian is just the kinetic energy, and the action is the energy integrated over time:
The Euler-Lagrange equations that minimize the action just reproduce Newton's equation of motion for a free particle with no external forces:
The set of mathematical methods described above are collectively known as the Lagrangian formalism of mechanics.
In 1834, William Rowan Hamilton applied his work on characteristic functions in optics to Newtonian mechanics, and what is now called the Hamiltonian formalism of mechanics. The idea that Hamilton borrowed from optics was the concept of a function whose value remains constant along any path in the configuration space of the system, unless the final and initial points are varied. This function in mechanics is now called the Hamiltonian and represents the total energy of the system. The Hamiltonian formalism is related to the Lagrangian formalism by a transformation, called a Legendre transformation, from coordinates and velocities (q, dq/dt) to coordinates and momenta (q,p):
The equations of motions are derived from the Hamiltonian through the Hamiltonian equivalent of the Euler-Lagrange equations:
For a massive particle in zero gravity moving in one dimension, the Hamiltonian is just the kinetic energy, which in terms of momentum, not velocity, is just:
If the coordinate q is just the position of the particle along the x axis then the equations of motion become:
which is equivalent to the answer derived from the Lagrangian formalism. Classical mechanics would have had a brief history if only the motion of finite objects such as cannonballs and planets could be studied. But the Lagrangian formalism and the method of differential equations proved well adaptable to the study of continuous media, including the flows of fluids and vibrations of continuous n-dimensional objects such as one-dimensional strings and two-dimensional membranes. The Lagrangian formalism is extended to continuous systems by the use of a Lagrangian density integrated over time and the D-dimensional spatial volume of the system, instead of a Lagrange function integrated just over time. The generalized coordinates q are now the fields q(x) distributed over space, and we have made a transition from classical mechanics to classical field theory. The action is now written:
Here the coordinate xa refers to both time and space, and repetition implies a sum over all D+1 dimensions of space and time. For continuous media the Euler-Lagrange equations become
with functional differentiation of the Lagrange density replacing ordinary differentiation of the Lagrange function. What is the meaning of the abstract symbol q(x)? This type of function in physics that depends on space and time is called a field, and the physics of fields is called, of course, field theory. The first important classical field theory was Newton's Law of Gravitation, where the gravitational force between two particles of masses m1 and m2 can be written as:
The gravitation force F can be seen as deriving from a gravitational field G, which if we set x1=0 and x2=x, can be written as:
Newton's Law of Gravitation was the beginning of classical field theory. But the greatest achievement of classical field theory came 200 years later and gave birth to the modern era of telecommunications. Physicists and mathematicians in the 19th century were intensely occupied with understanding electricity and magnetism. In the late 19th century, James Clerk Maxwell found unified equations of motion of the electric and magnetic fields, now known as Maxwell's equations. The Maxwell equations in the absence of any charges or currents are:
Maxwell discovered that there exist electromagnetic traveling wave solutions to these equations, which can be rewritten as
and in 1873 he postulated that these electromagnetic waves solved the ongoing question as to the nature of light. The greatest year in classical field theory came in 1884 when Heinrich Hertz generated and studied the first radio waves in his laboratory. Hertz confirmed Maxwell's prediction and changed the world, and physics, forever. Maxwell's theoretical unification of electricity and magnetism was engineered into the modern human power to communicate across space at the speed of light. This was a stunning and powerful achievement for theoretical physics, one that shaped the face of coming 20th century as the century of global telecommunications.