We discussed the Lagrangian and Hamiltonian formulations of physics in My Favorite Equation in Physics, in our discussion of the historical development of classical physics right before the dawn of the revolutionary ideas of relativity and quantum mechanics at the turn of the 20th century. In this post we discuss them further, and more importantly, we provide some examples.
In order to discuss Lagrangians and Hamiltonians we first need to discuss the concept of energy. Energy is a rather abstract concept, but it can perhaps best be described as a certain conserved quantity – historically, this was how energy was thought of, and the motivation for its development under Rene Descartes and Gottfried Wilhelm Liebniz.
Consider for example, a stone at some height above the ground. From this we can compute a quantity called the potential energy (which we will symbolize by ), which is going to be, in our case, given by
where is the mass of the stone and is the acceleration due to gravity, which close to the surface of the earth can be considered a constant roughly equal to meters per second per second.
As the stone is dropped from that height, it starts to pick up speed. As it height decreases, its potential energy will also decrease. However, it will gain an increase in a certain quantity called the kinetic energy, which we will write as and define as
where is the magnitude of the velocity. In our case, since we are considering only motion in one dimension, this is simply given by the speed of the stone. At any point in the motion of the stone, however, the sum of the potential energy and the kinetic energy, called the total mechanical energy, stays at the same value. This is because as the amount by which the potential energy decreases is the same as the amount by which the kinetic energy decreases.
The expression for kinetic energy remains the same for any nonrelativistic system. The expression for the potential energy depends on the system, however, and is related to the force as follows:
We now give the definition of the quantity called the Lagrangian (denoted by ). It is simply given by
There is a related quantity to the Lagrangian, called the action (denoted by ). It is defined as
For a single particle, the Lagrangian depends on the position and the velocity of the particle. More generally, it will depend on the so-called “configuration” of the system, as well as the “rate of change” of this configuration. We will represent these variables by and respectively (the “dot” notation is the one developed by Isaac Newton to represent the derivative with respect to time; in the notation of Liebniz, which we have used up to now, this is also written as ).
To explicitly show this dependence, we write the Lagrangian as . Therefore we shall write the action as follows:
The Lagrangian formulation is important because it allows us to make a connection with Fermat’s principle in optics, which is the following statement:
Light always moves in such a way that it minimizes its time of travel.
Essentially, the Lagrangian formulation allows us to restate the good old Newton’s second law of motion as follows:
An object always moves in such a way that it minimizes its action.
In order to make calculations out of this “principle”, we have to make use of the branch of mathematics called the calculus of variations, which was specifically developed to deal with problems such as these. The calculations are fairly involved, but we will end up with the so-called Euler-Lagrange equations:
We are using the notation instead of the otherwise cumbersome notation . It is very common notation in physics to write to refer to the derivative “operator” (see also More Quantum Mechanics: Wavefunctions and Operators).
For a nonrelativistic system, Euler-Lagrange equations are merely a restatement of Newton’s second law; in fact we can plug in the expressions for the Lagrangian, the kinetic energy, and the potential energy we wrote down earlier and end up exactly with .
Why then, go to all the trouble of formulating this new language, just to express something that we are already familiar with? Well, aside from the “aesthetically pleasing” connection with the very elegant Fermat’s principle, there are also numerous advantages to using the Lagrangian formulation. For instance, it exposes the symmetries of the system, as well as its conserved quantities (both of which are very important in modern physics). Also, the configuration is not always simply just the position, which means that it can be used to describe systems more complicated than just a single particle. Using the concept of a Lagrangian density, it can also describe fields like the electromagnetic field.
We make a mention of the role of the Lagrangian formulation in quantum mechanics. The probability that a system will be found in a certain state (which we write as ) at time , given that it was in a state at time , is given by (see More Quantum Mechanics: Wavefunctions and Operators)
where is the Hamiltonian (more on this later). The quantity
is called the transition amplitude and can be expressed in terms of the Feynman path integral
This is not an ordinary integral, as may be inferred from the different notation using instead of . What this means is that we sum the quantity inside the integral, , over all “paths” taken by our system. This has the rather mind blowing interpretation that in going from one point to another, a particle takes all paths. One of the best places to learn more about this concept is in the book QED: The Strange Theory of Light and Matter by Richard Feynman. This book is adapted from Feynman’s lectures at the University of Auckland, videos of which are freely and legally available online (see the references below).
We now discuss the Hamiltonian. The Hamiltonian is defined in terms of the Lagrangian by first defining the conjugate momentum :
Then the Hamiltonian is given by the formula
In contrast to the Lagrangian, which is a function of and , the Hamiltonian is expressed as a function of and . For many basic examples the Hamiltonian is simply the total mechanical energy, with the kinetic energy now written in terms of instead of as follows:
The advantage of the Hamiltonian formulation is that it shows how the state of the system “evolves” over time. This is given by Hamilton’s equations:
These are differential equations which can be solved to know the value of and at any instant of time . One can visualize this better by imagining a “phase space” whose coordinates are and . The state of the system is then given by a point in this phase space, and this point “moves” across the phase space according to Hamilton’s equations.
The Lagrangian and Hamiltonian formulations of classical mechanics may be easily generalized to more than one dimension. We will therefore have several different coordinates for the configuration; for the most simple examples, these may refer to the Cartesian coordinates of 3-dimensional space, i.e. , , . We summarize the important formulas here:
In quantum mechanics, the Hamiltonian formulation still plays an important role. As described in More Quantum Mechanics: Wavefunctions and Operators, the Schrodinger equation describes the time evolution of the state of a quantum system in terms of the Hamiltonian. However, in quantum mechanics the Hamiltonian is not just a quantity but an operator, whose eigenvalues usually correspond to the observable values of the energy of the system.
In most modern publications discussing modern physics, the Lagrangian and Hamiltonian formulations are used, in particular for their various advantages. Although we have limited this discussion to nonrelativistic mechanics, in relativity both formulations are still very important. The equations of general relativity, also known as Einstein’s equations, may be obtained by minimizing from the Einstein-Hilbert action. Meanwhile, there also exists a Hamiltonian formulation of general relativity called the Arnowitt-Deser-Misner formalism. Even the proposed candidates for a theory of quantum gravity, string theory and loop quantum gravity, make use of these formulations (the Lagrangian formulation seems to be more dominant in string theory, while the Hamiltonian formulation is more dominant in loop quantum gravity). It is therefore vital that anyone interested in learning about modern physics be at least comfortable in the use of this language.
Lagrangian Mechanics on Wikipedia
Hamiltonian Mechanics on Wikipedia
Path Integral Formulation on Wikipedia
The Douglas Robb Memorial Lectures by Richard Feynman
QED: The Strange Theory of Light and Matter by Richard Feynman
Mechanics by Lev Landau and Evgeny Lifshitz
Classical Mechanics by Herbert Goldstein