Professional Documents
Culture Documents
5 Lagrangian Mechanics
5 Lagrangian Mechanics
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.
PH 222 (DUCE) 1
Introduction …
Another example is the Kepler’s problem, which is
best analyzed in terms of the polar coordinates (r, φ).
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
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 qi 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.
A0
L L
t2 t2 t2
t2
L L d L
t2 t2
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 qi qi
Euler-Lagrange’s equations
PH 222 (DUCE) 8
Lagrange’s Equation …
d L L
0
dt qi qi
n
where L T qi t V qi t
i 1
t2
PH 222 (DUCE) 9
Lagrange’s Equation …
1 2
NOTE : Plugging L mx V ( x )
2
d L L
in 0
dt qi 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 …
PH 222 (DUCE) 12
Recipe …
vii. Plug those derivatives into the Euler-Lagrange’s
equations;
d L L
0 (1)
dt qi qi
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).
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 …
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
11 2 2
1
1
T m a 3m a 2m a
2 2
2 2 22
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
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 mr 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
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
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
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
qi p i i p i p i qi 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 ) ,
PH 222 (DUCE) 37
Hamiltonian and Energy …
n
Kinetic energy of the system 1
T
2
mi qi
(quadratic form): 2
i 1
n
1
Then T qi mi qi
2 2
2
i 1
m q
n
1
T qi
2 2 2
i i
2
i 1
T qi
n
n
T
Simply, we write qi 2T (3)
qi
i 1
L
Since pi T V T (4)
qi qi qi
PH 222 (DUCE) 39
Hamiltonian and Energy …
p q 2T
n
i i
i 1
H p q L
n
So i i
i 1
= 2T – ( T – V )
PH 222 (DUCE) 40
Hamiltonian Formulation
To construct Hamilton’s canonical equations for a
mechanical system proceed as follows:
PH 222 (DUCE) 41
Hamiltonian Formulation
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
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.
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θ.
PH 222 (DUCE) 48
LET’S STOP HERE !
PH 222 (DUCE) 49