Legrangian Formalism
Legrangian Formalism
Lectures 1, 2 and 3
Anil Shaji
School of Physics, IISER Thiruvananthapuram
(Dated: August 1, 2019)
Let us start with the description of motion. The central idea in classical mechanics is that of a
particle. The description of a particle is in terms of its position and velocity. Observations show
that these two coordinates constitute a complete description of the motion of a particle in the sense
that specifying the two will let us compute the position and velocity of the particle at all times
provided all external influences on the particle are known. So these are the kinematic variables.
This idea is embodied in Newton’s first law.
When talking about position and momentum coordinates, or degrees of freedom, of a particle
there is a substantial abstraction lurking in the background. That is the notion of a reference
frame. Change happens on a background of the changeless. So what is this reference frame? First
of all it must contain the measuring devices that give us the values of the variables. It is not just
one measuring device but really there are rulers and clocks at every point in space at every instant
in time. The nature of the reference frame determines the kinematics. Whether it is Newtonian
or Relativistic. We must therefore realize that the systematization of our experience in terms of
classical dynamics presupposes certain conventions, and as these conventions change the physical
system also changes.
For Newtonian dynamics a special reference frame is postulated. In these reference frames, it
was postulated that the laws of nature are very simple. The fixed stars were the obvious candidate
for such a reference frame at the time fo Galileo and Newton. Such frames are called inertial frames.
On a practical note however, for most purposes the earth provides the inertial reference frame for
classical dynamics in the lab. Sometimes we have to use the sun as the origin of a reference frame
and sometimes the distant stars in our galaxy.
All the statements we are going to make at least in the beginning of this course assume that
we are an observer in such an inertial frame. Coming back to the material particle, we ascribe to
it a single intrinsic property; its inertial mass, m. What we are aiming for is information on its
position r as a function of time;
r = r(t).
and
x = A cos(ωt + φ),
for rectilinear motion and simple harmonic motion. These are still kinematical or descriptive
equations that does not take into account the causes for the observed motion or changes in it.
The dynamical law is Newton’s second law which can be stated as
d
F(r, v, t) = p, p = mv, v = ṙ.
dt
The Lorentz force due to time varying electric and magnetic fields on a charged particle is an
example of a force that depends on the coordinate, velocity and explicitly on time as well.
There are two types of forces acting on a system of particles. There are external forces on each
particle and then there are forces between the particles. So Newton’s second law becomes:
(e)
Fi + Fij = ṗi .
i
Newton’s third law tells us that Fij = Fji . So if we sum this equation over all particles, we get:
d2 (e) (e)
m i r i = F i + F ij = Fi = F(e) .
dt2
i i i∕=j i
F(e) = M R̈.
Part of the purpose of this exercise in reminding you of the definition of the center of mass coordi-
nate is to point out that often the collection of coordinates ri are not the best choice of kinematic
variables to describe the motion of a system. In addition to the center of mass coordinate we can
talk of the total linear momentum of the system, P = M Ṙ and so on as well as discussed in the
textbooks.
Another drawback of using the set ri is that not all of the 3N coordinates for a system of N
particles will be independent. They often haven to obey equations of constraint. There are forces
of constraint acting on the system and these forces are also divided into two flavors depending on
whether they arise externally to the system or are internal forces (as in a rigid body). The role of
the forces of constraint is to ensure that the equations of constraint are satisfied. In other words
not to allow the coordinates to take on all possible values.
3
Forces of constraint are such that they do not allow r to change in certain ways. So they are always
perpendicular to dr. This means that the forces of constraint do not do any work and so one is
not interested in them most of the time.
The constraint equations can be of three types:
φλ (xj ; t) = 0.
2. Inequalities like
χλ (xj ; t) ≥ 0.
The last two types of constraints are called nonholonomic constraints while the first kind of con-
straint is called a holonomic one. The second type of constraint can be made holonomic by
stipulating that infinite forces (potentials) act on the particles in the regions where the constraint
inequality is violated. Dealing with nonholonomic constraints of the third kind is rather difficult
and we will not discuss nonholonomic constraints here.
Let there be 3N − k, possibly time dependent, holonomic constraints,
φλ (xj ; t) = 0, λ = 1, . . . 3N − k.
This means that there are only k independent coordinates. So we choose k functions of xj ,
qs = qs (xj ; t), s = 1, . . . , k,
The representation given to xj by the above equation contains the constraints as well. The variables
qs are called generalized coordinates. We can define generalized velocities through
k
∂xj ∂xj
x˙j = q˙s + .
∂qs ∂t
s=1
1. Hamilton’s principle
For a dynamical system for which the forces are obtained from generalized potentials, the motion
of the system from time t1 to t2 is such that the line integral,
t2
I= L(qs , q̇s , t) dt, (1.1)
t1
has a stationary value. The quantity I is called the action and its value is different on each possible
trajectory connecting the two end points. The trajectories themselves are specified as functions
of the coordinates. The action, in turn, is a function of those functions. In other words it is a
functional of the paths connecting the two end points.
The function appearing in the integral is called the Lagrangian. We define the Lagrangian as
where T and V are the kinetic and potential energies of the mechanical system respectively. For a
system of particles the kinetic energy is defined as
1
T = mj ẋj ẋj ,
2
j
while the generalized forces acting on the system (including forces representing holonomic con-
straints can be written in terms of the potential function V (qs , t) as
∂V
Qs = − .
∂qs
The dynamics of the system picks out a path for which the action integral is stationary. By
stationary we mean that the action for adjacent paths is the same up to first order infinitesimals.
5
We can summarize Hamiltonian principle by stating that the motion is such that the variation in
the action is zero,
t2
δI = δ L(qs , q̇s , t) dt, = 0.
t1
We will now show that Lagrange’s equations follow from Hamilton’s principle. This places
Hamilton’s principle as a postulate at the same level as Newton’s laws. The principle is inde-
pendent of the choice of generalized coordinates and this formulation lends itself to extension to
nonMechanical systems like fields as well. The limitations we have put so far are that the con-
straints are holonomic and that there exists a generalized potential that depends on qs , q̇s and t
from which the generalized forces can be obtained. In order to obtain Lagrange’s equations we
have to digress a bit to develop a few mathematical techniques.
2. Calculus of variations
The main problem in calculus of variations is to find the curve along which a line integral reaches
its minimum value. Let us consider the problem in one dimension. Let y(x) define a family of
paths (a path in one dimension!) in x space. We define
dy(x)
ẏ = .
dx
Let f be a function of y, ẏ and x and let J be a line integral of f between x1 and x2 :
x2
J= f (y, ẏ; x) dx.
x1
J is a functional on x. We want to find a particular path y(x) such that J has a stationary value
relative to neighboring paths that differ infinitesimally from the function y(x). Since J must have
a stationary value on the correct path relative to any neighboring path, we say that the variation
in J must be zero relative to a family of adjacent paths parametrized by an infinitesimal quantity
α. These paths may be written as
For simplicity we assume that both y(x) and η(x) are well defined functions that are at least twice
differentiable in the interval (x1 , x2 ). For this family of curves we have
x2
J(α) = f (y(x, α), ẏ(x, α); x) dx.
x1
The condition on the family of curves y(x, α) that we considered is that they all pass through the
points (x1 , y1 ) and (x2 , y2 ). So the partial derivative of y with respect to α must vanish at the end
points making the first term in the above equation zero. So we have
x2
dJ ∂f d ∂f ∂y
= − dx.
dα x1 ∂y dx ∂ ẏ ∂α
Now the function η(x) = ∂y/∂α is arbitrary except for continuity and the fact that it has to vanish
at the end points. If
x2
M (x)η(x) dx = 0
x1
for arbitrary functions η(x), then M (x) has to be identically zero in the interval x1 to x2 . A hand
waving argument to see this is to say that we choose the arbitrary function η(x) to be the same
sign as M (x) everywhere in the interval (x1 , x2 ). This makes the integrand always positive and the
integral cannot vanish unless M (x) is identically zero in the interval. So we find that J can have
a stationary value only if
∂f d ∂f
− = 0.
∂y dx ∂ ẏ
The differential quantity,
∂y
dα ≡ δy,
∂α 0
represents the infinitesimal departure of the varied path from the correct path at the point x and
this corresponds to the infinitesimal, virtual displacement that we talked about before. Similarly
∂J
dα ≡ δJ,
∂α
is the infinitesimal variation in the action. The statement that J is stationary can be conveniently
written as
x2
∂f d ∂f
δJ = − δy dx = 0.
x1 ∂y dt ∂ ẏ
7
So as you can see we are pretty much there as far as obtaining Lagrange’s equations from
Hamilton’s principle is concerned. All we have to do is to replace J with the action, f with the
Lagrangian and x with time. The only difference is that we f is a function of many functions of
time.
Before we do that step, let us do an example of a problem that can be solved using calculus of
variations.
The problem is to find the curve between two points along which a point mass m falling from
rest under the influence of gravity travels from the higher to the lower point in the least amount
of time.
The time required to travel from 1 to 2 is
2
ds
t12 = ,
1 v
where ds is an infinitesimal segment along the curve and v is the velocity of the particle at that
point. Now
2
dy
2 2
ds = dx + dy = 1 + dx.
dx
If the vertical coordinate y is measured from the first point, then the velocity is given by
1
mv 2 = mgy, ⇒ v= 2gy.
2
So the time taken is identified as
2
1 + ẏ 2
t12 = √ dx,
1 2gy
We can identify f as
1 + ẏ 2
f= ,
2gy
and we have
∂f 1 1 + ẏ 2 ∂f ẏ
= − 3/2 , = .
∂y 2y 2g ∂ ẏ 2gy(1 + ẏ 2 )
and
d ∂f 1 ẏ 2 ẏ 2
= ÿ − − .
dx ∂ ẏ 2gy(1 + ẏ 2 ) 2y 1 + ẏ 2
The analysis of the brachistochrone problem by John Bernoulli led to the formulation of the calculus
of variations. The solution is sketched out below:
The analysis of the brachistochrone problem by John Bernoulli led to the formulation of the
calculus of variations.
When f is a function of many independent variables yi and their derivatives ẏi , the generalization
of the fundamental result in calculus of variations is straightforward. All the quantities are still
considered to be functions of the parametric variable x. The variation of the integral J,
x2
δJ = f (y1 (x), y2 (x), . . . ; ẏ1 (x), ẏ2 (x), . . . ; x) dx,
x1
Here ηi (x) are arbitrary functions while yi (x, 0) are the functions we are trying to find. The
computation proceeds as before;
x2
dJ ∂f ∂yi ∂f ∂ ẏi
= − dx.
dα x1 ∂yi ∂α ∂ ẏi ∂α
i
Equivalently
x2 ∂f d ∂f
δJ = − δyi dx = 0.
x1 ∂yi dx ∂ ẏi
i
Since the variations δyi are independent and arbitrary functions of x we see that each term in the
sum must be independently zero and we have the set of equations:
∂f d ∂f
− = 0.
∂yi dx ∂ ẏi
9
We digress a bit here to briefly consider an extended form of Hamilton’s principle called Weiss
action principle. Here the end points of the family of curves we consider are also allowed to be
varied infinitesimally. Let the new end points correspond to times t′1 = t1 + ∆t and t′2 = t2 + ∆t
and we have
t′ t2 t 2
2
J= L dt = L dt + L∆t ,
t′1 t1 t1
and
dJ
t2 ∂L d ∂L
∂qs ∂L ∂qs t2 t 2
= − dx + + L∆t .
dα t1 s
∂q2 dt ∂ q̇s ∂α s
∂ q̇s ∂α t1 t1
where δJ is the variation in the action when α = 0. At the end points we can consider the total
variation in qs ,
where the first term is just the variation parametrized by α. The second term comes about because
of moving the end point around. We define “generalized momenta” as
∂L
ps ≡ ,
∂ q̇s
and rewrite the variation of the action as
t2 t 2
∂L d ∂L
δJ = − δqs dx + ps ∆qs − H∆t , (1.2)
t1 s
∂q2 dt ∂ q̇s s
t1
The second term in Eq. (1.2) is called the end point variation of the action. The statement of the
Weiss action is that the dynamical path followed by the system in configuration space is that path,
about which general variations produce only “end point contributions”.
10
Let us consider a charge q, of mass m moving with a velocity v in a region of space with both
an electric field, E and magnetic field B. The force on the particle is
F=q E+v×B .
Both E(x, y, z; t) and B(x, y, z; t) are continuous functions of time and position and derivable from
the scalar potential φ and vector potential A;
∂A
E = −∇φ − .
∂t
and
B = ∇ × A.
Using
k
∂xj ∂x
ẋj = q˙s + ,
∂qs ∂t
s=1
we get
1
k 2
∂xj ∂x
T = mj q˙s + .
2 ∂qs ∂t
j s=1
This leads to a general form for the kinetic energy in generalized coordinates as
T = T 0 + T 1 + T 2 = M0 + Ms q̇s + Mss′ q̇s q̇s′ ,
s ss′
where
1 ∂ ẋj
M0 = ,
2 ∂t
j
1 ∂ ẋj
Ms = ,
2 ∂qs
j
1 ∂ ẋj ∂ ẋj
Mss′ = .
2 ∂qs ∂qs′
j
If the transformation equations do not explicitly depend on time, then only the last term is non-
vanishing so that the kinetic energy is a homogenous quadratic form in the velocities.
As the simplest example of the Lagrangian formalism, let us consider the single particle in
cartesian coordinates. The generalized forces are just Fx , Fy and Fz .
1
T = m ẋ2 + ẏ 2 + ż 2 .
2
We have
∂T ∂T ∂T
= = = 0.
∂x ∂y ∂z
and
∂T ∂T ∂T
= mẋ, = mẏ, = mż.
∂ ẋ ∂ ẏ ∂ ż
So we recover the familiar equation of motion:
d d d
(mẋ) = Fx , (mẏ) = Fy , (mż) = Fz .
dt dt dt
12
The wire is straight and it is rotated uniformly about the z axis. This is an example with a
time dependent constraint. The coordinates of the bead are
where ω is the angular velocity of the wire and we have used the constraint (in differential form)
that θ̇ = ω. Note that the z coordinate of the bead is a constant (z = 0) and hence also constrained.
mr̈ − mrω 2 = 0, ⇒ r̈ = rω 2 .
r(t) = eωt ,
which shows that the bead moves exponentially outward because of centripetal acceleration.