You are on page 1of 56

Lagrangian and Hamiltonian

Method
Meeting 7_31032021

Analytical Mechanics
By
Dolfie P. Pandara
PS FISIKA UNSRAT
• Different forms of Newton’s equations of
motion depends on coordinates
Rectangular Components – Cartesian Coordinates

 ( Fx î  Fy ˆj  Fz k̂ )  m( a x î  a y ˆj  a z k̂ )
or
Fx  max  mx
Fy  ma y  my
Fz  maz  mz
EQUATIONS OF MOTION IN TERMS OF
RADIAL AND TRANSVERSE
COMPONENTS
Consider particle at r and q, in polar
coordinates,

Fr  mar  m r  r 2  


F
F  ma  m r  2 r  y

Fr

r
 x
O
EQUATIONS OF MOTION IN TERMS OF
SPHERICAL COORDINATES

 
F  ma  m(r  r 2  r 2 sin 2  )rˆ 
m(r  2r  r 2 sin  cos  )ˆ 
m(r sin   2r cos   2r sin  )ˆ
LAGRANGIAN METHOD

• The Lagrangian method makes it simple to write the equations of motion in


any coordinate system.
• It makes it simpler to work with constraints and to identify conserved
quantities.
• The Lagrangian method makes it easier to find the equations of motions for
certain problems.
• Lagrange’s equations and the related Hamilton’s equations are of
fundamental importance to classical mechanics and quantum mechanics.
• Consider a system of N particles in three dimensional space.
• There are 3N cartesian coordinates needed to describe their motions.
• There is a Newton’s equation for each of these coordinates.
• A first step to the Lagrange method is to choose a new set of
coordinates called general coordinates.
 
r1  r1 (q1 , q2 ,......q3 N ; t )
 
r2  r2 (q1 , q2 ,......q3 N ; t )


 
rN  rN (q1•, q2 ,......q3 N ; t )
(3.1)
• The set of {q } collectively describe the configuration of the system.
j

• These coordinates are not necessarily of distance dimensions. Often


they are angles.
• Example of one particle in spherical polar coordinates (r, q, f).

x  r sin  cos 
(3.2) y  r sin  sin 
z  r cos 
• If particle moves on the surface of a sphere of radius l centered at the origin,
then only q and f vary in time. A relation of this type is called a constraint.
• Equations of motion which result directly from the substitutions of (3.1) in
Newton’s equations are usually messy.
• Lagrange’s equations are much nicer. They show explicitly the simplifications of
symmetries and constraints.
• Lagrange equations are not the same as Newton ‘s but are equivalent.
• In fact each Lagrange equation is a linear combination of Newton’s
equations, and vice versa.
Lagrange’s Equations in One Dimension

q (t )  q[ x(t ), t ]
•We introduce a general coordinate q(t) expressed in terms of x by

(3.3)

or
x(t )  x[q (t ), t ]
(3.4)

dx
x 
dt
x x
• Chain differentiation: x  q 
q t
(3.5)

• The partials are functions of q and t.


• The momentum is
p  mx

dK d ( 12 mx 2 )
p  (3.6)
dx dx
• Introduce a new momentum p(t) called the generalized momentum
K
• p(t )  (q, q , t )
q
(3.7)

dK x x
• Where p p
dx q q (3.8)

x x x x
• From (3.4) and (3.5) x  q  
q t q q (3.9)
• Therefore
x
p p
q
(3.10)

• Newton’s equation of motion.


p  F ( x, x , t ) (3.11)
The corresponding Lagrangian equation of motion involves the time derivative of p. Take the
derivative of both sides of 3.10.

x d  x 
p  p  p   (3.12)
q dt  q 

• To simplify the second term we interchange the order of differentiation.

d  x  x
   (3.13)
dt  q  q
• Proof:
• We digress to show 3.13 x = x (q,t)

d  x    x    x 
    q    (3.14)
dt  q  q  q  t  q 

• In Lagrangian formalism q and q independent variables in the sense that


are

q
0
q
x x
• Differentiating 3.5 x  q 
q t
x   x    x 
  q   
q q  q  q  t 
(3.15)

• Since the right-hand sides of 3.14 and 3.15 are identical, then 3.13 follows.
d  x    x    x 
    q    (3.14)
dt  q  q  q  t  q 
d  x  x
   (3.13)
dt  q  q
d  x  x
   (3.13)
dt  q  q
• Multiple 3.13 times p and replace p on right-hand side with 3.6.
dK d ( 12 mx 2 )
p  (3.6)
dx dx

d  x  dK x K
p     (3.16)
dt  q  dx q q
p  F ( x, x , t ) (3.11)

d  x  dK x K
p     (3.16)
dt  q  dx q q
Substitute 3.11 and 3.16 into 3.12
x d  x 
p  p  p   (3.12)
q dt  q 
x K
p  F  (3.17)
q q
x K
p  F  (3.17)
q q
The first term on the right-hand side is called the general force

x
Q(q, q , t )  F (3.18)
q
Then the equation of motion

K
p  Q  (3.19)
q
The last term in this equation represents a “fictitious” force which appears
x x
whenever the coefficients in 3.5 vary with q. x  q 
q t
If the force F is separated into a part

dV ( x)

dx

and a part that is not, then the general force can be separated into
corresponding parts.

dV ( x) x x dV (q )
Q  F   Q
dx q q dq (3.20)
K
3.20 into 3.19 p  Q 
q
dV ( x) x x dV (q )
Q  F   Q
dx q q dq

L
Where p   Q (3.21)

q

L(q, q , t )  K (q, q , t )  V (q )
(3.22)

This is the Lagrangian function.


L(q, q , t )  K (q, q , t )  V (q )
K K L
• Since p (t )  (q, q , t ) p  (3.23)

q q q

• V (q )
follows from 3.7 and
0
q

L
p   Q
q
Then 3.21 can be written

d  L  L
    Q (3.24)
dt  q  q

The general force for Q’ must include all forces F’ on the particle
which are not included in the potential energy.
1. Elementary application of Lagrangian techniques
Determine the r and q equations of motion for a particle moving in a
plane under the influence of a central potential energy V(r).
Solution:
As general coordinates we take
q1  r , q2   (3.33)

x  r cos 
(3.34)
y  r sin 
K  12 m( x 2  y 2 ) (3.35)
• Easy to express in polar coordinates by taking time derivatives.

x  r cos   r sin 


(3.36)
y  r sin   r cos 

K  12 m(r 2  r 2 2 ) (3.37)

• Note that K is not a function of q .


2

K  12 m(vr2  v2 )
L  K  V  12 m(r 2  r 2 2 )  V (r ) (3.38)

d  L  L
• The Lagrangian is (also see (3.32))   
dt  r  r (3.39)
d  L  L
 
dt    
d V V
 mr   mr 
 2
or mr  mr  
 2

dt r r (3.40)
d d
dt
 
mr   0 or
2 

dt
 
mr 2  r (mr  2mr )  0
• The previous were obtained from direct application of Newton’s laws with
V
Fr   and F  0
r

• Since L does not depend on q ,


 
p j  L  Qj or p   L0 (3.27)
q j 
• hence the general momentum is constant,
L
p   mr 
2 
 constant (3.41)

• This conservation law is an example of a general principle that can be deduced
from the Lagrange equation. If a general coordinate q j does not appear in the
Lagrangian and Qj  0
• The corresponding general momentum is constant in time. It is a constant of
the motion (a conserved quantity).
L
pj 
q j
LAGRANGIAN
TUGAS 1 NO 3
2.Constraints_Ex:the simple pendulum

• The tension will be the constraint force.

• Note that the number of unknown components of constraint force must


be the same as the number of constraints on the motion, otherwise the
motion will be over- or under-determined. (This refers to more equations
or less equations than the number of unknowns.)
F  m(l  2l )   mg sin 
or
g
  sin   0

l
  02 sin   0
Small angle approximation

  02  0 2


  a cos(0t   ) 2 l
  2
 g
Fr  m(l  l 2 )  mg cos   T

d d  2 
     
d d  2 

  2  g 
 d  2    l 0 sin  d
T  mg cos  ml 2
2g T  3mg cos   2mg cos 0
 
2
(cos  cos 0 )
l
Now using Lagrangian Method
Lagrangian in polar coordinates, with r = l
1
L  m(r 2  r 2 2 )  mgr cos   V constraint (r )
2

V (r , )  mgr cos 
is the gravitational potential energy

V constraint (r )
the potential energy that will
enforce the constraint, r  l
Radial Lagrangian equation

d  L  L
   0
dt  r  r

Remember
1
L  m(r 2  r 2 2 )  mgr cos   V constraint (r )
2

constraint
dV (r )
mr  mr  mg cos 
 2
0
dr
constraint
dV (r )
mr  mr  mg cos  
 2
0
dr
constraint
dV (r )
constraint
Qr   mr 2  mg cos 
dr

The constraint force is the


negative of the tension.

T  mg cos   ml 2
T  3mg cos   2mg cos  0
Angular Lagrangian equation

d  L  L
   0
dt    

Remember
1
L  m(r 2  r 2 2 )  mgr cos   V constraint (r )
2

mr   mgr sin   0


2

g
  sin   0

r
• The result of the above exercise is that:
• 1. We can impose constraints directly in the Lagrangian and determine the
correct equations of motion without ever explicitly referring to the constraint
forces.
• 2. If we wish to find the force required to enforce a constraint, we choose an
additional general coordinate (in this case r) so that when it is held to a
particular constant (r = l here) the constraint is maintained. The constraint
force then follows as in (3.46).
Lagrangian
dengan
pengali
Lagrange
Tugas 2 No 1
Hamiltonian Dynamics*

• If the potential energy of a system is velocity independent, then the linear


momentum components in rectangular coordinates are given by

L
pi 
x i

L
• In general coordinates pj 
q j
• The Hamiltonian may be written as
H =  p j q j  L

The Lagrangian is considered to be a function of the generalized coordinates,


the generalized velocities, and possibly the time.
The dependence of L on the time may arise either if the constraints are time
dependent or if the transformation equations connecting the rectangular and
generalized coordinates explicitly contain the time.

H (qk , pk , t )=  p j q j  L(q k ,q k ,t)

(qk , pk , t ) set
• H is the total energy if the following conditions are met.
• The equations of the transformation connecting the rectangular and
generalized coordinates must be independent of the time.
• The potential energy must be velocity independent.
H =  p j q j  L

H H
• The equations of motion are q k =  p k =
pk qk
HAMILTONIAN

• Penyelesaian Problem dengan Hamiltonian:


• 1. Tentukan koordinat sistem dan fungsi Lagrange
• 2. Tentukan momentum sistem
• 3. Tentukan Hamiltonian
• 4. Tentukan persamaan Hamiltonian
CONTOH 1
CONTOH 2
EXAMPLE 3
• Using the Hamiltonian method, find the equations of motion for a spherical
pendulum of mass m and length b.
• The generalized coordinates are q and f.
q b
T= 1
2 mb 2 2 + 12 mb 2sin 2 2
f
V=-mgbcos
L L
• The generalized momenta are then p    mb 2 p   mb 2 sin 2 
 
L p
p   mb  or  
2  
 mb 2
L p
p    mb sin  or  
2 2  
 mb 2 sin 2  q b

2
p p
2

T= 1
mb  + 2 mb sin  
2 2 1 2 2 2
  f
2mb 2 sin 2 
2 2
2mb
V=-mgbcos
p 2
p2
H 
 mgb cos 
2mb 2mb sin 
2 2 2
H H
qk =  p k =
pk qk
H p

 
p mb 2
b
q
H p 
• The equations of motion are 
 
p mb 2 sin 2  f

H p p p2 2

  H   
 mgb cos
p mb 2 sin 2  2mb 2mb sin 
2 2 2
H H
qk =  p k =
• The equations of motion are pk qk

H p cos 
p      mgb sin 
 mb sin 
2 3
q b

H
p    0 f

p 2
p2
H  
 mgb cos
2mb 2mb sin 
2 2 2

• Because f is cyclic, the momentum


about the symmetry axis is constant.

You might also like