Add a new page:
We are familiar with the fact that the choice of variables (coordinates) can make all the difference to the tractability of a problem in mechanics. For example, a lever can be modelled as a near infinity of atoms, or as a ‘lever arm’ with just one position coordinate (the angle, θ ) and the condition of ‘rigidity’. We are inclined to think that the second version is an improvement over the first, but Hamilton realized that it is not always best to have the sparest, most economical description; sometimes even an increase in the number of coordinates can lead to greater insights. Specifically, Hamilton brought in a doubling of the number of coordinates in any mechanics problem. This was no mere doubling of the number of dimensions (as would be the case in going from, say, a class of 25 children to a class of 50 children) but a doubling in the ‘dimensionality’ of the problem (as in going from ‘children’ to ‘boys’ and ‘girls’). This analogy is useful but too simple, it doesn’t demonstrate Hamilton’s further requirement - that the two kinds of variable must be dynamically related.
[…]
A short allegory will help to explain the different aims of Lagrangian Mechanics and Hamilton’s Mechanics - and explain why we do bother. Imagine that we are keen on golf and want to improve our stroke. On Saturday, we are at the tee of hole number 18, we have selected our golf club, have an ample supply of identical golfballs, and proceed to hit 100 balls toward flag number 18. Exhausted, we walk over to the putting green and count up the number of balls we find there. The next day (Sunday) we again drive 100 balls, but just as we’re about to walk to hole 18 it starts to rain and we head, instead, for the clubhouse, where tea and scones awaits us. Fortunately, our companion used his smartphone to take photographs of each drive, and the phone has been programmed (using Lagrange’s Mechanics) to calculate the trajectory of a golfball, knowing the angle and speed at which it leaves the golf club, and so determine whether the given ball makes it to the putting green. One might think that there’s not much to choose between the methods employed on Saturday and then on Sunday (apart from the fact that in one case we had need of a clever computing device) but there’s a world of difference: on Saturday, we count the number of balls on the green after their arrival; on Sunday, we calculate the whole trajectory of a given ball and so we know whether the ball arrives, and when. We can say that Saturday’s and Sunday’s results occur in different ‘spaces’. In the ‘Sunday space’, we can reconstruct the entire history of each and every golfball; in the ‘Saturday space’, we are happy to forego this detailed knowledge because we really just want to know what pro- portion of our drives do in fact make it to the putting green. We could also investigate other questions of a general nature, such as whether any golfballs at all will make it through a certain gap in the trees, and what overall difference the choice of golfclub makes, and so on. (If we need to know more about one specific ball or another, this more detailed knowledge can be reconstructed afterward, if we supply the appropriate extra data.)
This allegory nicely demonstrates the sorts of differences we find between phase space (the ‘Saturday space’) and configuration space (the ‘Sunday space’). In phase space we obtain qualitative information, about more golfballs, all in one go - we obtain ‘less from more’.
The Lazy Universe by Coopersmith
The Hamiltonian formalism describes mechanics by trajectories in phase space, while Lagrangian mechanics uses trajectories in configuration space.
The basic idea of the Hamiltonian formalism:
"One novel ingredient of the Hamiltonian scheme lies in the "variables" one uses in the description of a physical system. Up until now, the positions of particles were taken as primary, the velocities being simply the rate of change of position with respect to time. Recall (p.167) that in the specification of the initial state of a Newtonian system we needed the positions and the velocities of all particles in order that the subsequent behaviour be determinate. With the Hamiltonian formulation we must select the momenta of the particles rather than the velocities. (We noted on p. 165 that the momentum of a particle is just its velocity multiplied by its mass.) This might seem a small change in itself, but the important thing is that the position and momentum of each particle are to be treated as though they are independent quantities, more or less on an equal footing with one another. Thus one 'pretends', at first, that the momenta of the various particles have nothing to do with the rates of change of their respective position variables, but are just a separate set of variables, so we can imagine that they 'could' have been quite independent of the position motions. In the Hamiltonian formulation, we now have two sets of equations. One of these tells us how the momenta of the various particles are changing with time, and the other tells us how the positions are changing with time. In each case, the rates of change are determined by the various positions and momenta at that time. Roughly speaking, the first set of Hamilton's equations states Newton's crucial second law of motion (rate of change of momentum = force) while the second set of equations is telling us what the momenta actually are, in terms of the velocities (in effect, rate of change of position = momentum + mass). Recall that the laws of motion of Galilei-Newton were described in terms of accelerations, i.e. rates of change of rates of change of position (i.e. 'second order' equations). Now, we need only to talk about rates of change of things ("first order" equations) rather than rates of change of rates of change of things. All these equations are derived from just one important quantity: the Hamiltonian function H, which is the expression for the total energy of the system in terms of all the position and momentum variables. The Hamiltonian formulation provides a very elegant and symmetrical description of mechanics. Just to see what they look like, let us write down the equations here, even though many readers will not be familiar with the calculus notions required for a full understanding - which will not be needed here. All we really want to appreciate, as far as calculus is concerned, is that the 'dot' appearing on the left-hand side of each equation stands for rate of change with respect to time" (of momentum, in the first case, and position, in the second):
$$ \dot{p}_i = - \frac{\partial H}{\partial x_i}, \quad \dot{x}_i = \frac{\partial H}{\partial p_i} . $$
Here the index i is being used simply to distinguish all the different momentum coordinates $p_1, p_2, p_3, p_4,\ldots$ and all the different position coordinates $x_1, x_2, x_3, x_4,\ldots$. For n unconstrained particles we shall have 3n momentum coordinates and 3n position coordinates (one, each, for the three independent directions in space). The symbol $\partial$ refers to "partial differentiation" ("taking derivatives while holding all the other variables constant"=, and $H$ is the Hamiltonian function, as described above.
The coordinates $x_1, x_2, x_3, x_4,\ldots$ and $p_1, p_2, p_3, p_4,\ldots$ are actually allowed to be more general things than just ordinary Cartesian coordinates for particles (i.e. with the $x_i$'s being ordinary distances, measured off in three different directions at right angles). Some of the coordinates $x_i$'s could be angles, for example (in which case, the corresponding $p_i$'s would be angular momenta, cf. p. 166, rather than momenta), or some other completely general measure. Remarkably, the Hamiltonian equations still hold in exactly the same form. In fact, with suitable choices of H, Hamilton's equations still hold true for any system of classical equations whatever, not just for Newton's equations. In particular, this will be the case for the Maxwell(-Lorentz) theory that we shall be considering shortly. Hamilton's equations also hold true for special relativity. Even general relativity can, if due care is exercised, be subsumed into the Hamiltonian framework. Moreover, as we shall see later with Schrodinger's , equation (p. 288), this Hamiltonian framework provides the taking-off point for the equations of quantum mechanics. Such unity of form in the structure ,of dynamical equations, despite all the revolutionary changes that have occurred in physical theories over the past century or so, is truly remarkably!
page 174ff in "The Emperors new Mind" by R. Penrose
How to use the Hamiltonian formalism:
Set up the Lagrangian as usual, with some generalized coordinates \(q_i\). Find the generalized momenta \(p_i = \partial \mathcal{L} / \partial \dot{q}_i\). Solve for \(\dot{q}_i\) in terms of the \(p_i\) and \(q_i\). Rewrite \(T\) and \(U\) in terms of \(q_i\) and \(p_i\). Find \(\mathcal{H}\), as \(T+U\) if all the \(\partial q_i/\partial t = 0\), otherwise as \(\sum_i p_i \dot{q}_i - \mathcal{L}\) Apply Hamilton’s equations to get the equations of motion. Once we have the equations of motion, we can look for equilibrium points, make phase-space portraits, solve for \(q_i(t)\) explicitly, etc.This might just seem like a more elaborate way of getting the same results as the Lagrangian approach, and indeed for very simple problems we will get back exactly the same equations. Unfortunately, most of the advantages of the Hamiltonian are at a more formal level; when you’re solving for the motion of a simple system, it doesn’t really shine. There are a couple of exceptions where it is somewhat helpful to choose \(\mathcal{H}\) over \(\mathcal{L}\), which we’ll go over (drawing “phase portraits” was one such case.)https://www.colorado.edu/physics/phys3210/phys3210_fa15/lecnotes.2015-11-16.Intro_to_Hamiltonian_Mechanics.html
Good Textbooks/Lecture Notes on the Hamiltonian formalism:
Examples
Relationship to the Lagrangian formalism
The Hamiltonian is defined as the Legendre transformation of the Lagrangian
$$H \equiv \sum_j {\dot q}_j p_j - L$$
The geometry that underlies the physics of Hamilton and Lagrange’s classical mechanics and classical field theory has long been identified: this is symplectic geometry [Arnold 89] and variational calculus on jet bundles [Anderson 89, Olver 93]. In these theories, configuration spaces of physical systems are differentiable manifolds, possibly infinite-dimensional, and the physical dynamics is all encoded by way of certain globally defined differential forms on these spaces. https://arxiv.org/abs/1601.05956
The basic idea of the Hamiltonian formalism in mathematical terms:
In the Lagrangian approach we focus on the position and velocity of a particle, and compute what the particle does starting from the Lagrangian $L(q, q˙)$, which is a function
$$ L: TQ \to \mathbb{R} $$
where the tangent bundle is the space of position-velocity pairs. But we're led to consider momentum
$$ p_i = \frac{\partial L}{\partial \dot{q}^i} $$
since the equations of motion tell us how it changes
$$ \frac{d p_i}{d t} = \frac{\partial L}{\partial q^i} .$$
In the Hamiltonian approach we focus on position and momentum, and compute what the particle does starting from the energy
$$ H= p_i \dot{q}^i -L(q,\dot{q}) $$
reinterpreted as a function of position and momentum, called the Hamiltonian
$$ H: T^* Q \to \mathbb{R} $$
where the cotangent bundle is the space of position-momentum pairs. In this approach, position and momentum will satisfy Hamilton’s equations:
$$\dot{p}_i = - \frac{\partial H}{\partial q_i}, \quad \dot{q}_i = \frac{\partial H}{\partial p_i} ,$$
where the latter is the Euler–Lagrange equation
$$ \frac{d p_i}{d t} = \frac{\partial L}{\partial q^i} $$
in disguise (it has a minus sign since $H = p\dot{q} - L$).
page 53 in http://math.ucr.edu/home/baez/classical/texfiles/2005/book/classical.pdf
Recommended Resources to learn more about the Hamiltonian Formalism:
The central conception of all modern theory in physics is the “Hamiltonian”.
E. Schrödinger, The Hamilton postage stamp
[E]verybody loves Hamilton’s equations: there are just two, and they summarize the entire essence of classical mechanics.
In fact, with suitable choices of H, Hamilton's equations still hold true for any system of classical equations whatever, not just for Newton's equations. In particular, this will be the case for the Maxwell(-Lorentz) theory that we shall be considering shortly. Hamilton's equations also hold true for special relativity. Even general relativity can, if due care is exercised, be subsumed into the Hamiltonian framework. Moreover, as we shall see later with Schrodinger's equation (p. 288), this Hamiltonian framework provides the taking-off point for the equations of quantum mechanics. Such unity of form in the structure, of dynamical equations, despite all the revolutionary changes that have occurred in physical theories over the past century or so, is truly remarkably!
page 176 in "The Emperors new Mind" by R. Penrose
Hamiltonian Mechanics is geometry in phase space. […]
Lagrangian mechanics is contained in hamiltonian mechanics as a special case (the phase space in this case is the cotangent bundle of the configuration space, and the hamiltonian function is the Legendre transform of the lagrangian function).
The hamiltonian point of view allows us to solve completely a series of mechanical problems which do not yield solutions by other means (for example, the problem of attraction by two stationary centers and the problem of geodesics of the triaxial ellipsoid. The hamiltonian point of view has even greater value for the approximate methods of perturbation theory (celestial mechanics), for understanding the general character of motion in complicated mechanical systems (ergodic theory, statistical mechanics) and in connection with other areas of mathematical physics (optics, quantum mechanics, etc.)
Mathematical Methods of Classical Mechanics Vladimir Arnold
As Weinberg points in his QFT book, in the Hamiltonian formalism it is easier to check the unitarity of the theory because unitarity is directly related to evolution, while in the Lagrangian formalism the symmetries that mix space with time are more explicit. Therefore the Hamiltonian formalism is usually more convenient in non-relativistic and galilean quantum theories. In order for a theory to be Poincare invariant, the Lagrangian needs to be a Poincare scalar, what it is easy to see. The equivalent condition in the Hamiltonian formalism is that there is a Poincare algebra with the Hamiltonian as the zero component of the 4-momentum. This condition needs to be checked, as it is not elemental to see.Diego Mazón
Recall that we derived Hamilton’s equations for a particle moving in a force field $F = -dV/dx$ by writing down the equations of motion in the form $$ m \dot{x} = p , \quad \dot{p} = - \frac{\partial V}{\partial x} .$$ The observant reader will have noticed that these two equations are just one way to express Newton’s second law. More generally for a system of N point-like particles moving in three-dimensional physical space, Newton’s second law would be $$ m \dot{x_j} = p_j , \quad \dot{p}_j = - \frac{\partial V}{\partial x_j} .$$ The symplectic egg in classical and quantum mechanics by Maurice A. de Gosson
The outstanding achievements of Lagrange are still not the last word in mechanics, and it was an Irish mathematical prodigy, William Rowan Hamilton, who, in the nineteenth century, took mechanics to its highest form. Hamilton was in awe of Lagrange, referring to him as a Shakespeare, and to the Mécanique analytique as a scientific poem; it was this work which attracted him to the topic of mechanics. Hamilton understood that even if the equations of motion were sometimes too difficult to solve one could nevertheless obtain important qualitative information - but only if one used the right choice of variables. His crucial advance was to discover what were the true, most telling, variables of mechanics. We are familiar with the fact that the choice of variables (coordinates) can make all the difference to the tractability of a problem in mechanics. For example, a lever can be modelled as a near infinity of atoms, or as a ‘lever arm’ with just one position coordinate (the angle, θ ) and the condition of ‘rigidity’. We are inclined to think that the second version is an improvement over the first, but Hamilton realized that it is not always best to have the sparest, most economical description; sometimes even an increase in the number of coordinates can lead to greater insights
The Lazy Universe by Coopersmith