Chapter VII Hamilton’s Principle- Lagrangian & Hamiltonian Mechanics
Recommended problems: 7-1, 7-2, 7-3, 7-4, 7-6, 7-7, 7-10, 7-12, 7-13, 7-14, 7-15, 7-25, 7-26, 7-27, 7-29, 7-33, 7-34, 7-37, 7-39, . Hamilton’s Principle Of all the possible paths along which a dynamical system may move from one point to another within a specific time interval (consistent with any constraint), the actual path followed is that which minimizes the time interval of the difference between the kinetic and potential energies, i.e.,
t2 T U dt 0 (7.1) t1 This means that the integral of T-U must be an extremum. Defining the difference of T-U to be the Lagrangian as
Lxi , xi;t Txi Uxi (7.2) Eq.(7.1) now reads
t2 Lxi , xi;tdt 0 (7.3) t1 Comparing Eq.(7.3) and Eq.(.3) with f L, x t y x y x We get the Euler’s equations as L d L 0 (7.4) Lagrange Equation x dt x
Example Find the equation of motion of the 1-Dimensional harmonic oscillator.
Solution The Lagrangian of the system is
L T U 1 mx2 1 kx2 2 2 L L kx & mx x x d k kx mx 0 kx mx 0 x x 0 dt m Example Find the equation of motion of the simple pendulum shown.
Solution With respect to the top, the potential energy of the ball is
U mgLcos Lcos And for the kinetic energy we have L T 1 mv2 1 mL22 2 2
L 1 mL22 mgLcos 2 m L L mgLsin & mL2
Using Lagrange equation we get d mgLsin mL2 0 mgLsin mL2 0 dt g sin 0 L Generalized Coordinates
Generalized coordinates are any set of independent coordinates qi (not connected by any equations of constraint) that completely specifies the state of a system. The required number of generalized coordinates is equal to the system’s number of degrees of freedom. A single particle free to move in 3-dimensional space requires 3-coordinates to specify configuration and hence has a 3-degrees of freedom. n-free particles would require 3n coordinates and so on. . For each constraint equation the number of generalized coordinated is decreased by one coordinate. This means that if there are m equations of constraints, then 3n-m coordinates are independent, and the system is said to posses s=3n-m degrees of freedom. The equations of constraints must be expressible of the form
fk xi ,t 0 i 1,2,n k 1,2,m (6.5) Constraints that can be expressed in the form of Eq.(6.5) is called holonomic constraint, otherwise it is nonholonomic. Since the Lagrangian is a scalar function it is invariant to coordinates transformation. In terms of the generalized coordinates, the Lagrange’s equations can be written as
L d L 0 j 1,2,s (6.6) Lagrange Equations q j dt q j
There are s of these equations, and together with the m equations of constraints and the initial conditions, they completely describe the motion of the system. It is important to realize that the validity of Lagrange’s equations requires the following 2-conditions:
1- The forces acting on the system (apart from any constraint forces) must be conservative.
1- The Equations of constraints must be in the form of Eq.(6.5), i.e., the constraint must be holonomic.. Example Find a suitable set of generalized coordinates for a point particle moving on the surface of a hemisphere of radius R whose center is at the origin. Solution The particle is constrained to move on the surface, so we have
x2 y2 z2 R2 x2 y2 z2 R2 0
If we choose the Cartesian coordinates our generalized coordinates will be
2 2 2 q1 x, q2 y z R x y
Example Use the (x,y) coordinates system as shown in the figure to find the K.E. T, P.E. U, and the Lagrangian L for a simple pendulum moving in the x-y plane. Determine the transformation equations from the (x,y) coordinates to the coordinates . Find the equations of motion. Solution Using the rectangular coordinates we have
T 1 m x2 y 2 U mgy 2 L T U 1 m x2 y 2 mgy 2 To transformation x&y into the coordinates we have x lsin & y l cos x lcos & y lsin
L 1 m x2 y 2 mgy 1 ml22 mgl cos 2 2 To find the equation of motion we apply Lagrange’s equation (Eq.7.4). We have 2 L L dml mglsin ml2 mglsin 0 dt g sin 0 l y Example Consider the problem of a projectile motion under gravity in 2- dimensions. Find the equations of motion in both Cartesian and polar vo coordinates. x Solution Using the Cartesian coordinates we have, taking U=0 at y=0, T 1 m x2 y 2 U mgy 2
L T U 1 m x2 y 2 mgy 2 Here we have 2-generalized coordinates, x & y. So Lagrange’e equations give
L d L L d L 0 & 0 x dt x y dt y d For the x-coordinate we have 0 mx 0 x 0 dt d mg my 0 y g dt In polar coordinates, the generalized coordinates are r & . Now we have
T 1 m r2 r22 U mgrsin 2
L 1 m r2 r22 mgrsin 2 Lagrange’e equations give for the 2-generalized coordinates, r & gives L d L For the r-coordinate we have 0 r dt r d mr2 mg sin mr 0 r2 g sin r 0 dt L d L For the -coordinate we have 0 dt d mgr cos mr2 0 gr cos 2rr r2 0 dt
Example A particle of mass m is constrained to move on the inside surface of a smooth cone of half-angle . Determine the generalized coordinates and the constraints. Find the equation of motions. Solution here we use the cylindrical coordinates r, , & z. The equation of constraint is z r cot So we 2-degrees of freedom and the generalized coordinates are r & . Now
T 1 m r2 r22 z2 1 m r2 r22 r2 cot2 1 m r2 csc2 r22 2 2 2
U mgz mgrcot L 1 m r2 csc2 r22 mgr cot 2 L d L For the r-coordinate we have 0 r dt r d mr2 mg cot mrcsc2 0 r2 g cot rcsc2 0 dt L d L For the -coordinate we have 0 dt d 0 mr2 0 mr2 constant dt But L I mr2 constant
So we recover the conservation of angular momentum about the axis of symmetry of the system. Example The point of support of a simple pendulum of length b moves on a massless rim of radius a rotating with constant angular velocity . Obtain the equation of motion of m. Solution Taking the origin of the coordinates be at the center of the rotating rim we get x acost bsin y asint bcos x asint bcos y a cost bsin
The K.E & P.E are now
T 1 m x2 y 2 1 m a22 b22 2basin t 2 2 U mgy mgasint bcos L 1 m a22 b22 2basin t mg asint bcos 2 The only generalized coordinate is . SO L mbacos t mgbsin L mb2 basin t d L 2 mb mba cos t dt Applying the Lagrange’e equation we get mb2 mba cos t mbacos t mgbsin mb2 mba2 cos t mgbsin
a2 g cos t sin b b Note that for =0 we get g sin 0 b Which is the equation of motion of the simple pendulum. Example Find the frequency of a simple a pendulum placed in a rail-road car that has a constant acceleration a in the x-direction. l Solution We choose a fixed coordinate l system with x=0, and v=vo at t=0. The position of the mass m is m m x l sin v t 1 at 2 o 2 y l cos x l cos vo at y lsin The K.E & P.E are now 2 2 T 1 m x2 y 2 1 m v at lcos 1 m lsin 2 2 o 2 U mgy mgl cos
L 1 m v at lcos 2 1 m lsin 2 mgl cos 2 o 2 The only generalized coordinate is again . SO L mlsinv at lcos ml22 sin cos mglsin o L mlsinv at mglsin o g a sin cos cos sin cos cos sin sin l l l l l l L d L Applying the Lagrange’s equation 0 dt g a sin cos ( prove as HW ) l l If the mass doesn’t oscillate with respect to the train, then 0 g a a 0 sinl cosl tan l l l g
Because the oscillations are small we can assume l is very small g a sin cos l l l l Expand the sin and cosine functions we get L ml cosv at lcos ml2sin2 o Using Taylor expansion for sin and cos to first order of we get g a sin cos cos sin l l l l l l 1 g sin acos g cos asin l l l l l The first bracket is already zero leaving g cos asin l l l a a g As tanl sin & cos g a2 g 2 a2 g 2 g 2 a2 g 2 a2 l g 2 a2 l
g 2 a2 0 l g 2 a2 We have SHM with frequency 2 l
Note that when the car is at rest (a=0) we get 2 g l Example A bead slides along a smooth wire bent in the shape of a parabola z=cr2. The bead rotates in a circle of radius R when the wire is rotating about its vertical symmetry axis with angular velocity . Find the value of c. Solution Choosing the cylindrical coordinates we get
T 1 m r2 z2 r22 U mgz 2 The equation of constraint is z cr 2 z 2crr
2 2 2 2 2 2 2 L L 1 mr 4c r r r mgcr m4c2rr2 r2 2mgcr 2 r L 2 2 d L 1 2 2 2 2 mr 4c r r 2r 8c r r16c rr r dt r 2 r1 4c2r2 r2 4c2r r2gc 2 0 This equation can be simplified if r=R=constant. In such a case we have
2 2 2gc 0 c 2g Example Consider the double pulley system shown. Use the coordinates indicated to determine the equations of motion.
Solution If l1 & l2 be the lengths of the rope hanging freely from each pulley. The distances x & y are measured from the center of the pulleys. So we have x1 x & x2 l1 x y & x3 l1 x l2 y
x1 x & x2 x y & x3 x y T 1 m x2 1 m x2 1 m x2 2 1 1 2 2 2 2 3 3 1 m x2 1 m y x 2 1 m y x 2 2 1 2 2 2 3
U U1 U2 U3 m1gx m2gl1 y x m3gl1 x l2 y L 1 m x2 1 m y x 2 1 m y x 2 2 1 2 2 2 3 m1gx m2gl1 y x m3gl1 x l2 y Here we have 2-generalized coordinates, x & y. For the x-coordinate we have
L d L 0 x dt x L L m g m gx m gx m1x m2y x m3y x x 1 2 3 x
m1x m2x y m3x y m1 m2 m3g L d L For the y-coordinate we have 0 y dt y L L m gy m gy m y x m y x y 2 3 y 2 3
m2x y m3x y m2 m3g Lagrange’s Equations with Undetermined Multipliers
As we mentioned before, Holonomic constraint is the constraint that can be expressed in the form of Eq.(7.5). Such a constraint enables us to find an algebraic relations between coordinates. Any constraints that can be expressed in terms of the velocities, i.e., in the form
fk xi , xi ,t 0 i 1,2,n k 1,2,m (6.7)
Such constraints is nonholonomic unless the equations can be integrated to yield relations among the coordinates. It is called semiholonomic. Consider a nonholonomic constraint in the form of
Ai xi B 0 i 1,2,n (6.8) i
But if Ai & B have the forms f f Ai & B , f f x,t (6.9) xi t
Then Eq.(6.8) becomes f dx f df i 0 (6.10) i xi dt t dt
f x,t constant 0 So the constraint is actually holonomic.
From Eq.(10) we conclude that any constraint expressible in the form f f dqi dt 0 (6.11) i qi t Are equivalent to the constraint given by Eq.(6.5). Referring to the previous chapter (Eq. 6.23) we can write L d L f k t 0 (6.12) qi dt qi k qi
With k(t) are called the Lagrange undetermined multipliers. It its related to the force of constraint. The generalized forces of constraint are given by f Qi k t (6.13) k qi Example Reconsider the case of the disk rolling down an inclined plane. Find the equation of motion, the force of constrained, and the angular acceleration.
Solution The K.E. & P.E of the disk are
T 1 My 2 1 I2 1 My 2 1 MR22 2 2 2 4 U Mgl ysin
Where l is the length of the inclined plane. The Lagrangian is therefore
L 1 My 2 1 MR22 Mg l y sin 2 4 The equation of constraint is f y, y R 0 Although the system has only one degree of freedom, we may continue to consider both y & as generalized coordinates and use the method of Lagrange undetermined multipliers. Eq.(6.12) now reads L d L f L d L f 0 & 0 y dt y y dt L L f Mg sin & My & 1 Mg sin My 0 y y y L L 1 f 1 0 & MR2 & R MR2 R 0 2 2
These 2-equations together with the equation of constraint is sufficient to solve for the 3-unkowns. Now from the equation of constraint we have y R y R 2g sin 2g sin Mg sin y , & 3 3R 3 To find the generalized forces we use Eq.(6.13) to get f Mg sin f MgRsin Qy Q R y 3 3 These 2-genralized forces are the force of friction and the torque required to keep the disk rolling without slipping. Note that the problem can be solved using Eq.(6.6) by eliminating one of the coordinates and keeping only one-generalized coordinates. Example A particle of mass m starts at rest on top of a smooth fixed hemisphere of radius a. Find the force of constraints, and determine the angle at which the particle leaves the surface. Solution The Lagrangian of the particle is
L T U 1 m r2 r22 mgr cos 2 And the equation of constraint is f y, r a 0 The generalized coordinates are r & and Eq.(6.12) now reads
L d L f L d L f 0 & 0 r dt r r dt L L f mr2 mg cos & mr & 1 r r r mr2 mg cos mr 0 L L f mgrsin & mr2 & 0 mgrsin 2mrr mr2 0 But r a r 0, & r 0 g ma2 mg cos 0 mgasin ma2 0 sin a d d d d g To find we have sin dt d dt d a g 2 g g d sind cos 0 a 0 2 a a mg cos ma2 mg cos 2mg cos 2mg mg3cos 2
The particle falls off the surface when =0 mg3coso 2 0
1 2 o o cos 48.2 3 Note that at the top of the hemisphere we have mg The Hamiltonian & Hamilton’s Equations:
For simple dynamical systems the potential energy is a function of coordinates alone and the kinetic energy is a quadratic function of velocities, i.e.,
L Tqi ,qi Vqi (6.14) L T miqi pi (6.15) qi qi
With pi is called the generalized momenta. Now from Lagrange’s equation we have L d L L dp L 0 i 0 p (6.16) i q j dt q j q j dt q j
Now defining the Hamiltonian function as
H qi pi L (6.17) i With L is the Lagrangian given by Eq.(6.14) Now from Eq.(6.145) we have L T qi pi qi qi 2T (6.18) i i qi i qi
H qi pi L 2T T V T V (6.19) i That is, the Hamiltonian function represents the total energy of the system. Now L L H piqi qipi qi qi (6.20) i qi qi
But from Eq.(6.15) the 1ast and the 3rd term in the brackets cancel. Using Eq. (6.16) for the 4th term, Eq.(6.20) now reads
H qipi piqi (6.21) i Since H Hq , p H H i i H pi qi (6.22) i pi qi
Now comparing Eq.(6.21) with Eq.(6.22) we get H q p i i (6.23) Hamilton's equations of motion H pi qi Example Use the Hamiltonian method to find the equations of motion for a spherical pendulum of mass m and length b. Solution The K.E. & P.E of the particle are
T 1 m b22 b2 sin2 2 & U mgbcos 2
To find the Hamiltonian we have to find the generalized momenta. From Eq.(6.15) we have L L p mb2 & p mb2sin2 2 2 p p H,, p , p T V mgbcos 2mb2 2mb2 sin2 Applying Hamilton’s equations, Eq.(6.23) we get
H p H p & 2 2 2 p mb p mb sin 2 H p H p mgbsin & p 0 mb2 sin2