# Finding a “Principle of Least Action” equivalent statement for Hamiltonian Mechanics

The least-action principle is a statement in classical physics saying that all bodies in a system follow a trajectory that minimize the following functional (ignoring explicit time dependence for now): $$S[L] = \int dt L(x(t), \dot{x}(t)) \qquad\rightarrow\qquad \frac{d}{dt}\Big(\frac{\partial L}{\partial \dot{x}}\Big) - \frac{\partial L}{\partial x} = 0.$$ The Hamiltonian of the same system can be constructed using the Legendre transform: $$H(p, x) = \dot{x}\cdot p - L(x, \dot{x})\;;\quad p \equiv \frac{\partial L}{\partial\dot{x}}.$$ Pedagogically, one first studies Lagrangian Mechanics starting from the least-action principle, and eventually constructs an equivalent Hamiltonian Mechanics framework. But suppose I was a weird physicist who wanted to teach Hamiltonian mechanics first, and then later construct Lagrangian Mechanics. What would be the best way to do this?

• The Legendre transform works both ways, and Hamiltonian mechanics is still an action principle, just with different variables – Slereah Sep 18 '20 at 19:25
• If we intend to start from from the Hamiltonion Mechanics framework, how does a least-action principle lead us directly to Hamilton's equations? – firest Sep 18 '20 at 21:03
• – Frobenius Sep 18 '20 at 22:18

Well, if you don't mind explaining before Hamilton-Jacobi's equation then it's not impossible.
From the derivation of the Hamilton-Jacobi equation (see for yourself!) I have that $$$$\mathrm{d}\mathcal{S}=p\ \mathrm{d}q-\mathcal{H}\ \mathrm{d}t$$$$ Where $$\mathcal{S}$$ is the action, $$p$$ the generalized momentum, $$\mathcal{H}$$ the Hamiltonian and $$q$$ the generalized coordinate.
If you check your calculations I suggested you to do beforehand, then you can recognize that solving Hamilton-Jacobi basically imposes that $$\mathrm{d}\mathcal{S}$$ is an exact differential, i.e. I can write explicitly the following integral $$$$\mathcal{S}[q(t)]=\int\left(p\ \mathrm{d}q-\mathcal{H}\ \mathrm{d}t\right)$$$$ Well, then I can impose Hamilton's principle to this action and find an extremal! Note that \begin{aligned} \delta(p\ \mathrm{d}q)&=\delta p\ \mathrm{d}q+p\ \mathrm{d}\delta q\\ \delta\mathcal{H}&=\frac{\partial\mathcal{H}}{\partial p}\delta p+\frac{\partial\mathcal{H}}{\partial q}\delta q \end{aligned} Now if you do your calculations, if you look closely, the integral splits in two parts that multiply the variations of $$p$$ and $$q$$, while one part goes to zero in an integration by parts. Simply impose that those two parts must be simultaneously zero in order to satisfy Hamilton's principle and boom, you're done.
Note that for a completely pedagogical situation it's almost impossible to teach Hamiltonian mechanics before Lagrangian mechanics.

1. It's much easier to derive HJE if you actually know what is actually a Lagrangian
2. The physics gets sometimes lost in the mathematical abstractness, and it's not ideal in a classical mechanics course
3. As you see in Lagrangian mechanics, generalized coordinates are not always real coordinates and can mean whatever, when you insert canonical momenta it just goes bonkers. See the Lotka-Volterra equations as an example or just think about this simple canonical transformation \left\{ \begin{aligned} p&=q\\q&=p \end{aligned} \right. I just switched momenta and coordinates, and the new Hamiltonian still solves HJE and the canonical equations of motion. In my honest opinion this idea before even really knowing how analytical mechanics works on the other side of the Legendre transform would almost irreparably confuse me.

Conclusion: Quite hard to do but not impossible, personally wouldn't do it.

• I suppose the statement is that, as you said, the Action is an exact differential, where you have coordinate q, conjugate momentum p, and a parameter describing the trajectories of p and q in phase space. Imposing the Action as an exact differential leads you directly to the Hamilton Jacobi equations. I am aware that this is not a very useful way to pedagogically teach people. I was however hoping to gain a new perspective in classical physics... But you are right. Starting from Hamiltonion Mechanics is kinda bonkers. – firest Oct 4 '20 at 3:12
• It seems this answer (v1) conflates Hamilton's principal function and the action functional. – Qmechanic May 24 at 10:14
1. The Hamiltonian action reads $$S_H[q,p]:=\int \! dt\left(p_i\dot{q}^i-H(q,p,t)\right).$$ Its EL equations are Hamilton's equations.

2. The equivalence between Lagrangian & Hamiltonian mechanics is discussed in e.g. this Phys.SE post.

• My problem with this is two-fold. 1a. First, how would one intuit that the integrand is of the form $p\dot{q} - H(p, q, t)$. 1b. Where does the $p\dot{q}$ come from? It appears very unnatural. 1c. Why not just have the integrand be a more general function $\tilde{H}(p, q, t)$? 2. My second problem is that the Hamiltonian, from this perspective, is defined as the Legendre Transform of the Lagrangian which, while true, defeats the purpose of the question: How do you start with first deriving Hamilton's equations? – firest Sep 18 '20 at 21:08
• 1. One argument is that unlike the Lagrange equations, which are homogeneous in $L$, the Hamilton's equations are inhomogeneous in $H$. 2. Traditionally, the Hamiltonian formulation is indeed derived via a Legendre transformation of the Lagrangian formulation. Alternatively, it is postulated as a first principle. – Qmechanic Sep 19 '20 at 10:23