Scroll back to top
Hamiltonian mechanics is a reformulation of classical mechanics that provides a powerful and elegant framework for understanding the motion of systems.
It was developed by Sir William Rowan Hamilton in the 19th century and is based on the principles of energy, as opposed to Newtonian mechanics,
which focuses on forces and accelerations. In Hamiltonian mechanics, the dynamics of a system are described in terms of
generalized coordinates 
The central object in Hamiltonian mechanics is the Hamiltonian function 
The evolution of the system is governed by Hamilton’s equations, which are first-order differential equations:
These equations describe how the generalized coordinates 
Hamiltonian mechanics is especially useful in systems where the generalized momenta are not simply the mass times the velocity, such as in the presence of electromagnetic fields,
or in systems with constraints. When using generalized coordinates (
Generalized velocities (
where the last equality comes from the fact that the Hamiltonian only depends on generalized momenta and not on generalized velocities. Using this result we find
as a way to calculate generalized momenta from the Lagrangian.
One of the key advantages of Hamiltonian mechanics is its symmetry and the insight it provides into conservation laws. Noether’s theorem shows that symmetries in the Hamiltonian often correspond to conserved quantities, such as energy, linear momentum, or angular momentum. This provides a deeper understanding of the system’s behavior beyond what Newtonian mechanics offers.
For instance, an ignorable coordinate (or cyclic coordinate) is a generalized coordinate 
The Hamiltonian itself offers a convenient way to understand whether the system it models conserves the total energy. The Hamiltonian represents the total mechanical energy in the system. If the energy changes with time,
Inserting Hamilton’s equations for 
This means, if the Hamiltonian does not explicitly depend on time, mechanical energy is conserved, since 
Heads up!
Hamiltonian mechanics is a versatile tool, particularly in fields like celestial mechanics, space propulsion (e.g., ion thrusters), and control systems. Since Hamilton’s equations of motion describe the system evolution directly in phase-space. they provide a systematic way of analyzing complex dynamical systems.
Consider a particle with mass 
where 
Our aim is to derive the correct equations of motion using generalized coordinates and momenta, which are influenced by the electromagnetic field. We shall neglect the effect of the charge on the field.
The Lagrangian 
where 
The generalized momenta 
Substituting the Lagrangian, we get
Thus, the generalized momenta are
This shows that the generalized momenta differ from the usual linear momenta 
The Hamiltonian 
Substituting the Lagrangian
and simplifying
This is the Hamiltonian for a charged particle in an electromagnetic field, expressed in terms of the generalized momenta 
Using Hamilton’s equations:
the equation for the position is:
This shows that the velocity 
This is the inverse relationship between the generalized momenta and the velocity.
The equation for the momenta is:
Using the fact that 
which is the familiar Lorentz force law for the dynamics of a charged particle in an electromagnetic field.
Heads up!
In this system, the generalized momenta 
The Hamiltonian dynamics of the charged particle in the electromagnetic field yield the following equations of motion:
Since the Hamiltonian does not depend explicitly on time, we also know that the energy in this system is conserved.