Thursday, July 16, 2026

Hamiltonian Introduction

Notes to a video lecture on UNIZOR.COM

Introduction to Hamiltonian

We assume you have a pretty good understanding of Lagrangian Mechanics. If not, the previous chapters of this course Lagrangian and Noether Theorem provide a description of its basic principles.

The Hamiltonian Mechanics is built upon Lagrangian Mechanics. The differences can be summarized as follows.

In Lagrangian Mechanics our main dynamic variables were generalized coordinates q=(q1,...,qn) and their time derivatives - generalized velocities q̇=(q̇1,...,q̇n) (here we use Newtonian 'dot notation' to indicate a time derivative).
In Hamiltonian Mechanics it's the same generalized coordinates {qi} and, separately from coordinates, generalized momenta p=(p1,...,pn) instead of velocities.

Generalized momenta of a mechanical system with the Lagrangian L(q,q̇,t) are defined as a set of components
pi=∂L/∂q̇i
This definition was already introduced in the lecture Noether p=m·v const of a previous chapter of this course.

Using this definition of generalized momentum, the Euler-Lagrange differential equation of the second degree
d/dt ∂L/∂q̇i = ∂L/∂qi (i∈[1,n])
would look simpler
d/dt pi = ∂L/∂qi or, shorter,
i = ∂L/∂qi

In Lagrangian Mechanics we had n functions of time {qi(t)} (generalized coordinates) and a system of n Euler-Lagrange differential equations of the second order.
The number of unknowns was equal to the number of equations.

Instead, in this momentum-based approach, we have 2n functions of time {qi(t)} (generalized coordinates) and {pi(t)} (generalized momenta) with only n differential equations
(A) i = ∂L/∂qi
We need n more equations to obtain a system of 2n first-order differential equations equivalent to n Euler-Lagrange equations of the second-order.

Consider a simple case of a conservative system of one point mass m in three-dimensional Euclidean space with Cartesian coordinates (q1,q2,q3), velocities i and time-independent Lagrangian L equaled to a difference between kinetic T and potential U energies
L = T − U

Since kinetic energy T is independent of position qi, the same equation (A) above can be written as
i = ∂(−U)/∂qi
or
−ṗi = ∂U/∂qi

In addition to these n differential equations, we can construct n more using the classical definition of the vector of momentum pi=m·q̇i and the kinetic energy expressed in terms of momenta p as
T = Σi½mi·q̇i² = Σi½pi²/mi

Partial derivative of T by pi produces
∂T/∂pi = pi/mi = q̇i
Therefore,
(B) i = ∂T/∂pi
We have constructed n more differential equations to complete the system.

The differential equation for a time derivative of the generalized momentum, as we stated above, is
i = ∂L/∂qi = ∂(T−U)/∂qi
Since kinetic energy is independent of coordinates, we can exclude it
(C) −ṗi = ∂U/∂qi

Equations (B) and (C) constitute 2n differential equations of the first order with 2n unknowns - coordinates and momenta
i = ∂T/∂pi
−ṗi = ∂U/∂qi
The problem is, the first n equations depend on kinetic energy T, while the second group of n equations depends on potential energy U.

We would like a formulation in which both sets of equations are generated by a single function of the same variables (q,p), whose partial derivatives with respect to p give time derivatives of coordinates, that is velocities , and with respect to q give time derivatives of the generalized momenta .

Recall that in our simple case the kinetic energy T is independent of positions qi (∂T/∂qi=0) and potential energy U is independent of momenta pi (∂U/∂pi=0).
Based on this property, we can add to partial differentiation of the first equation the potential energy U and add to partial differentiation of the second equation the kinetic energy T.
i = ∂(T+U)/∂pi
−ṗi = ∂(T+U)/∂qi

Let's introduce a new function called Hamiltonian
H(q,p) = T(p) + U(q)
where q=(q1,...,qn) are coordinates
and p=(p1,...,pn) are momenta.
With this notation our system of 2n differential equations of the first degree looks quite symmetrical (some might say "beautiful")
i = ∂H/∂pi
−ṗi = ∂H/∂qi

In this case of a simple mechanical system the Hamiltonian H=T+U represents a total (kinetic and potential) energy of our mechanical system, which makes our system of equation more related to real physical characteristics of a system.

In more general systems, however, the definition of the Hamiltonian is broader and not necessarily coincides with a total energy.

Looking ahead, let us state that the symmetric form of Hamilton's equations makes Hamiltonian Mechanics especially suitable for advanced topics such as canonical transformations, statistical mechanics and quantum mechanics.

No comments: