CH 6
CH 6
CH 6
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
L T U 12 mx 2 12 kx 2
L L
kx & mx
x x
d k
kx mx 0 kx mx 0 x x0
dt m
Example Find the equation of motion of the simple pendulum shown.
U mgL cos
Lcos
And for the kinetic energy we have
L
T 1 mv 2 1 mL2 2
2 2
mgL sin
d
dt
mL2 0 mgL sin mL2 0
g
sin 0
L
Generalized Coordinates
L d L
0 j 1,2, s (6.6) Lagrange Equations
q j dt q j
1- The forces acting on the system (apart from any constraint forces) must
be conservative.
x2 y2 z 2 R2 x2 y2 z 2 R2 0
If we choose the Cartesian coordinates our generalized coordinates will be
q1 x, q2 y z R2 x2 y2
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 12 m x 2 y 2 U mgy
L T U 12 m x 2 y 2 mgy
To transformation x&y into the coordinates we have
L 12 m x 2 y 2 mgy 12 ml 2 2 mgl cos
To find the equation of motion we apply Lagrange’s equation (Eq.7.4). We have
L
mgl sin
L
ml 2 mgl sin
d ml 2
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 12 m x 2 y 2 U mgy
L T U 12 m x 2 y 2 mgy
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 12 m r 2 r 2 2 U mgr sin
L 12 m r 2 r 2 2 mgr sin
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
mr 2 mg sin mr 0 r 2 g sin r 0
dt
L d L
For the -coordinate we have 0
dt
d
mgr cos mr 2 0 gr cos 2rr r 2 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 12 m r 2 r 2 2 z 2 12 m r 2 r 2 2 r 2 cot 2 12 m r 2 csc2 r 2 2
U mgz mgr cot
L 1 m r 2 csc2 r 2 2 mgr cot
2
L d L
For the r-coordinate we have 0
r dt r
d
mr mg cot mr csc2 0 r 2 g cot rcsc2 0
2
dt
L d L
For the -coordinate we have 0
dt
d
0 mr 2 0
dt
mr 2 constant
T 12 m x 2 y 2 12 m a 2 2 b 2 2 2ba sin t
U mgy mg a sin t b cos
L 12 m a 2 2 b 2 2 2ba sin t mg a sin t b cos
The only generalized coordinate is . SO
L
mba cos t mgb sin
L
m b 2 ba sin t
d L
mb mba cos t
2
dt
Applying the Lagrange’e equation we get
a 2
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 vot 12 at 2 y l cos
T 12 m x 2 y 2 12 mvo at l cos 12 ml sin
2 2
2 2
g 2
a 2
l
g 2 a2
l g a
g 2 a2
0
l
g 2 a2
We have SHM with frequency 2
l
T 12 m r 2 z 2 r 2 2 U mgz
L 12 m r 2 4c 2 r 2 r 2 r 2 2 mgcr 2 L m 4c 2 rr 2 r 2 2mgcr
r
L
r
d L 1
m r 4c 2 r 2 r 2r 8c 2 r 2 r 16c 2 rr 2
dt r 2
r1 4c 2 r 2 r 2 4c 2 r r 2 gc 2 0
This equation can be simplified if r=R=constant. In such a case we have
2gc 0
2
c
2
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
U U1 U 2 U 3
m1gx m2 g l1 y x m3 g l1 x l2 y
L 12 m1x 2 12 m2 y x 2 12 m3 y x 2
m1gx m2 g l1 y x m3 g l1 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
m1g m2 gx m3 gx m1x m2 y x m3 y x
x x
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.
U Mg l y sin
Where l is the length of the inclined plane. The Lagrangian is therefore
L T U 12 m r 2 r 2 2 mgr cos
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
mr 2 mg cos & mr & 1
r r r
mr 2 mg cos mr 0
L L f
mgr sin & mr 2 & 0
mgr sin 2mrr mr 2 0
But r a r 0, & r 0
g
ma 2 mg cos 0 mga sin ma 2 0 sin
a
To find we have d d d d g
sin
dt d dt d a
g 2 g
d a sin d cos
g
0 0 2 a a
mg cos ma 2 mg cos 2mg cos 2mg mg 3 cos 2
The particle falls off the surface when =0 mg 3 cos o 2 0
1 2
o cos 48.2o
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 d L L dpi L
0 0 p i (6.16)
q j dt q j q j dt q j
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
Since H H qi , pi H H
H pi qi (6.22)
i pi qi
T 12 m b 2 2 b 2 sin 2 2 & U mgb cos
H p H p
&
p mb 2 p mb 2 sin 2
H p2 H
p mgb sin & p 0
mb sin
2 2