lagrangian and hamiltonian dynamics
DESCRIPTION
Lagrangian and HamiltonianTRANSCRIPT
Lagrangian and Hamiltonian Dynamics
Chapter 7
Claude Pruneau
Physics and Astronomy
Minimal Principles in Physics
• Hero of Alexandria 2nd century BC.– Law governing light reflection minimizes
the path length.
• Fermat’s Principle– Refraction can be understood as the path
that minimizes the time - and Snell’s law.
• Maupertui’s (1747)– Principle of least action.
• Hamilton (1834, 1835)
Hamilton’s Principle
Of all possible paths along which a dynamical system may move from one point to another within a specified time interval (consistent with any constraints), the actual path followed is that which minimizes the time integral of the difference between the kinetic and potential energy.
Hamilton’s Principle
• In terms of calculus of variations: δ T −U( )dtt1
t2
∫ = 0
• The δ is a shorthand notation which represents a variation as discussed in Chap 6.
• The kinetic energy of a particle in fixed, rectangular coordinates is of function of 1st order time derivatives of the position
T =T(&xi )• The potential energy may in general be a function of both
positions and velocities. However if the particle moves in a conservative force field, it is a function of the xi only.
U =U(xi )
Hamilton’s Principle (cont’d)
• Define the difference of T and U as the Lagrange function or Lagrangian of the particle.
L =T −U =L(xi , &xi )• The minimization principle (Hamilton’s) may thus be
written:
δ L(xi , &xi )dtt1
t2
∫ = 0
Derivation of Euler-Lagrange Equations
• Establish by transformation…
δ L(xi , &xi )dtt1
t2
∫ = 0δ f {y, y '; x}dx = 0x1
x2
∫
x→ tyi (x)→ xi (t)yi '(x)→ &xi (t)
f{yi (x),yi '(x);x} → L(xi (t), &xi (t))
∂f∂yi
−d
dx
∂f
∂yi '= 0
∂L∂xi
−d
dt
∂L
∂&xi= 0, i = 1,2, 3
Lagrange Equations of Motion
• L is called Lagrange function or Lagrangian for the particle.
• L is a function of xi and dxi/dt but not t explicitly (at this point…)
∂L∂xi
−d
dt
∂L
∂&xi= 0, i = 1,2, 3
Example 1: Harmonic Oscillator
Problem: Obtain the Lagrange Equation of motion for the one-dimensional harmonic oscillator.
Solution:• Write the usual expression for T and U to determine L.
L =T −U = 12 m&x2 −1
2 kx2
• Calculate derivatives.∂L∂x
= −kx
∂L∂&x
= m&x
d
dt
∂L∂&x
=m&&x
Example 1: Harmonic Oscillator (cont’d)
• Combine in Lagrange Eq.
∂L∂xi
−d
dt
∂L
∂&xi= 0, i = 1,2, 3
m&&x + kx=0
Example 2: Plane Pendulum
Problem: Obtain the Lagrange Equation of motion for the plane pendulum of mass “m”.
Solution:• Write the expressions for T and U to determine L.
T = 12 m(&x2 + &y2 ) = 1
2 Iϖ 2 = 12 ml2 & 2
U =mgl(1−cos)
L =T −U = 12 ml2 & 2 −mgl(1−cos)
l
Example 2: Plane Pendulum (cont’d)
• Calculate derivatives of L by treating as if it were a rectangular coordinate.
∂L∂θ
=∂
∂θ12 ml
2 &θ 2 − mgl(1 − cosθ )⎡⎣ ⎤⎦= −mgl sinθ
∂L∂ &θ
=∂
∂ &θ12 ml
2 &θ 2 − mgl(1 − cosθ )⎡⎣ ⎤⎦= ml2 &θ
d
dt
∂L∂&
=ml2&&
• Combine... −mgl sinθ − ml2 &&θ = 0
&& +g
lsinθ = 0
Remarks
• Example 2 was solved by assuming that could be treated as a rectangular coordinate and we obtain the same result as one obtains through Newton’s equations.
• The problem was solved by involving kinetic energy, and potential energy. We did not use the concept of force explicitly.
Generalized Coordinates• Seek generalization of coordinates.• Consider mechanical systems consisting of a
collection of n discrete point particles. • Rigid bodies will be discussed later…• We need n position vectors, I.e. 3n quantities.• If there are m constraint equations that limit the
motion of particle by for instance relating some of coordinates, then the number of independent coordinates is limited to 3n-m.
• One then describes the system as having 3n-m degrees of freedom.
Generalized Coordinates (cont’d)
• Important note: if s=3n-m coordinates are required to describe a system, it is NOT necessary these s coordinates be rectangular or curvilinear coordinates.
• One can choose any combination of independent parameters as long as they completely specify the system.
• Note further that these coordinates (parameters) need not even have the dimension of length (e.g. in our previous example).
• We use the term generalized coordinates to describe any set of coordinates that completely specify the state of a system.
• Generalized coordinates will be noted: q1, q2, …, qn.
Generalized Coordinates (cont’d)
• A set of generalized coordinates whose number equals the number s of degrees of freedom of the system, and not restricted by the constraints is called a proper set of generalized coordinates.
• In some cases, it may be useful/convenient to use generalized coordinates whose number exceeds the number of degrees of freedom, and to explicitly use constraints through Lagrange multipliers.– Useful e.g. if one wishes to calculate forces due to constraints.
• The choice of a set of generalized coordinates is obviously not unique.– They are in general (infinitely) many possibilities.
• In addition to generalized coordinates, we shall also consider time derivatives of the generalized coordinates called generalized velocities.
Generalized Coordinates (cont’d)
q1,q2 ,L ,qs or {qi} i =1,...,s&q1, &q2 ,L , &qs or { &qi} i =1,...,s
Notation:
Transformation • Transformation: The “normal” coordinates can be
expressed as functions of the generalized coordinates - and vice-versa.
xα,i =xα,i (q1,q2 ,L ,qs,t), α=1,2,...,ni =1,2,3
⎧⎨⎩
=xα,i (qj ,t), j =1,2,...,s
Transformation (cont’d)
• Rectangular components of the velocties depend on the generalized coordinates, the generalized velocities, and the time.
&xα,i =&xα,i (qj ,&qj ,t)
• Inverse transformations are noted:
q j =qj (xα,i ,t)
&qj =&qj (xα,i , &xα,i ,t)
• There are m=3n-s equations of constraint…
fk (xα,i ,t) =0, k=1,2,...,m
Example: Generalized coordinates
• Question: 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: Motion on a spherical surface implies:
x2 + y2 + z2 −R2 =0, z≥0
• Choose cosines as generalized coordinates.
q1 =xR, q2 =
yR, q3 =
zR
q1
2 +q2
2 +q3
2 =1
Example: Generalized coordinates (cont’d)
• q1, q2, q3 do not constitute a proper set of generalized of coordinates because they are not independent.
• One may however choose e.g. q1, q2, and the constraint equation
x2 + y2 + z2 =R2
Lagrange Eqs in Gen’d Coordinates
• Of all possible paths along which a dynamical system may move from one point to another in configuration space within a specified time interval, the actual path followed is that which minimizes the time integral of the Lagrangian for the system.
Remarks• Lagrangian defined as the difference between kinetic and
potential energies. • Energy is a scalar quantity (at least in Galilean relativity). • Lagrangian is a scalar function.• Implies the lagrangian must be invariant with respect to
coordinate transformations.• Certain transformations that change the Lagrangian but leave
the Eqs of motion unchanged are allowed.• E.G. if L is replaced by L+d/dt f(qi,t), for a function with
continuous 2nd partial derivatives. (Fixed end points) • The choice of reference for U is also irrelevant, one can add a
constant to L.
Lagrange’s Eqs• The choice of specific coordinates is therefore immaterial
L =T(&xα,i )−U(xα,i )
=T(qj , &qj ,t)−U(qj ,t)
=L(qj , &qj ,t)
• Hamilton’s principle becomes
δ L(q j , &q j , t)
1
2
∫ = 0
x→ tyi (x)→ qi (t)yi '(x)→ &qi (t)
f{yi (x),yi '(x);x} → L(qi (t), &qii (t))
∂L∂qi
−d
dt
∂L
∂ &qi= 0, i = 1,2,..., s
Lagrange’s Eqs
“s” equations“m” constraint equations
Applicability:1. Force derivable from one/many potential2. Constraint Eqs connect coordinates, may be fct(t)
Lagrange Eqs (cont’d)
• Holonomic constraints
fk (xα,i ,t) =0, k=1,2,...,m• Scleronomic constraints
– Independent of time
• Rheonomic– Dependent on time
Example: Projectile in 2D• Question: Consider the motion of a projectile under
gravity in two dimensions. Find equations of motion in Cartesian and polar coordinates.
• Solution in Cartesian coordinates:
T =12
mv2
U =mgywith U =0 at y=0.
L =T −U =12
mv2 −mgy
∂L∂x
−d
dt
∂L
∂&x= 0
0 −d
dtm&x = 0
&&x = 0
∂L∂y
−d
dt
∂L
∂&y= 0
−mg −d
dtm&y = 0
&&y = −g
Example: Projectile in 2D (cont’d)
• In polar coordinates…
T =12
m &r2 + r2 & 2( )
U =mgrsinwith U =0 at =0.
∂L∂r
−d
dt
∂L
∂&r= 0
mr&θ 2 − mgsinθ −d
dtm&r( ) = 0
r&θ 2 − gsinθ − &&r = 0
L =T −U =
12
m &r2 + r2 & 2( )−mgrsin
∂L∂θ
−d
dt
∂L
∂ &θ= 0
−mgr cosθ −d
dtmr2 &θ( ) = 0
−gr cosθ − 2r&r&θ − r2 &&θ = 0
Example: Motion in a cone• Question: A particle of mass “m” is constrained to move on the
inside surface of a smooth cone of hal-angle a. The particle is subject to a gravitational force. Determine a set of generalized coordinates and determine the constraints. Find Lagrange’s Eqs of motion.
z
x
yα
rr
Solution:
Constraint: z−rcotα =0
2 degrees of freedom only!2 generalized coordinates.
Example: Motion in a cone (cont’d)
• Choose to eliminate “z”.
v2 =&r2 + r2 & 2 + &z2
=&r2 + r2 & 2 + &r2 cot2α=&r2 csc2α + r2 & 2
U =mgz=mgrcotα
L =T −U =
12
mv2 =12
m &r2 csc2α + r2 & 2( )−mgrcotα
L is independent of .
∂L∂θ
= 0 =d
dt
∂L
∂ &θ
∂L∂ &θ
= constant=mr2 &θ
mr2 & =mr2ϖ is the angular momentum relative to the axis of the cone.
z =rcotα
Example: Motion in a cone (cont’d)
• For r:
∂L∂r
−d
dt
∂L
∂&r= 0
&&r −r& 2 sin2α + gsinα cosα =0
Lagrange’s Eqs with underdetermined multipliers
• Constraints that can be expressed as algebraic equations among the coordinates are holonomic constraints.
• If a system is subject to such equations, one can always find a set of generalized coordinates in terms of which Eqs of motion are independent of these constraints.
• Constraints which depend on the velocities have the form
f xα ,i , &xα ,i ,t( ) =0
Non holonomic constraints unless eqs can be integrated to yield constrains among the coordinates.
• Consider
Ai &xi
i∑ + B=0 i =1,2,3
• Generally non-integrable, unless
Ai =∂f∂xi
, Bi =∂f∂t
=0, f = f(xi ,t)
• One thus has:
∂f∂xi
&xi +∂f
∂ti∑ = 0
• Or… df
dt=0
• Which yields… f (xi ,t)−constant=0
• So the constraints are actually holonomic…
Constraints…
• We therefore conclude that if constraints can be expressed ∂fk
∂qidqi +
∂f
∂tdt
i∑ = 0
• Constraints Eqs given in differential form can be integrated in Lagrange Eqs using undetermined multipliers.
• For:
∂fk∂qidqi
i∑ = 0
• One gets:
∂L∂q j
−d
dt
∂L
∂ &q j+ λ k (t)
∂fk∂q jk
∑ = 0
Forces of Constraint
• The underdetermined multipliers are the forces of constraint:
Q j = λk
∂fk∂qjk
∑
Example: Disk rolling incline plane
Example: Motion on a sphere
7.6 Equivalence of Lagrange’s and Newton’s Equations
• Lagrange and Newton formulations of mechanic are equivalent
• Different view point, same eqs of motion.• Explicit demonstration…
∂L∂xi
−d
dt
∂L
∂&xi= 0, i=1,2,3
∂ T −U( )
∂xi−d
dt
∂ T −U( )
∂&xi= 0, i=1,2,3
∂T∂xi
= 0 and ∂U
∂&xi= 0, i=1,2,3
−∂U∂xi
=d
dt
∂T
∂&xi, i=1,2,3
−∂U∂xi
= Fi , i=1,2,3
d
dt
∂T∂&xi
=ddt
∂∂&xi
12 m&xj
2
j=1
3
∑⎛
⎝⎜⎞
⎠⎟=
ddt
m&xi( ) = &pi
Fi =&pi , i=1,2,3
xi =xi (qi ,t)
&xi =
∂xi
∂qj
&qj +∂xi
∂tj∑
∂&xi∂ &q j
=∂xi∂q j
Generalized momentum p j =
∂T∂&qj
Generalized force defined through virtual work δW
δW = Fiδ xii
∑
δW = Fi∂xi∂q jδq j
i, j∑
δW = Q jδq jj
∑
Q j = Fi
∂xi
∂qji∑
For a conservative system: Q j =−∂U∂qj
p j =
∂T∂&qj
=∂∂&qj
12 m&xi
2
i∑⎛⎝⎜
⎞⎠⎟
p j = m&xi
∂&xi
∂&qji∑
remember
∂&xi
∂&qj
=∂xi
∂qj
p j = m&xi
∂xi
∂qji∑
&p j = m&&xi
∂xi
∂qj
+ m&xi
ddt
∂xi
∂qj
⎛
⎝⎜
⎞
⎠⎟
i∑
d
dt
∂xi
∂qj
=∂2xi
∂qk∂qj
&qk +∂2xi
∂qj∂tk∑
&p j = m&&xi
∂xi
∂qji∑ + m&xi
∂2xi
∂qk∂qj
&qki,k∑ + m&xi
∂2xi
∂qj∂ti∑
Q j
∂T∂q j
= m&xi∂&xi∂q ji
∑
&p j =Qj +
∂T∂qj
p j =
∂T∂&qj
d
dt
∂T∂&qj
⎛
⎝⎜
⎞
⎠⎟−
∂T∂qj
=Qj =−∂U∂qj
d
dt
∂T∂&qj
⎛
⎝⎜
⎞
⎠⎟−
∂T∂qj
=Qj =−∂U∂qj
Because U does not depend on &q j , one has
d
dt
∂ T −U( )∂&qj
⎛
⎝⎜
⎞
⎠⎟−
∂ T −U( )∂qj
=0
And with L =T -U,
ddt
∂L∂&qj
⎛
⎝⎜
⎞
⎠⎟−
∂L∂qj
=0
7.10 Canonical Equations of Motion – Hamilton Dynamics
Whenever the potential energy is velocity independent:
jj x
Lp
&∂∂
=
Result extended to define the Generalized Momenta:
jj q
Lp
&∂∂
=
Given Euler-Lagrange Eqs: 0=∂∂
−∂∂
jj qL
dtd
qL
&
One also finds:j
j q
Lp
∂∂
=&
The Hamiltonian may then be considered a function of the generalized coordinates, qj, and momenta pj:
∑ −=j
jj LqpH &
jp&
),,(),,( tqqLqptpqH kkj
jjkk &&∑ −=
… whereas the Lagrangian is considered a function of the generalized coordinates, qj, and their time derivative.
To “convert” from the Lagrange formulation to the Hamiltonian formulation, we consider:
∑ ∂∂
+⎟⎟⎠
⎞⎜⎜⎝
⎛
∂∂
+∂∂
=j
kk
kk
dtt
Hdp
p
Hdq
q
HdH
But given: ∑ −=j
jj LqpH &
One can also write:( )
dtt
Lqd
q
Ldq
q
Ldpqqdp
dLdpqqdpdH
jk
kk
kkkkk
jkkkk
∂
∂−⎟⎟⎠
⎞⎜⎜⎝
⎛
∂
∂−
∂
∂−+=
−+=
∑
∑
&&
&&
&&
kp& kp−
dH = &qkdpk −&pkdqk( )
j∑ −
∂L∂t
dt
That must also equal:
∑ ∂∂
+⎟⎟⎠
⎞⎜⎜⎝
⎛
∂∂
+∂∂
=j
kk
kk
dtt
Hdp
p
Hdq
q
HdH
We then conclude:
t
L
t
H
pq
H
qp
H
kk
kk
∂∂
−=∂∂
−=∂∂
=∂∂
&
&
Hamilton Equations
Let’s now rewrite:
∑ ∂∂
+⎟⎟⎠
⎞⎜⎜⎝
⎛
∂∂
+∂∂
=j
kk
kk
dtt
Hdp
p
Hdq
q
HdH
kp&− kq&
And calculate:
( )∑ ∂∂
++−=j
kkkk t
Hpqqp
dt
dH &&&&
0=
Finally conclude:t
H
dt
dH
∂∂
=
If : 0=∂∂
tH H is a constant of motion
If, additionally, H=U+T=E, then E is a conserved quantity.:
Some remarks
• The Hamiltonian formulation requires, in general, more work than the Lagrange formulation to derive the equations of motion.
• The Hamiltonian formulation simplifies the solution of problems whenever cyclic variables are encountered.
•Cyclic variables are generalized coordinates that do not appear explicitly in the Hamiltonian.
• The Hamiltonian formulation forms the basis to powerful extensions of classical mechanics to other fields e.g. Beam physics, statistical mechanics, etc.
• The generalized coordinates and momenta are said to be canonically conjugates – because of the symmetric nature of Hamilton’s equations.
More remarks
• If qk is cyclic, I.e. does not appear in the Hamiltonian, then
• And pk is then a constant of motion.
• A coordinate cyclic in H is also cyclic in L.• Note: if qk is cyclic, its time derivative “q-dot” appears explicitly
in L.•No reduction of the number of degrees of freedom in the Lagrange formulation: still “s” 2nd order equations of motion.•Reduction by 2 of the number of equations to be solved in the Hamiltonian formulation – since 2 become trivial…
0=∂∂
=∂∂
=kk
k qH
qL
p&
kkp α=
kk
kH
q ϖα
=∂∂
=& where k is possibly a function of t.
One thus get the simple (trivial) solution:
∫= dttq kk ϖ)(
The solution for a cyclic variable is thus reduced to a simple integral as above.
The simplest solution to a system would occur if one could choose the generalized coordinates in a way they are ALL cyclic. One would then have “s” equations of the form :
Such a choice is possible by applying appropriate transformations – this is known as Hamilton-Jacobi Theory.
∫= dttq kk ϖ)(
Some remarks on the calculus of variation
Hamilton’s Principle: 0),,(2
1
=∫t
tkk dttqqL &δ
Evaluated: 02
1
=⎟⎟⎠
⎞⎜⎜⎝
⎛
∂∂
+∂∂
∫t
tk
kk
kdtq
qL
qqL &
&δδ
kk
k qdt
d
dt
dqq δδδ =⎟
⎠
⎞⎜⎝
⎛=&
Where δqk and are not independent!kq&δ
The above integral becomes after integration by parts:
02
1
=⎟⎟⎠
⎞⎜⎜⎝
⎛
∂∂
−∂∂
∫t
tk
kkdtq
qL
dtd
qL δ
&
Which gives rise to Euler-Lagrange equations:
0=∂∂
−∂∂
kk qL
dtd
qL
&
Alternatively, Hamilton’s Principle can be written:
02
1
=⎟⎟⎠
⎞⎜⎜⎝
⎛−∫∑
t
t kkk dtHqp &δ
Which evaluates to:
02
1
=⎟⎟⎠
⎞⎜⎜⎝
⎛
∂∂
−∂∂
−+∫∑ dtppH
qqH
pqqpj
kk
kk
kkkk δδδδ &&
Consider: ∫∑∫∑ =2
1
2
1 jkk
jkk q
dt
dpdtqp δδ&
Integrate by parts: ∫∑∫∑ −=2
1
2
1 jkk
jkk dtqpdtqp δδ &&
The variation may then be written:
02
1
=⎪⎭
⎪⎬⎫
⎪⎩
⎪⎨⎧
⎟⎟⎠
⎞⎜⎜⎝
⎛
∂∂
+−⎟⎟⎠
⎞⎜⎜⎝
⎛
∂∂
−∫∑k
kk
kkk
k dtqqH
pppH
q δδ &&
02
1
=⎪⎭
⎪⎬⎫
⎪⎩
⎪⎨⎧
⎟⎟⎠
⎞⎜⎜⎝
⎛
∂∂
+−⎟⎟⎠
⎞⎜⎜⎝
⎛
∂∂
−∫∑k
kk
kkk
k dtqqH
pppH
q δδ &&
kk
kk
pq
H
qp
H
&
&
−=∂∂
=∂∂
Hamilton Equations