EULER-LAGRANGE TO HAMILTON LANCE D. DRAGER The goal of these notes is to give one way of getting from the Euler-Lagrange equations to Hamilton s equations. 1. Euler-Lagrange to Hamilton We will often write elements of a Euclidean space R 2N as a pair of N-vectors, (x, y) = (x 1,..., x N, y 1,..., y N ). We start with a lemma. Lemma 1.1. Let F : R 2N R 2N be a diffeomorphism of the form F (x, y) = (x, A(x, y)), for some function A: R 2N R N. Then the inverse function G has the form G(u, v) = (u, Γ(u, v)) and we have the following identifies: (1) (2) A(u, Γ(u, v)) = v Γ(x, A(x, y)) = y. Proof. The function G can be written as (G 1 (u, v), G 2 (u, v)), and similarly for F. Since F and G are inverses, we have (u, v) = (F G)u, v = F (G 1 (u, v), G 2 (u, v)) = (G 1 (u, v), A(G 1 (u, v), G 2 (u, v))). Comparing the first slots, we find G 1 (u, v) = u. Plugging this into the second slots gives v = A(u, G 2 (u, v)) and we have G(u, v) = (u, G 2 (u, v)). Set Γ = G 2, and we have v = A(u, Γ(u, v)). The identity in equation (2) is derived in a similar fashion from G(F (x, y)) = (x, y). Let L: R 2N R be a Lagrangian, which we write as L(q, q) = L(q 1,..., q N, q 1,..., q N ) where the q i are just variables. If c(t) is a path in R N, the position of the system, we follow classical tradition and write c(t) = q(t). If we add the velocity, we get a path ˆc(t) = (q(t), q(t)) in R 2N. In this notation we do mean that q(t) = q (t) is the derivative of q(t). The path satisfies the Euler-Lagrange equations if d (3) (q(t), q(t)) = (q(t), q(t)), i = 1,..., N. dt q i For brevity, we sometimes write expressions for partial derivatives like q = (,..., ). q 1 q N Version Time-stamp: 2014-10-01 15:56:09 drager. 1
2 LANCE D. DRAGER Define a map F : R 2N R 2N by F (q, q) = ( q, (q, q)). q The Lagrangian L is called hyperregular if this map is a diffeomorphism. For the rest of these notes, we deal with hyperregular Lagrangian. Let G(q, p) = (q, Γ(q, p)) be the inverse of F. By our Lemma, we have (4) (5) (q, Γ(q, p)) = p q Γ ( q, q (q, q)) = q The quantify (6) p i = q i (q, q) is called the (generalized) momentum conjugate to q i. Given a path ˆc(t) = (q(t), q(t)), we get a path γ(t) = F (q(t), q(t)) = (q(t), p(t)), where p(t) = (q(t), q(t)). q If c is a solution of the Euler-Lagrange equations, we want to find the differential equations satisfied by γ. From the Euler-Lagrange equations, we have (7) d p(t) = (q(t), q(t)) dt q and we have (8) d q(t) = q(t) = Γ(q(t), p(t)), dt We need to eliminate the q(t) in (7), which we can do using (8), (9) d p(t) = (q(t), Γ(q(t), p(t))). dt q The equations (9) and (8) give us our desired differential equations. A path (q(t), p(t)) satisfies these equations if and only if the corresponding path (q(t), q(t)) satisfies the Euler-Lagrange equations. However, we can write the equations in a more informative form. Define the function L(q, p) by L(q, p) = L(q, Γ(q, p)), the Lagrangian expressed in terms of p and q.
EULER-LAGRANGE TO HAMILTON 3 Using the chain rule, we get L (q, p) = [ ] L(q, Γ(q, p)) = (q, Γ(q, p)) + = (q, Γ(q, p)) + q j (q, Γ(q, p))) (q, p) (q, p), using (4). We can solve this equation for / to get where L (q, Γ(q, p)) = (q, p) (10) H(p, q) = (q, p) = { N } Γ j (q, p) q L(p, q) i = (q, p), Γ j (q, p) L(p, q) is the Hamiltonian of the problem. The minus sign is conventional. Thus, by (7), we have (11) dp i (t) = (q(t), p(t)) dt which is one of Hamilton s equations. This equation holds only when the Euler- Lagrange equations are satisfied. For the other equation, we can calculate as follows: (q, p) = [ N ] Γ j (q, p) p L(p, q) i (12) = Γ i (p, q) + To calculate the partial derivatives of L, we have L (q, p) = [ ] L(q, Γ(q, p)) = = L (q, p) (q, p). q j (q, Γ(q, p)) (p, q) (p, q),
4 LANCE D. DRAGER using equation (4). Plugging this into (12), we have in other words (13) so (8) becomes (14) (q, p) = Γ i (p, q) + = Γ i (p, q) + = Γ i (q, p), p L (q, p) (q, p) (q, p) = Γ(q, p), dq (t) = (q(t), p(t)). dt p This equation holds for any path. Putting this together, we have Hamilton s Equations (15) or, to put in the indices, (16) dq (t) = (q(t), p(t)) dt p dp (t) = (q(t), p(t)), dt q dq i (t) = (q(t), p(t)) dt dp i (t) = (q(t), p(t)), dt In the classical literature, the formula for H, is often written as H(p, q) = i = 1,..., N. Γ j (q, p) L(p, q) H(q, p) = q j L(q, p), (p, q) in view of our formula q = Γ(q, p), but this is a bit obscure, since you have to remember that q here is a function of q and p, not an independent variable. Example 1.2. Consider a particle moving in the plane, subject to a force that comes from a potential. We ll use the coordinates (q 1, q 2 ) on the plane and follow the notation above. The Lagrangian is L(q, q) = 1 2 m( q2 1 + q 2 2) V (q 1, q 2 ).
EULER-LAGRANGE TO HAMILTON 5 The conjugate momenta are p 1 = q 1 (q, q) = m q 1 p 2 = q 2 (q, q) = m q 2 We can easily solve this for the q s in terms of the p s: in other words q 1 = p 1 /m q 2 = p 2 /m, Γ(q, p) = 1 m p. Substituting in the Lagrangian, we get Then we get L(q, p) = L(q, Γ(q, p)) = 1 [ ( ) 2 ( ) 2 ] 2 m p1 p2 + V (q) m m = 1 2m (p2 1 + p 2 2) V (q). H(q, p) = q j L(q, p) = p 1 q 1 + p 2 q 2 L(q, p) { } p 1 = p 1 m + p p 2 1 2 m 2m (p2 1 + p 2 2) V (q) = 1 2m (p2 1 + p 2 2) + V (q) If we write this on the Lagrangian side as E(q, q) = (H F )(q, q) = 1 2m ((m q 1) 2 + (m q 2 ) 2 ) + V (q) = 1 2 m( q2 1 + q 2 2) + V (q), we get the kinetic energy plus the potential energy, so E(q, q) is the total energy of the system and H is the total energy of the system expressed in terms of position and momentum. Going back to the Hamiltonian side, Hamilton s equations would be dp i (t) = (q, p) = V dt dq i (t) = (q, p) = p i /m dt We ll leave it as an exercise to substitute p i = m q i and put the equations into one second order equation to get Newton s equations.
6 LANCE D. DRAGER Since H or E represents the total energy, we expect that it should be conserved (when the Lagrangian and Hamiltonian are not time dependent, as in our discussion, i.e., we don t have L(t, q, q)). Theorem 1.3. If (q(t), p(t)) is a solution of Hamilton s equations (16), then H(q(t), p(t)) is a constant function of t, i.e., Energy is conserved. Proof. We just differentiate H(q(t), p(t)) and plug in Hamilton s equations: d N dt H(q(t), p(t)) = = = 0. q j (q(t), p(t)) dq j dt (t) + N (q(t), p(t)) (q(t), p(t))+ q j (q(t), p(t)) d dt (t) [ (q(t), p(t)) ] (q(t), p(t)) q j The derivative of H(q(t), p(t)) is zero, so it s a constant function. Exercise 1.4. Show directly from the Euler-Lagrange equations that the energy E(q(t), q(t)) is constant on solutions (q(t), q(t)) of the Euler-Lagrange equations. Exercise 1.5. What happens for time dependent Lagrangians L(t, q, q)? Department of Mathematics and Statistics, Texas Tech University, Lubbock, TX 79409-1042 E-mail address: lance.drager@ttu.edu