Hamiltonian Dynamics
Total Page:16
File Type:pdf, Size:1020Kb
Chapter 5. Hamiltonian Dynamics (Most of the material presented in this chapter is taken from Thornton and Marion, Chap. 7) 5.1 The Canonical Equations of Motion As we saw in section 4.7.4, the generalized momentum is defined by !L p j = . (5.1) !q! j We can rewrite the Lagrange equations of motion !L d !L " = 0 (5.2) !q dt !q! j j as follow !L p! j = . (5.3) !q j We can also express our earlier equation for the Hamiltonian (i.e., equation (4.89)) using equation (5.1) as H = p q! ! L. (5.4) j j Equation (5.4) is expressed as a function of the generalized momenta and velocities, and the Lagrangian, which is, in turn, a function of the generalized coordinates and velocities, and possibly time. There is a certain amount of redundancy in this since the generalized momenta are obviously related to the other two variables through equation (5.1). We can, in fact, invert this equation to express the generalized velocities as q! = q! q , p ,t . (5.5) j j ( k k ) This amounts to making a change of variables from q ,q! ,t to q , p ,t ; we, therefore, ( j j ) ( j j ) express the Hamiltonian as H (qk , pk ,t) = p jq! j ! L(qk ,q!k ,t) , (5.6) 91 where it is understood that the generalized velocities are to be expressed as a function of the generalized coordinates and momenta through equation (5.5). The Hamiltonian is, therefore, always considered a function of the (qk , pk ,t) set, whereas the Lagrangian is a function of the (qk ,q!k ,t) set: H = H (qk , pk ,t) (5.7) L = L(qk ,q!k ,t) Let’s now consider the following total differential " !H !H % !H (5.8) dH = $ dqk + dpk ' + dt, # !qk !pk & !t but from equation (5.6) we can also write # "L "L & "L dH = q! dp + p dq! ! dq ! dq! ! dt. (5.9) $% k k k k "q k "q! k '( "t k k Replacing the third and fourth terms of equation (5.9) by inserting equations (5.3) and (5.1), respectively, we find "L dH = (q!kdpk ! p! kdqk ) ! dt. (5.10) "t Equating this last expression to equation (5.8) we get the so-called Hamilton’s or canonical equations of motion !H q! = k !p k (5.11) !H p! = " k !q k and !H !L = " . (5.12) !t !t Furthermore, if we insert the canonical equations of motion in equation (5.8) we find (after dividing by dt on both sides) 92 dH # !H !H !H !H & !H = % " ( + , (5.13) dt $ !qk !pk !pk !qk ' !t or again dH !H = . (5.14) dt !t Thus, the Hamiltonian is a conserved quantity if it does not explicitly contain time. We can therefore choose to solve a given problem in two different ways: i) solve a set of second order differential equations with the Lagrangian method or ii) solve twice as many first order differential equations with the Hamiltonian formalism. It is important to note, however, that it is sometimes necessary to first find an expression for the Lagrangian and then use equation (5.6) to get the Hamiltonian when using the canonical equations to solve a given problem. It is not always possible to straightforwardly find an expression for the Hamiltonian as a function of the generalized coordinates and momenta. Example Use the Hamiltonian method to find the equations of motion for a spherical pendulum of mass m and length b . Solution. The generalized coordinates are ! and " . The kinetic energy is therefore Figure 5.1 – A spherical pendulum with generalized coordinates ! and " . 93 1 T = m x!2 + y!2 + z!2 2 ( ) 2 2 2 1 +)# d & # d & # d & +- = m *% (bsin(!)cos("))( + % (bsin(!)sin("))( + % (bcos(!))( . 2 ,+$dt ' $dt ' $dt ' /+ 1 2 = mb2 #!! cos(!)cos(") 0 "!sin(!)sin(")& (5.15) 2 {$ ' ! ! 2 ! 2 + $#! cos(!)sin(") + " sin(!)cos(")'& + $#! sin(!)'& } 1 = mb2 (!!2 + "!2 sin2 (!)), 2 with the usual definition for x, y, and z . The potential energy is U = !mgbcos("). (5.16) The generalized momenta are then "L p = = mb2!! ! "!! (5.17) "L p = = mb2 sin2 ! #!, # ! ( ) "# and using these two equations we can solve for ! ! as a function of the generalized ! and " momenta. Since the system is conservative and that the transformation from Cartesian to spherical coordinates does not involve time, we have H = T + U 2 2 1 2 " p! % 1 2 2 " p( % = mb $ 2 ' + mb sin (!) 2 2 ) mgbcos(!) (5.18) 2 # mb & 2 #$ mb sin (!)&' p 2 p 2 = ! + ( ) mgbcos(!). 2mb2 2mb2 sin2 (!) Finally, the equations of motion are 94 H p ! " ! ! = = 2 "p! mb "H p #! = = # "p mb2 sin2 (!) # (5.19) "H p 2 cos(!) p! = $ = # $ mgbsin(!) ! "! mb2 sin3 (!) "H p! = $ = 0. # "# Because ! is cyclic (or ignorable), the generalized momentum p! about the symmetry axis is a constant of motion. p! is actually the component of the angular momentum along the z-axis . 5.2 The Modified Hamilton’s Principle In the preceding chapter we derived Lagrange’s equation from Hamilton’s Principle t2 ! L q j ,q! j ,t dt = 0. (5.20) "t ( ) 1 As it turns out, it is also possible to obtain the canonical equations of motions using the same variational principle. To do so, we start from equation (5.6) to express the Lagrangian as a function of the Hamiltonian L q ,q! ,t = p q! ! H q , p ,t . (5.21) ( j j ) k k ( j j ) Inserting equation (5.21) in (5.20) we have t2 ! # pkq!k " H q j , p j ,t %dt = 0, (5.22) 't $ ( )& 1 and carrying the variation on the integrand t2 $ #H #H ' (5.23) & pk!q!k + q!k! pk " !qk " ! pk ) dt = 0. *t1 % #q #p ( k k But since !q! = d !q dt , we can write k ( k ) 95 t2 t2 d pk!q!kdt = pk (!qk )dt "t1 "t1 dt t t2 2 (5.24) = pk!qk t # p! k!qkdt 1 "t1 t2 = # p! k!qkdt. "t 1 Using equation (5.24) into equation (5.23) t2 *# "H & # "H & - q!k ! ) pk ! p! k + )qk dt = 0. (5.25) 0t ,% ( % ( / 1 +$ "pk ' $ "qk ' . Since the !qk and ! pk are independent variations, we retrieve Hamilton’s (or the canonical) equations !H q! = k !p k (5.26) !H p! = " . k q ! k 5.3 Canonical Transformations As we saw in our previous example of the spherical pendulum, there is one case when the solution of Hamilton’s equation is trivial. This happens when a given coordinate is cyclic; in that case the corresponding momentum is a constant of motion. For example, consider the case where the Hamiltonian is a constant of motion, and where all coordinates q j are cyclic. The momenta are then constants p j = ! j , (5.27) and since the Hamiltonian is not be a function of the coordinates or time, we can write H = H (! j ), (5.28) where j = 1, ... , n with n the number of degrees of freedom. Applying the canonical equation (5.26) for the coordinates, we find !H q! j = = # j , (5.29) !" j where the ! j ’s can only be a function of the momenta (i.e., the ! j ’s) and are, therefore, also constant. Equation (5.29) can easily be integrated to yield 96 q j = ! jt + " j , (5.30) where the ! j ’s are constants of integration that will be determined by the initial conditions. It may seem that such a simple example can only happen very rarely, since usually not every generalized coordinates of a given set is cyclic. But there is, however, a lot of freedom in the selection of the generalized coordinates. Going back, for example, to the case of the spherical pendulum, we could choose the Cartesian coordinates to solve the problem, but we now know that the spherical coordinates allow us to eliminate one coordinate (i.e., ! ) from the expression for the Hamiltonian. We can, therefore, surmise that there exists a way to optimize our choice of coordinates for maximizing the number of cyclic variables. There may even exist a choice for which all coordinates are cyclic. We now try to determine the procedure that will allow us to transform form one set of variable to another set that will be more appropriate. In the Hamiltonian formalism the generalized momenta and coordinates are considered independent, so a general coordinate transformation from the (q j , p j ) to, say, (Qj ,Pj ) sets can be written as Qj = Qj (qk , pk ,t) (5.31) Pj = Pj (qk , pk ,t). Since we are strictly interested in sets of coordinates that are canonical, we require that there exits some function K (Qk ,Pk ,t) such that !K Q! = j !P j (5.32) !K P! = " . j !Q j The new function K plays the role of the Hamiltonian. It is important to note that the transformation defined by equations (5.31)-(5.32) must be independent of the problem considered. That is, the pair (Qj ,Pj ) must be canonical coordinates in general, for any system considered. We know from our study of the modified Hamilton’s Principle in section 5.2 that the canonical equations resulted from the condition t2 ! # pkq!k " H q j , p j ,t %dt = 0, (5.33) 't $ ( )& 1 97 which we can similarly write for equations (5.32) t 2 ! ! #PkQk " K Qj ,Pj ,t %dt = 0. (5.34) 't $ ( )& 1 Now consider an arbitrary function F (with a continuous second order derivative), which can be dependent on any mixture of q j , p j , Qj , and Pj , and time (e.g., F = F(q j ,Pj ,t) , or F = F(Qj , p j ,t), or F = F(q j ,Qj ,t) , etc.).