Download as pdf or txt
Download as pdf or txt
You are on page 1of 49

5.

LAGRANGIAN MECHANICS
Introduction
The vector methods based on the vectorial
equation F  ma lack in efficiency when a
mechanical system is described by systems of
coordinates much more general than the
standard curvilinear (Cartesian) ones.

An example is the problem of the simple


pendulum which is best analyzed in terms of the
swing angle θ which is not a Cartesian
coordinate.

PH 222 (DUCE) 1
Introduction …
Another example is the Kepler’s problem, which is
best analyzed in terms of the polar coordinates (r, φ).

However, such cases are treated easily by


Lagrangian mechanics.

Lagrangian method also frees us from the task of


keeping track of the components of force vectors and
the identities of the particles they act on.

The whole of mechanics is reduced to an algebraic


method.

PH 222 (DUCE) 2
Lagrange’s Equation
Hamilton’s Principle
‘The path followed by a mechanical system during
some time interval is the path that makes the integral of
the difference between the kinetic and the potential
energy stationary.’
t2

A   Ldt
t1

• L  T V is the Lagrangian of the system.


•T and V are respectively the kinetic and potential
energy of the system.
•The integral, A, is called the Action of the system.

PH 222 (DUCE) 3
Lagrange’s Equation …
Principle of Least Action
Hamilton’s Principle is also called the “Principle
of Least Action” since the paths taken by
components in a mechanical system are those that
make the Action stationary.
t2

A   Ldt Action
t1
The application of Hamilton’s Principle requires
that we be able to find the stationary value of a
definite integral.

PH 222 (DUCE) 4
Lagrange’s Equation …
Specific Definite Integral
The specific definite integral of which we want to
find the stationary value is the Action from
Hamilton’s Principle. It can be written in functional
form as t2
A  L  qi , qi , t  dt

n
L   T qi t   V qi t 
i 1
t1
qi are the generalized coordinates used to define the
position and orientation of each component in the
system.
The actual path the system follows is the one that makes the
definite integral stationary i.e one with min. or max. action

PH 222 (DUCE) 5
Lagrange’s Equation …
Derivation of Euler-Lagrange Equation
The stationary value of an integral is found by setting
its variation equal to zero.
A0
 L L  
t2 t2 t2

A    Ldt   Ldt     i  i dt  0


t1 t1 t1 
qi qi 
where
 L  qi , qi , t   L  qi  i , qi  i , t   L  qi , qi , t 
 L L 
 i  i 
 qi qi 
PH 222 (DUCE) 6
Lagrange’s Equation …
Derivation of Euler-Lagrange Equation
For an arbitrary value of  ,
 L L  
t2

t  qi i  qi i dt  0 d uv   udv  vdu


1 udv  d uv   vdu
The second integral is integrated by parts. L
u
 L L  
t2
qi
t  qi i  qi i dt  0 v 
1

t2
L   L   d  L 
t2 t2

t qi i dt   qi i   t dt  qi i dt



1 t1 1

ϕ is equal to zero at t1 and t2.


PH 222 (DUCE) 7
Lagrange’s Equation …
t2
 L d  L 
 t  qi  dt  qi  i dt  0

1 

The only way that this definite integral can be zero for
arbitrary values of i is for the partial differential equation in
parentheses to be zero at all values of x in the interval t1 to t2.

L d  L 
   0
qi dt  qi 

Lagrange’s equations
d  L  L
   0 also
dt  qi  qi
Euler-Lagrange’s equations
PH 222 (DUCE) 8
Lagrange’s Equation …

NOTE : Solving these equations

d  L  L
   0
dt  qi  qi
n
where L   T qi t   V qi t 
i 1
t2

makes the integral A   Lqi , qi , t 


t1
stationary

PH 222 (DUCE) 9
Lagrange’s Equation …
1 2
NOTE : Plugging L  mx  V ( x )
2

d  L  L
in    0
dt  qi  qi

V d x 2
gives  m 2 0
x dt

PH 222 (DUCE) 10
Lagrangian Mechanics Recipe
The entire content of Lagrangian mechanics is
summarized in the following simple recipe:
i. Figure out how many degrees of freedom a
mechanical system has
ii. Choose the ‘generalized coordinate qi ’ to describe
the degrees of freedom. These coordinates are
completely arbitrary and need not be the original
Cartesian coordinates associated with an inertial
frame. The index i = 1, 2, … labels each one of
the generalized coordinates. There is one
coordinate for each degree of freedom.
PH 222 (DUCE) 11
Recipe …

iii. Calculate the system’s total kinetic energy T in


terms of those coordinates
iv. Write down the potential energy V in terms of
those generalized coordinates
v. Write down the Lagrangian function of the
system which is denoted by L(q , q ) where qi  dqi dt
i i

are the generalized velocities.


vi. Take a bunch of derivatives

PH 222 (DUCE) 12
Recipe …
vii. Plug those derivatives into the Euler-Lagrange’s
equations;

d L L
  0 (1)
dt  qi   qi 

This returns an equation of motion for each


generalized coordinate qi (t ) . There is one Euler-
Lagrange’s equation for each generalized
coordinate.

PH 222 (DUCE) 13
Examples
1. Simple Harmonic Oscillator: Consider a one-
dimensional simple harmonic oscillator. We wish
to find the position x of the oscillator at any time t.
•We begin by writing the usual expression for the kinetic
energy T: T  1 mv 2
2
The potential energy U of a simple harmonic oscillator
is given by 1
V  kx 2
2
The Lagrangian in this case is then
1 2 1 2
L( x, v)  T  V  mv  kx
2 2
PH 222 (DUCE) 14
Examples …
Euler-Lagrange’s equations in one dimension are
d L L
  0
dt  qi   qi 
Substituting for L, we find
d    1 2 1 2    1 2 1 2 
  mv  kx     mv  kx   0
dt  v  2 2   x  2 2 
Evaluating the partial derivatives, we get
d
 mv   kx  0 or, since v  dx dt
dt
2
d x
m 2  kx  0
dt
PH 222 (DUCE) 15
Examples …
which is a second order ordinary differential equation
that one can solve for x(t).

Note that the left is ma=F, so this equation is


equivalent to F=-kx (Hooke’s Law). The solution to
the differential equation turns out to be

x(t )  A cos(wt   )
where A is the amplitude of the motion   k m is the
angular frequency of the oscillator, and δ is a phase
constant that depends on where the oscillator is at t  0

PH 222 (DUCE) 16
Examples …
2. The simple pendulum. Let’s solve the problem of
the simple pendulum (of mass m and length l) by
first using the Cartesian coordinates to express the
Lagrangian, and then transform into a system of
cylindrical coordinates.
In Cartesian coordinates (q1 = x,
q2 = y) the kinetic and potential
energies, and the Lagrangian are;
1 2 1 2
T  mx  my
2 2
V  mgy
PH 222 (DUCE) 17
Examples …
The Lagrangian is then
1 1
T  V  mx  my 2  mgy
2

2 2
We can now transform the coordinates with the
following relations
x  sin( ) x   cos( )
y   cos( ) y   sin( )
1
 
L  m 2 2 cos 2 ( )  2 2 sin 2 ( )  mgl cos( )
2
1 2 2
 m   mgl cos( )
2
PH 222 (DUCE) 18
Examples …
We can now see that there is only one generalized
coordinate for this problem, i.e., the angle θ. We
can use equation to find the equation of motion
L
 ml 2

d  L  d
  
dt    dt
 ml 2
 ml 2

L
  mgl sin( )

and finally,
g
  sin( )  0
l

PH 222 (DUCE) 19
Examples …

3. Attwood’s machine: A uniform circular pulley of mass


2m can rotate freely about its axis of symmetry which
is fixed in a horizontal position. Two masses m and 3m
are connected by a light inextensible string which
passes over the pulley without slipping. The whole
system undergoes planar motion with the masses
moving vertically. Take the rotation angle of the pulley
as generalized coordinate and obtain the Langrange’s
equation for the motion. Deduce the upward
acceleration of the mass m.

PH 222 (DUCE) 20
Examples …
Solution
Let θ be the rotational angle of
the pulley measured from some
reference configuration. Then the
velocity diagram is shown in Fig.
3. The kinetic energy of the Fig. 3: The velocity diagram for
the single Attwood machine
system is
11 2 2
1
  1
T  m a   3m  a     2m  a  
2 2

2 2 22 
5 2 2
 ma 
2
PH 222 (DUCE) 21
Examples …
The potential energy relative to the reference
configuration is
V  mg  a    3m  g  a 
 2mga .
The Euler- Lagrange’s equation for the system is
d
dt
 
5ma   0  2mga
2

2
That is, a  g
5
The upward acceleration of the mass
m is therefore 2 g.
5
PH 222 (DUCE) 22
Examples …
4. The sliding bead. A bead slides along a smooth wire
that has the shape of a parabola z  cr 2 (Fig. 4). At
equilibrium, 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:
We choose the cylindrical
coordinates r, θ and z as
generalized coordinates.
•The kinetic energy is

Fig. 4: A bead slides along a smooth wire


that rotates about the z-axis.
1

T  m r 2  r 2 2  z 2
2
PH 222 (DUCE) 23
Examples …
•The potential energy is
V  mgz
We have in this case some equations of
constraints that we must take into account,
z  cr 2
 z  2crr
and   t   
We can then calculate the Lagrangian for the problem
L  T V
1
 
 m r 2  4c 2 r 2 r 2  r 2 2  mgcr 2
2
PH 222 (DUCE) 24
Examples …
NB: The inclusion of the equations of constraints in
the Lagrangian has reduced the number of degrees of
freedom to only one, i.e. r.
We now calculate the equation of motion using Euler-
Lagrange’s equation
L
 m  4c 2 rr 2  r 2  2 gcr 
r
d L
dt r

 m r  4c 2 r 2 r  8c 2 rr 2 
and therefore,
    
r 1  4c 2 r 2  r 2 4c 2 r  r 2 gc   2  0  (^)
PH 222 (DUCE) 25
Examples …
When the bead is in equilibrium, we have r=R,
and r  r  0 , and equation (^) reduces to

 
R 2 gc   2  0
2
or c
2g

PH 222 (DUCE) 26
Lagrangian Formulation of
Non-Inertial Motion
We can recover the equation
ar  a f  A    (  r )  2  vr    r
for the acceleration in a rotating (non-inertial) frame
from a Lagrangian formulation as follows. The
Lagrangian for a particle of mass m moving in a non-
inertial rotating frame (with its origin coinciding with
the fixed-frame origin) in the presence of the potential
U(r) is expressed as
m 2
L(r , r )  r    r  V (r )
2
PH 222 (DUCE) 27
Lagrangian Formulation …
where  is the angular velocity vector and we use
the formula
2 2
r    r  r  2  (r  r )   2 r 2  (  r )2 
Using the Lagrangian, we now derive the general
Euler-Lagrange equation for r . First, we derive an
expression for the canonical momentum
L
p   mr    r  and
r
d  L 

   m r r r
dt  r 

PH 222 (DUCE) 28
Lagrangian Formulation …
Next, we derive the partial derivative
L
r

 V (r )  m   r    (  r ) 
So that the Euler-Lagrange equations are

mr  V (r )  m   r  2  r    (  r )  ($)
Here, the potential energy term generates the fixed-
frame acceleration,V (r )  ma f , and thus the Euler-
Lagrange equation ($) yields equation ($1)

 
ar  a f  A    (  r )  2  vr    r ($1)

PH 222 (DUCE) 29
Lagrangian Formulation …
where a f A  the net inertial acceleration, with A  dV dt
  (  r ) the centrifugal acceleration
2  vr the Coriolis acceleration
  r an angular acceleration term

Fig. 5: Centrifugal and Coriolis accelerations in a rotating frame of reference.

PH 222 (DUCE) 30
Lagrangian Mechs - Advantages
Advantages of Lagrangian + Hamiltonian formulation:
 Coordinate invariance [k.e+p.e are defined
independent of coordinate system]
 Universality of technique [extension to aspects not
considered in Newtonian dynamics (elastic, em fields
etc is possible)] - unification
 Formal similarity of phenomena [similarity btn
different systems become apparent]
 Structural analogy of fields of study [Lag and Ham
principles form an invariant way of implying
mechanical equations of motion]
PH 222 (DUCE) 31
INTRODUCTION TO
HAMILTONIAN MECHANICS

•The Lagrangian method allowed us to find


equations of motion for any system in terms of an
arbitrary set of generalized co-ordinates.
•An extension of this method is the Hamiltonian
method due to Hamilton.
•Its principal feature is the use of the generalized
momenta p1, p2 , ... , pn in place of the generalized
velocities q1 , q2 , ... , q n

PH 222 (DUCE) 32
Hamiltonian Mechanics …
•It is particularly valuable when, as often happens,
some of the generalized momenta are constants of the
motion.
•More generally, it is well suited to finding conserved
quantities, and making use of them.
•The Hamiltonian, H is defined as
H   pi qi  L
i

where pi (i=1,2,3,…,n)are generalised momenta and

L  L(q, q, t ) is the Lagrangian


PH 222 (DUCE) 33
Hamiltonian Mechanics …
d L L
Using the Euler-Lagrange’s equations     0
dt  qi   qi 
L
and definition of pi  we have,
qi
dpi  L L
  0  pi 
dt qi qi
The implicit differential of H is;
 
dH  d   pi qi   dL
 i 
 L L  L
   pi dqi  qi dpi     dqi  dqi   dt
i i  qi qi  t
L
   pi dqi  qi dpi     pi dqi  pi dqi   dt
i i t
.
PH 222 (DUCE) 34
Hamiltonian Mechanics …
L
 dH   qi dpi  pi dqi   dt (1)
i t
But, we can also work out dH directly this time using
the local coordinates qi and pi (i.e. H=H(qi,pi,t)), to get
 H H  H
dH    dpi  dqi   dt (2)
i  pi qi  t
Equating the corresponding coefficients of equations
(1) and (2), we have,
H , p   H H L
qi  and 

i
pi q i t t
are Hamilton’s canonical equations of motion.
PH 222 (DUCE) 35
Time Independent Hamiltonian
Suppose H is independent of time t, then equation (2) i.e.
n
 H H  H
dH    dpi  dqi   dt becomes
i 1  pi qi  t


n
 H H 
dH   dpi  dqi 
i 1
 pi qi 


n
dH  H dpi H dqi 
   
dt
i 1
 pi dt qi dt 


n

q
n
 dpi dqi 
  qi  p i  i p i  p i qi  0
i 1
 dt dt  i 1
Hence H is constant
PH 222 (DUCE) 36
Hamiltonian and Energy
If;
• a mechanical system is natural i.e. the Lagrangian
takes the natural form L=T-V – under a conservative
force field,
• the transformation equations from Cartesian to
generalized coordinates are time independent
• the potential V is velocity independent (V depends
only on the position q j ) ,

then the Hamiltonian is equal to the total energy of the


system. Let us show this.

PH 222 (DUCE) 37
Hamiltonian and Energy …


n
Kinetic energy of the system 1
T
2
mi qi
(quadratic form): 2
i 1


n
1
Then T qi   mi  qi
2 2

2
i 1

   m q
n
1
  T qi 
2 2 2
i i
2
i 1

Differentiate both sides w.r.t. λ,


n T   qi  d   qi  d2
  q 
i 1 d
 T  qi 
d
 T  qi  2
i
PH 222 (DUCE) 38
Hamiltonian and Energy …
n T   qi 
  q 
i 1
qi  T  qi  2
i

 T qi 
n

Set λ = 1, qi  2T qi 


qi
i 1


n
T
Simply, we write qi  2T (3)
qi
i 1

L  
Since pi   T  V   T (4)
qi qi qi

PH 222 (DUCE) 39
Hamiltonian and Energy …

By equations (3) and (4)

 p q  2T
n

i i
i 1

H   p q  L
n

So i i
i 1

= 2T – ( T – V )

= T + V = E Total energy of the system.

PH 222 (DUCE) 40
Hamiltonian Formulation
To construct Hamilton’s canonical equations for a
mechanical system proceed as follows:

(1) Choose your generalized coordinates q   q1 , q2 , ... , q n 


and construct
L(q, q, t )  T  V
(2) Define and compute the generalized momenta
H
pi  for i = 1, . . . , n.
qi
Solve these relations to find qi  qi (q, q, t )

PH 222 (DUCE) 41
Hamiltonian Formulation

(3) Construct and compute the Hamiltonian function


n
H  qj pj  L
j 1

(4) Write down Hamilton’s equations of motion


H H
qi  , pi   for i = 1, . . . , n
pi qi
and evaluate the partial derivatives of the Hamiltonian
on the RHS

PH 222 (DUCE) 42
Examples
1. Simple Harmonic Oscillator
We may again solve the simple harmonic oscillator
problem, this time using Hamiltonian mechanics. We
first write down the kinetic energy T, expressed in terms
of momentum p: p2
T 
2m
The potential energy of a simple harmonic oscillator is
1 2
V  kx
2
The Hamiltonian in this case is then
p2 1 2
H ( x, p )  T  V   kx
2m 2
PH 222 (DUCE) 43
Examples
Substituting for H into the first and second Hamilton’s
equations, we find

dx H H
 (*) dp
 (**)
dt p and
dt x
  p2 1 2  p 
 p 1 2
2

   kx      kx   kx
p  2m 2  m x  2m 2 

Equations (*) and (**) are two coupled first-order


ordinary differential equations, which may be solved
simultaneously to find x(t) and p(t).

PH 222 (DUCE) 44
Examples …
Note that for this example, Equation (*) is
equivalent to p=mv, and equation (**) is just the
Hooke’s Law, F=-kx.

Combining the results of equation (*) and (**), we


get
mx  kx  0
which is the Euler-Lagrange equation we would
have obtained from the Lagrangian formalism.

PH 222 (DUCE) 45
Examples …
2. Simple Pendulum
More general coordinates (and their corresponding
momenta) may be used in place of x and p. In finding
the motion of the simple pendulum, we may replace
the position x with angle θ from the vertical, and the
linear momentum p with the angular momentum P.
To solve the plane pendulum problem using Hamiltonian
mechanics, we first write down the kinetic energy T,
expressed in terms of angular momentum P:
P2 P2 where I  ml 2 is the moment
T  2
2 I 2ml of inertia of the pendulum
PH 222 (DUCE) 46
Examples …
The gravitational potential energy of a plane pendulum is
V  ml (1  cos )
The Hamiltonian in this case is then
H ( , P)  T  V
2
P
 2
 mgl (1  cos  )
2ml
Substituting for H into the first and second Hamilton’s
equations, we find
d H (^) dP H
 (^^)

dt P dt 
  P2  P   P2 
          mgl sin 
mgl (1 cos )   
P  2ml 2  ml
2  mgl (1 cos )
  2 ml 2

PH 222 (DUCE) 47
Examples …
Equations (^) and (^^) are two coupled first-order
ordinary differential equations, which may be solved
simultaneously to find θ(t) and P(t). For this example,
equation (^) is equivalent to P=Iω and equation (^^) is
the torque τ =-mglsinθ.

Combining the results of equation (^) and (^^), we get


g
  sin( )  0
l
which is the Euler-Lagrange equation we would have
obtained from the Lagrangian formalism.

PH 222 (DUCE) 48
LET’S STOP HERE !

PH 222 (DUCE) 49

You might also like