Hamilton's equations of motion are derived by taking the total differential of the Hamiltonian H = p q̇ - L and comparing coefficients, resulting in two first-order differential equations: q̇ = ∂H/∂p and ṗ = -∂H/∂q, which provide an alternative formulation to the Euler-Lagrange equation's second-order differential equation for describing a system's time evolution.
Hamilton's Equations of Motion Derivation | Classical Mechanics
Added:If you know the Hamiltonian of a system, Hamilton’s equations of motion will provide you with differential equations that describe how the system will evolve over time.
Before we start, we need to talk about three things. First, the total differential of a function f is given by the partial derivative of this function with respect to one of its variables, multiplied by a small change in this variable. We do this for all variables and add those terms up. Second, the Hamiltonian and the Lagrangian of a system are related by a Legendre transformation. The Legendre transformation transforms a function to another function by exchanging one argument with the derivative of the original function with respect to this argument. This is called its conjugate momentum and gets denoted by p. Mathematically, this transformation works by multiplying the original variable with its conjugate momentum and subtracting the function. This works both ways. And finally, we will also need the Euler-Lagrange equations later on. Now let’s start with the Hamiltonian equations of motion. Using the Legendre transformation of the Lagrangian, the Hamiltonian can be written as p q dot minus the Lagrangian. As a first step, we take the total differential of both sides. This means, we have derivatives of the Hamiltonian with respect to q, p and t on the left-hand side of the equation and after using the product rule for (p q dot), we also have derivatives of the Lagrangian with respect to q, q dot and t. For this term here, we use the Euler-Lagrange equation to write it as d over dt and the partial derivative of L with respect to q dot. Which is exactly the conjugated momentum p. And also over here, we can write this as p. Now we compare coefficients. The coefficients of dq are dH over dq on the left and minus p dot on the right. For dp, we have dH over dp on the left and q dot on the right. For dt, we have dH over dt on the left and minus dL over dt on the right. We also compare the coefficients in front of dq dot, however this is a trivially fulfilled equation. There we have it, these are Hamilton’s equations of motion. As you can see, instead of a second order differential equation like the Euler-Lagrange equation, we now have two first-order differential equations in the Hamiltonian formulation.
Let’s look at an example. The Hamiltonian for a free particle is given by p squared over 2m. As you can see, this is equivalent to saying that it has kinetic energy p squared over 2m and that there is no potential acting on the particle. First let’s look at p dot.
Since the Hamiltonian does not depend on q, p dot is zero. This means that the momentum of the particle is constant. For q dot, we get p over m. Since the momentum is constant, the velocity q dot is also constant and this means, that the particle described by this Hamiltonian moves with a constant velocity. And that’s pretty much it for now.
Up Next

Lagrangian vs Hamiltonian Mechanics: The Legendre Transform Link
@AbideByReason
174K views•2025-09-26

Fluorescence & Jablonski Diagram | Molecular Photophysics
@yairmeiry
192.2K views•2012-01-12

NMR Spin Physics I: Zeeman Effect, Resonance Condition & Larmor Frequency
@nptel-indianinstituteofsci8064
2.3K views•2024-01-17

Entropy and the Second Law of Thermodynamics Explained
@veritasium
27.5M views•2023-07-01
Related Study Plans & Knowledge Roadmaps
Structured learning paths in Physics


















![✅DOMINIO de Funciones de 2 VARIABLES[ 𝘽𝙞𝙚𝙣 𝙀𝙭𝙥𝙡𝙞𝙘𝙖𝙙𝙤 😎🫵💯] CÁLCULO MULTIVARIABLE](https://i.ytimg.com/vi_webp/wd56qQZAhx0/maxresdefault.webp)









![22 - Mecánica Teórica [MOMENTO ANGULAR y Corchetes de Poisson]](https://i.ytimg.com/vi_webp/0xoYC8Yr0uI/maxresdefault.webp)















