15. Hamiltonian Mechanics Gerhard Müller University of Rhode Island, [email protected] Creative Commons License
Total Page:16
File Type:pdf, Size:1020Kb
University of Rhode Island DigitalCommons@URI Classical Dynamics Physics Course Materials 2015 15. Hamiltonian Mechanics Gerhard Müller University of Rhode Island, [email protected] Creative Commons License This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 4.0 License. Follow this and additional works at: http://digitalcommons.uri.edu/classical_dynamics Abstract Part fifteen of course materials for Classical Dynamics (Physics 520), taught by Gerhard Müller at the University of Rhode Island. Documents will be updated periodically as more entries become presentable. Recommended Citation Müller, Gerhard, "15. Hamiltonian Mechanics" (2015). Classical Dynamics. Paper 7. http://digitalcommons.uri.edu/classical_dynamics/7 This Course Material is brought to you for free and open access by the Physics Course Materials at DigitalCommons@URI. It has been accepted for inclusion in Classical Dynamics by an authorized administrator of DigitalCommons@URI. For more information, please contact [email protected]. Contents of this Document [mtc15] 15. Hamiltonian Mechanics • Legendre transform [tln77] • Hamiltonian and canonical equations [mln82] • Lagrangian from Hamiltonian via Legendre transform [mex188] • Can you find the Hamiltonian of this system? [mex189] • Variational principle in phase space [mln83] • Properties of the Hamiltonian [mln87] • When does the Hamiltonian represent the total energy? [mex81] • Hamiltonian: conserved quantity or total energy? [mex77] • Bead sliding on rotating rod in vertical plane [mex78] • Use of cyclic coordinates in Lagrangian and Hamiltonian mechanics [mln84] • Velocity-dependent potential energy [mln85] • Charged particle in electromagnetic field [mln86] • Velocity-dependent central force [mex76] • Charged particle in a uniform magnetic field [mex190] • Particle with position-dependent mass moving in 1D potential [mex88] • Pendulum with string of slowly increasing length [mex89] • Librations between inclines [mex259] Legendre transform [tln77] Given is a function f(x) with monotonic derivative f 0(x). The goal is to replace the independent variable x by p = f 0(x) with no loss of information. Note: The function G(p) = f(x) with p = f 0(x) is, in general, not invertible. The Legendre transform solves this task elegantly. • Forward direction: g(p) = f(x) − xp with p = f 0(x). • Reverse direction: f(x) = g(p) + px with x = −g0(p) Example 1: f(x) = x2 + 1. p p2 • f(x) = x2 + 1 ⇒ f 0(x) = 2x ⇒ x = ⇒ g(p) = 1 − . 2 4 p2 p • g(p) = 1 − ⇒ g0(p) = − ⇒ p = 2x ⇒ f(x) = x2 + 1. 4 2 Example 2: f(x) = e2x. 1 p • f(x) = e2x ⇒ f 0(x) = 2e2x = p ⇒ x = ln 2 2 p p p ⇒ g(p) = − ln . 2 2 2 p p p 1 p • g(p) = − ln ⇒ g0(p) = − ln = −x 2 2 2 2 2 ⇒ p = 2e2x ⇒ f(x) = e2x. Hamiltonian and Canonical Equations [mln82] Hamiltonian from Lagrangian via Legendre transform: • Given the Lagrangian of a mechanical system: L(q1, . , qn;q ˙1,..., q˙n; t). ∂L • Introduce canonical coordinates: qi, pi = , i = 1, . , n. ∂q˙i • Construct Hamiltonian: X H(q1, . , qn; p1, . , pn; t) = q˙jpj − L(q1, . , qn;q ˙1,..., q˙n; t), j whereq ˙j =q ˙j(q1, . , qn; p1, . , pn; t) is inferred from pi = ∂L/∂q˙i. Canonical equations from total differential of H: X ∂H ∂H ∂H • dH = dq + dp + dt. ∂q j ∂p j ∂t j j j ! X X ∂L ∂L ∂L • d q˙ p − L = q˙ dp + p dq˙ − dq − dq˙ − dt; j j j j j j ∂q j ∂q˙ j ∂t j j j j ∂L d ∂L ∂L use = =p ˙j, = pj; ∂qj dt ∂q˙j ∂q˙j ! X X ∂L ⇒ d q˙ p − L = [q ˙ dp − p˙ dq ] − dt; j j j j j j ∂t j j • comparison of coefficients yields ∂H ∂H ◦ q˙j = , p˙j = − , j = 1, . , n (canonical equations), ∂pj ∂qj ∂H ∂L ◦ = − . ∂t ∂t Comments: • The inversion of pi = ∂L/∂q˙i as used above requires that ∂2L det 6= 0 [mex189]. ∂q˙iq˙j • Lagrangian from Hamiltonian: [mex188]. [mex188] Lagrangian from Hamiltonian via Legende transform Given a Hamiltonian system H(q1; : : : ; qn; p1; : : : ; pn; t) and the associated canonical equations q_i = @H=@pi; p_i = −@H=@qi; i = 1; : : : ; n, find the Lagrangian L(q1; : : : ; qn; q_1;:::; q_n; t) of the same system via Legendre transform, derive the Lagrange equations for the generalized coordinates q1; : : : ; qn and establish the relation @L=@t = −@H=@t. Solution: [mex189] Can you find the Hamiltonian of this system? Consider the Lagrangian system 1 1 L(q ; q ; q_ ; q_ ) = m(_q +q _ )2 − k(q2 + q2): 1 2 1 2 2 1 2 2 1 2 (a) Find the most general solution q1(t); q2(t) of the associated Lagrange equations. (b) Find the Hamiltonian H(q1; q2; p1; p2) such that the associated canonical equations have the same solution q1(t); q2(t). (c) Find the most general solution of H(q1; q2; p1; p2). Solution: Variational Principle in Phase Space [mln83] Hamilton’s principle: variations in configuration space. Z t2 δJ = δ dt L(q1, . , qn;q ˙1,..., q˙n; t) = 0, t1 where δqi = 0 at t1 and t2. ∂L d ∂L ⇒ Lagrange equations: − = 0, i = 1, . , n. ∂qi dt ∂q˙i Derivation: [mln78], [msl20]. Modified Hamilton’s principle: variations in phase space. " n # . Z t2 X δJ = δ dt piq˙i − H(q1, . , qn; p1, . , pn; t) = 0, t1 i=1 where δqi = 0 and δpi = 0 at t1 and t2. ∂H ∂H ⇒ Canonical equations:q ˙i = , p˙i = − , i = 1, . , n. ∂pi ∂qi Derivation: n Z t2 X ∂H ∂H δJ = dt p δq˙ +q ˙ δp − δq − δp = 0; i i i i ∂q i ∂p i t1 i=1 i i n " n #t2 n Z t2 X X Z t2 X use dt piδq˙i = piδqi − dt p˙iδqi; t1 t1 i=1 i=1 t1 i=1 | {z } 0 n Z t2 X ∂H ∂H ⇒ dt q˙ − δp − p˙ + δq = 0. i ∂p i i ∂q i t1 i=1 i i Properties of the Hamiltonian [mln87] How is the Hamiltonian constructed from kinetic energy and potential en- ergy? When does it represents the total energy? When is it conserved? Here is a list of some answers: • If the Hamiltonian does not depend explicitly on time then it is a conserved quantity: H(q1; : : : ; qn; p1; : : : ; pn) = const. n n dH X @H @H X = q_ + p_ = (−p_ q_ +p _ q_ ) = 0: dt @q j @p j j j j j j=1 j j j=1 • If T (q1; : : : ; qn;_q1;:::; q_n; t) is the kinetic energy and V (q1; : : : ; qn; t) the potential energy of a Lagrangian L = T − V , then the Hamiltonian is equal to the total energy: : @L H(q1; : : : ; qn; p1; : : : ; pn; t) = T + V = E(t); where pj = : @q_j • Suppose that some of the generalized coordinates q1; : : : ; qn are subject to holonomic constraints. Then H = T + V only holds if all those constraints are scleronomic, i.e. time-independent [mex81]. • Depending on the nature of the dynamical system and the choice of coordinates, the Hamiltonian may represent the total energy or a con- served quantity or both or neither [mex77]. • The property H 6= T + V occurs in the presence of velocity-dependent potentials [mln85]. The motion of a charged particle in a static mag- netic field is a prominent example [mln86]. • In the presence of time-dependent fields, the conceptual framework used here quickly shows its limitations, because such fields themselves can transport momentum and energy. [mex81] When does the Hamiltonian represent the total energy? Consider a dynamical system with 3N degrees of freedom subject to k holonomic constraints: ri = ri(q1; : : : ; qn; t); i = 1; : : : ; N; n = 3N − k: The kinetic and potential energies are given by the expressions N X 1 T = m j_r j2;V = V (r ;:::; r ; _r ;:::; _r ; t): 2 i i 1 N 1 N i=1 Show that the Hamiltonian H(q1; : : : ; qn; p1; : : : ; pn; t) derived from these specifications is equal to the total energy, E = T + V , only if (i) the potential energy does not depend on the velocities _ri and (ii) if the holonomic constraints are not explicitly time-dependent . Solution: [mex77] Hamiltonian: conserved quantity or total energy? A harmonic oscillator (mass m, spring constant k) is attached to a cart that moves with constant velocity v0. Describe the dynamics in the coordinate system (x) that is at rest and in the coordinate system (x0) that is moving with the cart. (a) Construct the Lagrangian L of the oscillator in the rest frame and derive the associated Lagrange equation. Construct the Hamiltonian H from L. (b) Construct the Lagrangian L0 of the oscillator in the moving frame and derive the associated Lagrange equation. Construct the Hamiltonian H0 from L0. (c) Show that the Lagrange equations obtained in (a) and (b) are equivalent. (d) Which of the two quantities H; H0, if any, represents the total energy of the oscillator? (e) Which of the two quantities H; H0, if any, represents a conserved quantity? x’ m v0 x Solution: [mex78] Bead sliding on rotating rod in vertical plane The rod AB rotates with constant angular velocity θ_ = ! at fixed perpendicular distance h about point O in a vertical plane. A bead of mass m is free to slide along the rod. Its position (relative to point C) on the rod is described by the variable q. (a) Construct the Lagrangian L(q; q;_ t) and derive the Lagrange equation for the variable q(t). (b) Solve the Lagrange equation for the following initial conditions: θ(0) = q(0) =q _(0) = 0. (c) Construct the Hamiltonian H(q; p; t) from L.