Scroll back to top

    Hamiltonian Mechanics

    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 and their conjugate momenta , i.e. in phase space, rather than in terms of positions and velocities (state space).

    The central object in Hamiltonian mechanics is the Hamiltonian function , which typically represents the total energy of the system, including kinetic () and potential energy ():

    The evolution of the system is governed by Hamilton’s equations, which are first-order differential equations:

    These equations describe how the generalized coordinates and generalized momenta evolve over time.

    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 () it can be convenient to derive the Hamiltonian via the corresponding Lagrangian, i.e.

    Generalized velocities (), and, thus, the Lagrangian, can be easier to calculate directly, since they feature simple time derivatives of the generalized coordinates . The above Legendre transformation takes care of converting generalized velocities into generalized momenta. Taking the partial of the Hamiltonian with respect to the generalized velocities yields

    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 that does not explicitly appear in the Hamiltonian . If , then is ignorable, and the corresponding conjugate momentum is conserved (). Ignorable coordinates indicate a symmetry in the system and lead directly to conservation laws, such as conservation of linear or angular momentum.

    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 and we find

    This means, if the Hamiltonian does not explicitly depend on time, mechanical energy is conserved, since implies .


    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.

    Example: Charged Particle in an Electromagnetic Field

    Consider a particle with mass and electric charge moving in the presence of a static (independent of time) electromagnetic field. The position of the particle is denoted by . The electromagnetic field is described by a magnetic field and an electric field . The interaction between a charged particle and the electromagnetic field is governed by the Lorentz force:

    where is the velocity of the particle.

    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.

    Step 1: Defining the Lagrangian

    The Lagrangian for a charged particle in an electromagnetic field is:

    where is the velocity of the particle, is the vector potential, related to the magnetic field by , and is the scalar potential, related to the electric field by .

    Step 2: Generalized Momenta

    The generalized momenta conjugate to the position are obtained by:

    Substituting the Lagrangian, we get

    Thus, the generalized momenta are

    This shows that the generalized momenta differ from the usual linear momenta due to the presence of the electromagnetic field through the vector potential .

    Step 3: Hamiltonian

    The Hamiltonian is related to the Lagrangian by:

    Substituting the Lagrangian

    and simplifying

    Hamiltonian

    This is the Hamiltonian for a charged particle in an electromagnetic field, expressed in terms of the generalized momenta , the vector potential , and the scalar potential .

    Step 4: Hamilton’s Equations of Motion

    Using Hamilton’s equations:

    the equation for the position is:

    This shows that the velocity is related to the generalized momenta by:

    This is the inverse relationship between the generalized momenta and the velocity.

    The equation for the momenta is:

    Using the fact that gives the magnetic field and gives the electric field , we can rewrite this as:

    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 are not simply , as they include a contribution from the vector potential (i.e., the electromagnetic field). Understanding this distinction is critical for accurate modeling and control.

    Equations of Motion

    The Hamiltonian dynamics of the charged particle in the electromagnetic field yield the following equations of motion:

    Equations of Motion
    1. The velocity is related to the generalized momentum:
    1. The generalized momentum evolves according to:

    Since the Hamiltonian does not depend explicitly on time, we also know that the energy in this system is conserved.