Advanced Mathematics

Lagrangian and Hamiltonian Mechanics

Mechanics rewritten from energies: the path a system takes makes the action stationary, and the Hamiltonian evolves positions and momenta.

Needs a step first: 29

Instead of forces, write the Lagrangian L=T−VL = T - V (kinetic minus potential energy) in any convenient coordinates, such as an angle. The Euler–Lagrange equation ddt∂L∂q˙=∂L∂q\frac{d}{dt}\frac{\partial L}{\partial \dot q} = \frac{\partial L}{\partial q} then gives the equations of motion, with constraint forces never appearing. The Hamiltonian form uses the momentum p=∂L/∂q˙p = \partial L/\partial\dot q and the energy H(q,p)H(q, p), turning motion into flow in phase space. Quantum mechanics is built on the Hamiltonian: the Schrödinger equation is the quantum version of HH driving time evolution.

Where it shows up: The Hamiltonian becomes the energy operator in the Schrödinger equation, and stationary action is how physicists write every modern theory.

How to hold it: In your head

See mechanics as choosing good coordinates and writing L=T−VL=T-V, after which the Euler–Lagrange equation does the rest and constraint forces never appear.

What knowing it looks like

  • Write the Lagrangian for a pendulum or a bead on a wire in a natural coordinate and derive its equation of motion.
  • Find the conjugate momentum and the Hamiltonian, and write Hamilton's two equations.
  • Spot a coordinate that LL does not depend on and name the quantity it conserves.

Test yourself

A pendulum is a mass mm on a light rod of length ll, at angle θ\theta from the vertical. Write its Lagrangian, derive the equation of motion from the Euler–Lagrange equation, and give the Hamiltonian H(θ,p)H(\theta, p).
Show the worked answer
T=12ml2θ˙2T = \tfrac12 m l^2\dot\theta^2 and, measuring height from the pivot, V=−mglcos⁡θV = -mgl\cos\theta, so L=12ml2θ˙2+mglcos⁡θL = \tfrac12 m l^2\dot\theta^2 + mgl\cos\theta. Then ∂L∂θ˙=ml2θ˙\frac{\partial L}{\partial\dot\theta} = ml^2\dot\theta and ∂L∂θ=−mglsin⁡θ\frac{\partial L}{\partial\theta} = -mgl\sin\theta, giving ml2θ¨=−mglsin⁡θml^2\ddot\theta = -mgl\sin\theta, that is θ¨=−glsin⁡θ\ddot\theta = -\frac{g}{l}\sin\theta. With p=ml2θ˙p = ml^2\dot\theta, H=p22ml2−mglcos⁡θH = \frac{p^2}{2ml^2} - mgl\cos\theta.

Needs a step first: 29

Learn it with an AI

Copy this prompt into any AI assistant. It will take you through step by step at your level and finish with the test above.

Be my maths tutor. I'm learning "Lagrangian and Hamiltonian Mechanics" (Undergraduate II tier): Mechanics rewritten from energies: the path a system takes makes the action stationary, and the Hamiltonian evolves positions and momenta.
I already know: Energy, Work and Momentum, The Multivariable Chain Rule and Jacobians, Systems of Equations and Phase Space.
Teach it Socratically: first ask what I already know; then explain the core idea with one concrete example and why it's true; then give me three problems, one at a time, easy to hard. Wait for my answer, check every step, and point out mistakes without giving the answer away.
Finish by testing me with this: A pendulum is a mass $m$ on a light rod of length $l$, at angle $\theta$ from the vertical. Write its Lagrangian, derive the equation of motion from the Euler–Lagrange equation, and give the Hamiltonian $H(\theta, p)$.
Use LaTeX for formulas. When you say where it's used later (machine learning, quantum mechanics), be specific.

Recommended