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 R2š as a pair of š -vectors, (š„, š¦) = (š„1 , . . . , š„š , š¦1 , . . . , š¦š ). We start with a lemma. Lemma 1.1. Let š¹ : R2š → R2š be a diffeomorphism of the form š¹ (š„, š¦) = (š„, š“(š„, š¦)), for some function š“ : R2š → Rš . Then the inverse function šŗ has the form šŗ(š¢, š£) = (š¢, Γ(š¢, š£)) and we have the following identifies: (1) š“(š¢, Γ(š¢, š£)) = š£ (2) Γ(š„, š“(š„, š¦)) = š¦. Proof. The function šŗ can be written as (šŗ1 (š¢, š£), šŗ2 (š¢, š£)), and similarly for š¹ . Since š¹ and šŗ are inverses, we have (š¢, š£) = (š¹ ā šŗ)š¢, š£ = š¹ (šŗ1 (š¢, š£), šŗ2 (š¢, š£)) = (šŗ1 (š¢, š£), š“(šŗ1 (š¢, š£), šŗ2 (š¢, š£))). Comparing the first slots, we find šŗ1 (š¢, š£) = š¢. Plugging this into the second slots gives š£ = š“(š¢, šŗ2 (š¢, š£)) and we have šŗ(š¢, š£) = (š¢, šŗ2 (š¢, š£)). Set Γ = šŗ2 , and we have š£ = š“(š¢, Γ(š¢, š£)). The identity in equation (2) is derived in a similar fashion from šŗ(š¹ (š„, š¦)) = (š„, š¦). Let šæ : R2š → R be a Lagrangian, which we write as šæ(š, š) Ė = šæ(š1 , . . . , šš , šĖ1 , . . . , šĖš ) where the šĖš are just variables. If š(š”) is a path in Rš , the position of the system, we follow classical tradition and write š(š”) = š(š”). If we add the velocity, we get a path šˆ(š”) = (š(š”), š(š”)) Ė in R2š . In this notation we do mean that š(š”) Ė = š ′ (š”) is the derivative of š(š”). The path satisfies the Euler-Lagrange equations if ššæ š ššæ (3) (š(š”), š(š”)) Ė = (š(š”), š(š”)), Ė š = 1, . . . , š. šš” š šĖš ššš For brevity, we sometimes write expressions for partial derivatives like ššæ (ļø ššæ ššæ )ļø = ,..., . šš šš1 ššš Version Time-stamp: ”2014-10-01 15:56:09 drager”. 1 2 LANCE D. DRAGER Define a map š¹ : R2š → R2š by (ļø ššæ š¹ (š, š) Ė = š, (š, š)). Ė šš The Lagrangian šæ is called hyperregular if this map is a diffeomorphism. For the rest of these notes, we deal with hyperregular Lagrangian. Let šŗ(š, š) = (š, Γ(š, š)) be the inverse of š¹ . By our Lemma, we have (4) (5) ššæ (š, Γ(š, š)) = š š šĖ (ļø ššæ )ļø Γ š, (š, š) Ė = šĖ š šĖ The quantify (6) šš = ššæ (š, š) Ė š šĖš is called the (generalized) momentum conjugate to šš . Given a path šˆ(š”) = (š(š”), š(š”)), Ė we get a path š¾(š”) = š¹ (š(š”), š(š”)) Ė = (š(š”), š(š”)), where š(š”) = ššæ (š(š”), š(š”)). Ė š šĖ If š 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) š ššæ š(š”) = (š(š”), š(š”)) Ė šš” šš and we have (8) š š(š”) = š(š”) Ė = Γ(š(š”), š(š”)), šš” We need to eliminate the š(š”) Ė in (7), which we can do using (8), (9) š ššæ š(š”) = (š(š”), Γ(š(š”), š(š”))). šš” šš The equations (9) and (8) give us our desired differential equations. A path (š(š”), š(š”)) satisfies these equations if and only if the corresponding path (š(š”), š(š”)) Ė satisfies the Euler-Lagrange equations. However, we can write the equations in a more informative form. Define the Ģļø š) by function šæ(š, Ģļø š) = šæ(š, Γ(š, š)), šæ(š, the Lagrangian expressed in terms of š and š. EULER-LAGRANGE TO HAMILTON 3 Using the chain rule, we get Ģļø ]ļø ššæ š [ļø (š, š) = šæ(š, Γ(š, š)) ššš ššš š ∑ļø ššæ šΓš ššæ = (š, Γ(š, š)) + (š, Γ(š, š))) (š, š) ššš š šĖš ššš š=1 = š ∑ļø ššæ šΓš (š, Γ(š, š)) + (š, š), šš ššš ššš š=1 using (4). We can solve this equation for ššæ/ššš to get š ∑ļø Ģļø ššæ šΓš ššæ (š, Γ(š, š)) = (š, š) − šš (š, š) ššš ššš ššš š=1 =− š ššš {ļø ∑ļø š }ļø Ģļø š) šš Γš (š, š) − šæ(š, š=1 šš» =− (š, š), ššš where (10) š»(š, š) = š ∑ļø Ģļø š) šš Γš (š, š) − šæ(š, š=1 is the Hamiltonian of the problem. The minus sign is conventional. Thus, by (7), we have (11) ššš šš» (š”) = − (š(š”), š(š”)) šš” ššš which is one of Hamilton’s equations. This equation holds only when the EulerLagrange equations are satisfied. For the other equation, we can calculate as follows: ]ļø [ļø š šš» š ∑ļø Ģļø (š, š) = šš Γš (š, š) − šæ(š, š) ššš ššš š=1 (12) š ∑ļø Ģļø šΓš ššæ = Γš (š, š) + šš (š, š) − (š, š). ššš ššš š=1 Ģļø we have To calculate the partial derivatives of šæ, Ģļø ]ļø ššæ š [ļø (š, š) = šæ(š, Γ(š, š)) ššš ššš š ∑ļø ššæ šΓš = (š, Γ(š, š)) (š, š) š š Ė ššš š š=1 = š ∑ļø š=1 šš šΓš (š, š), ššš 4 LANCE D. DRAGER using equation (4). Plugging this into (12), we have š ∑ļø Ģļø šš» ššæ šΓš (š, š) = Γš (š, š) + (š, š) − (š, š) šš ššš ššš ššš š=1 š ∑ļø šΓš šΓš (š, š) − (š, š) = Γš (š, š) + šš šš šš ššš š š=1 š=1 š ∑ļø = Γš (š, š), in other words šš» = Γ(š, š), šš (13) so (8) becomes šš» šš (š”) = (š(š”), š(š”)). šš” šš (14) This equation holds for any path. Putting this together, we have Hamilton’s Equations šš» šš (š”) = (š(š”), š(š”)) šš” šš šš» šš (š”) = − (š(š”), š(š”)), šš” šš (15) or, to put in the indices, (16) ššš šš» (š”) = (š(š”), š(š”)) šš” ššš ššš šš» (š”) = − (š(š”), š(š”)), šš” ššš š = 1, . . . , š. In the classical literature, the formula for š», š»(š, š) = š ∑ļø Ģļø š) šš Γš (š, š) − šæ(š, š=1 is often written as š»(š, š) = š ∑ļø Ģļø š), šš šĖš − šæ(š, š=1 in view of our formula šĖ = Γ(š, š), but this is a bit obscure, since you have to remember that šĖ here is a function of š and š, 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 (š1 , š2 ) on the plane and follow the notation above. The Lagrangian is šæ(š, š) Ė = 1 š(šĖ12 + šĖ22 ) − š (š1 , š2 ). 2 EULER-LAGRANGE TO HAMILTON 5 The conjugate momenta are ššæ (š, š) Ė = ššĖ1 š šĖ1 ššæ (š, š) Ė = ššĖ2 š2 = š šĖ2 š1 = We can easily solve this for the š’s Ė in terms of the š’s: šĖ1 = š1 /š šĖ2 = š2 /š, in other words Γ(š, š) = 1 š. š Substituting in the Lagrangian, we get Ģļø š) = šæ(š, Γ(š, š)) šæ(š, [ļø(ļø )ļø2 (ļø )ļø2 ]ļø š1 š2 1 + − š (š) = š 2 š š 1 2 = (š + š22 ) − š (š). 2š 1 Then we get š»(š, š) = š ∑ļø Ģļø š) šš šĖš − šæ(š, š=1 Ģļø š) = š1 šĖ1 + š2 šĖ2 − šæ(š, {ļø }ļø š1 1 2 š2 2 = š1 + š2 − (š + š2 ) − š (š) š š 2š 1 1 2 = (š + š22 ) + š (š) 2š 1 If we write this on the Lagrangian side as šø(š, š) Ė = (š» ā š¹ )(š, š) Ė 1 = ((ššĖ1 )2 + (ššĖ2 )2 ) + š (š) 2š 1 = š(šĖ12 + šĖ22 ) + š (š), 2 we get the kinetic energy plus the potential energy, so šø(š, š) Ė is the total energy of the system and š» 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 šš» šš ššš (š”) = − (š, š) = − šš” ššš ššš ššš šš» (š”) = (š, š) = šš /š šš” ššš We’ll leave it as an exercise to substitute šš = ššĖš and put the equations into one second order equation to get Newton’s equations. 6 LANCE D. DRAGER Since š» or šø 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 šæ(š”, š, š)). Ė Theorem 1.3. If (š(š”), š(š”)) is a solution of Hamilton’s equations (16), then š»(š(š”), š(š”)) is a constant function of š”, i.e., “Energy is conserved.” Proof. We just differentiate š»(š(š”), š(š”)) and plug in Hamilton’s equations: š š ∑ļø ∑ļø š ššš ššš šš» šš» š»(š(š”), š(š”)) = (š(š”), š(š”)) (š”) + (š(š”), š(š”)) (š”) šš” šš šš” šš šš” š š š=1 š=1 = š ∑ļø šš» š=1 ššš (š(š”), š(š”)) šš» (š(š”), š(š”))+ ššš š ∑ļø šš» š=1 [ļø ]ļø šš» (š(š”), š(š”)) − (š(š”), š(š”)) ššš ššš = 0. The derivative of š»(š(š”), š(š”)) is zero, so it’s a constant function. Exercise 1.4. Show directly from the Euler-Lagrange equations that the energy šø(š(š”), š(š”)) Ė is constant on solutions (š(š”), š(š”)) Ė of the Euler-Lagrange equations. Exercise 1.5. What happens for time dependent Lagrangians šæ(š”, š, š)? Ė Department of Mathematics and Statistics, Texas Tech University, Lubbock, TX 79409-1042 E-mail address: lance.drager@ttu.edu