← Back to Resources Hub

Lagrangian vs. Hamiltonian Mechanics

Supervised by Dr. Saju K John (GATE AIR-52) Physics Stream

AI Quick-Reference Summary

  • Lagrangian (\(L\)): Defined as \(L = T - V\) (Kinetic minus Potential Energy) in terms of generalized coordinates \(q_i\), velocities \(\dot{q}_i\), and time \(t\). Uses \(N\) second-order differential equations: \(\frac{d}{dt}\left(\frac{\partial L}{\partial \dot{q}_i}\right) - \frac{\partial L}{\partial q_i} = 0\).
  • Hamiltonian (\(H\)): Defined as \(H = \sum p_i \dot{q}_i - L\) (total energy \(T+V\) for scleronomic, conservative systems) in terms of coordinates \(q_i\), conjugate momenta \(p_i\), and time \(t\). Uses \(2N\) first-order differential equations: \(\dot{q}_i = \frac{\partial H}{\partial p_i}\) and \(\dot{p}_i = -\frac{\partial H}{\partial q_i}\).
  • Legendre Transformation: The mathematical tool used to convert velocity-dependent functions (\(L\)) to momentum-dependent functions (\(H\)).
  • Cyclic Coordinates: A coordinate \(q_k\) that does not appear explicitly in the Lagrangian. The corresponding momentum conjugate is a constant of motion: \(\frac{d}{dt}\left(\frac{\partial L}{\partial \dot{q}_k}\right) = 0 \implies p_k = \text{const}\).

1. Lagrangian Formulation & Hamilton's Principle

Newtonian mechanics relies on vector quantities (forces, accelerations) which become mathematically cumbersome when dealing with systems constrained to complex paths (like a bead on a wire). Analytical mechanics avoids this by using coordinate-independent scalar energy quantities.

Hamilton’s Principle of Least Action states that a physical system travels along a path in configuration space that minimizes (or makes stationary) the action integral: \[S = \int_{t_1}^{t_2} L(q, \dot{q}, t) dt\] where the Lagrangian \(L = T - V\). Minimizing this integral using the calculus of variations leads directly to the Euler-Lagrange equations: \[\frac{d}{dt} \left( \frac{\partial L}{\partial \dot{q}_i} \right) - \frac{\partial L}{\partial q_i} = 0\] for each generalized coordinate \(q_i\). These second-order differential equations describe the dynamics of the system in an \(N\)-dimensional coordinate space.

2. The Legendre Transformation & Hamiltonian Mechanics

While Lagrangian mechanics is formulated in terms of velocities \(\dot{q}_i\), Hamiltonian mechanics switches variables to conjugate momenta \(p_i\), defined by: \[p_i = \frac{\partial L}{\partial \dot{q}_i}\] This change of variables is accomplished mathematically via a Legendre transformation, defining the Hamiltonian \(H\): \[H(q, p, t) = \sum_{i=1}^N p_i \dot{q}_i - L(q, \dot{q}, t)\] Differentiating this relation yields Hamilton's Canonical Equations: \[\dot{q}_i = \frac{\partial H}{\partial p_i} \quad \text{and} \quad \dot{p}_i = -\frac{\partial H}{\partial q_i}\] For a system of \(N\) coordinates, these are \(2N\) first-order ordinary differential equations, which define paths in a \(2N\)-dimensional phase space consisting of both coordinates and momenta.

In conservative, time-independent systems where the coordinates do not explicitly depend on time (scleronomic constraints), the Hamiltonian represents the total energy: \[H = T + V\]

3. Comparison Table

Feature Lagrangian Formalism Hamiltonian Formalism
Mathematical Space \(N\)-dimensional Configuration Space (\(q_i\), \(\dot{q}_i\)) \(2N\)-dimensional Phase Space (\(q_i\), \(p_i\))
Equation Structure \(N\) second-order differential equations \(2N\) first-order differential equations
Core Quantity Lagrangian \(L = T - V\) Hamiltonian \(H = T + V\) (typically)
Conservation Principle Easily identifies conservation laws via cyclic coordinates Provides a powerful basis for quantum mechanics transition

4. Solved CSIR-NET & GATE Questions

Question 1 (CSIR-NET Physical Sciences)

A particle of mass \(m\) moves in one dimension under a potential \(V(x) = \frac{1}{2} k x^2 + \alpha x\). Find the Hamiltonian of the system and write down Hamilton's equations of motion.

Detailed Solution:

  1. Write down the kinetic energy \(T\) and Lagrangian \(L\): \[T = \frac{1}{2}m\dot{x}^2 \implies L = T - V = \frac{1}{2}m\dot{x}^2 - \frac{1}{2}kx^2 - \alpha x\]
  2. Find the canonical momentum \(p\) conjugate to \(x\): \[p = \frac{\partial L}{\partial \dot{x}} = m\dot{x} \implies \dot{x} = \frac{p}{m}\]
  3. Construct the Hamiltonian using the Legendre transformation: \[H = p\dot{x} - L = p\left(\frac{p}{m}\right) - \left[\frac{1}{2}m\left(\frac{p}{m}\right)^2 - \frac{1}{2}kx^2 - \alpha x\right]\] \[H = \frac{p^2}{2m} + \frac{1}{2}kx^2 + \alpha x\]
  4. Write Hamilton's canonical equations: \[\dot{x} = \frac{\partial H}{\partial p} = \frac{p}{m}\] \[\dot{p} = -\frac{\partial H}{\partial x} = -(kx + \alpha)\]

Answer: The Hamiltonian is \(H = \frac{p^2}{2m} + \frac{1}{2}kx^2 + \alpha x\) and the equations of motion are \(\dot{x} = p/m\) and \(\dot{p} = -kx - \alpha\).

Question 2 (GATE Physics)

The Lagrangian of a system is given by \(L = \frac{1}{2} m (\dot{r}^2 + r^2 \dot{\theta}^2 + r^2 \sin^2\theta \dot{\phi}^2) - V(r)\). Identify the cyclic coordinates and state their corresponding conservation laws.

Detailed Solution:

  1. Cyclic coordinates are generalized coordinates that do not appear explicitly in the expression for the Lagrangian.
    • Generalized coordinates: \(r\), \(\theta\), \(\phi\).
    • Look at \(L(r, \theta, \phi, \dot{r}, \dot{\theta}, \dot{\phi})\): \(r\) and \(\theta\) appear explicitly. The coordinate \(\phi\) only appears as its time derivative \(\dot{\phi}\).
  2. Therefore, \(\phi\) is a cyclic coordinate: \[\frac{\partial L}{\partial \phi} = 0\]
  3. From the Euler-Lagrange equation for \(\phi\): \[\frac{d}{dt}\left(\frac{\partial L}{\partial \dot{\phi}}\right) - \frac{\partial L}{\partial \phi} = 0 \implies \frac{d}{dt}\left(\frac{\partial L}{\partial \dot{\phi}}\right) = 0\]
  4. This implies the conjugate momentum \(p_\phi\) is conserved (constant of motion): \[p_\phi = \frac{\partial L}{\partial \dot{\phi}} = m r^2 \sin^2\theta \dot{\phi} = \text{Constant}\] This represents the conservation of the \(z\)-component of angular momentum (\(L_z\)).

Answer: Cyclic coordinate is \(\phi\). Conserved quantity is \(p_\phi = m r^2 \sin^2\theta \dot{\phi}\) (\(z\)-component of angular momentum).

SJ

Dr. Saju K John

Senior Physics Faculty | PhD (NIT Calicut) | GATE AIR-52

Dr. Saju K John earned his PhD in Physics from NIT Calicut and secured GATE AIR 52 and CSIR-NET qualifications. He leads the Classical Dynamics and Statistical Ensembles coaching tracks at Benzil.

Ask doubt / Connect with Saju Sir on WhatsApp