Lagrangian Mechanics
Lagrangian Mechanics
D. A. Garanin
October 9, 2015
Part I
Newtonian Mechanics
Part II
Lagrangian Mechanics
1 The least-action principle and Lagrange equations
Newtonian mechanics is fully sufficient practically. However, it is desirable to find a way to obtain equations
of motion from some scalar generating function. For conservative systems, the complete information about
the system is contained in the total energy E = Ek +U , expressed as a function of coordinates and velocities,
or angles and their time derivatives for some systems considered above. However, there is no way to obtain
equations of motion from the energy function directly. It turns out that generating function of equations of
motion is Lagrange function or simply Lagrangian, in most cases
L = Ek − U. (1)
Lagrange formalism is build upon the so-called Least-Action principle, also called Hamilton principle.
According to this principle, that can be put into the foundation of mechanics, the actual dynamics of the
system, that is, the actual time dependence of its generalized coordinates {qi (t)} minimizes the action on
the way from state 1 to state 2,
ˆt2
S= dtL (q(t), q̇(t), t) , q ≡ {qi } . (2)
t1
Here q, q̇ may be coordinates and velocities, angles of the polar or spherical coordinate systems and their
time derivatives, or whatever other dynamical variables. Varying S with respect to an arbitrary small
deviation δq(t) from the actual solution minimizing the action, one obtains
ˆt2
0 = δS = dt [L (q + δq, q̇ + δ q̇, t) − L (q, q̇, t)]
t1
ˆt2 X ∂L
∂L
= dt δqi + δ q̇i
∂qi ∂ q̇i
t1 i
X ∂L t2 ˆ
t2
X ∂L d ∂L
= δqi + dt
− δqi . (3)
∂ q̇i t1 ∂qi dt ∂ q̇i
i t1 i
1
The first term here vanishes, because of the boundary conditions fixing qi (t), i.e., δqi (t1 ) = δqi (t2 ) = 0. The
second term should vanish for different δqi (t), that requires that Lagrange equations
d ∂L ∂L
− =0 (4)
dt ∂ q̇i ∂qi
for all i should be fulfilled. Introducing vectors
One can see that using Lagrange function of Eq. (1) and the above equation yields Newtonian equations
of motion. For instance, for a point mass in a potential field
mv2
L= − U (r). (7)
2
Identifying r = q, v = q̇, from Eq. (6) one obtains
∂U
mv̇ + = 0, (8)
∂r
Newton’s second law for potential forces.
Lagrange formalism is especially convenient for systems with holonomic constraints, because in it, holo-
nomic constraints are hidden and never appear explicitly. As an example, the Lagrange function of a
pendulum considered in Newtonian mechanics above has the form
ml2 ϕ̇2
L= + mgl cos ϕ, (9)
2
where ϕ = q and ϕ̇ = q̇. Lagrange equation in this case reads
or
ϕ̈ + ω02 sin ϕ = 0, ω02 = g/l (11)
that is the Newtonian equation of motion after eliminating the holonomic constraint by using polar coor-
dinate system. Thus, in the case of holonomic constraints using Lagrange formalism is a shorter way to
equations of motion, although writing down the kinetic energy requires some habit and, in more complicated
cases, a special calculation.
Lagrange formalism is also convenient in the case of using special coordinates systems, even in the absence
of constraints. As an example one can consider a pendulum, in which the mass is attached to a spring and
can move along the light rod. Kinetic energy in polar coordinates has the form
m 2
ṙ + r2 ϕ̇2 .
Ek = (12)
2
Potential energy is the sum of gravity energy and the energy of the spring,
k
U = −mgr cos ϕ + (r − l)2 , (13)
2
2
where k is spring constant and l is equilibrium position of the mass on a spring. It is convenient instead of
r use x ≡ r − l as a dynamical variable. In terms of x and ϕ Lagrange function becomes
m 2 k
L= ẋ + (l + x)2 ϕ̇2 + mg (l + x) cos ϕ − x2 . (14)
2 2
Lagrange equation are
d ∂L ∂L d
− = m (l + x)2 ϕ̇ + mg (l + x) sin ϕ = 0 (15)
dt ∂ ϕ̇ ∂ϕ dt
and
d ∂L ∂L
− = mẍ − m (l + x) ϕ̇2 − mg cos ϕ + kx = 0. (16)
dt ∂ ẋ ∂x
They simplify to
g k
ϕ̈ + ϕ = 0, ẍ − g + x = 0. (19)
l m
One can see that multiplying Lagrange function by a constant does not change Lagrange equations of
motion. Thus the choice of Lagrange function in Eq. (1) is not unique. Moreover, one can add a full time
derivative of a function of coordinates and time ∂t f (q, t) to the Lagrange function,
d
L0 = L + f (q, t). (20)
dt
This adds an invariable contribution to the action,
that does not change equations of motion. Proof of irrelevance of this addition to the Lagrangian using
Lagrange equations is a bit more cumbersome:
d ∂ d ∂ d d ∂ ∂f ∂f ∂ ∂f ∂f
f (q, t) − f (q, t) = + q̇ − + q̇
dt ∂ q̇ dt ∂q dt dt ∂ q̇ ∂t ∂q ∂q ∂t ∂q
d ∂f ∂2f ∂2f ∂2f ∂2f ∂2f ∂2f
= − − 2 q̇ = + 2 q̇ − − 2 q̇ = 0. (22)
dt ∂q ∂q∂t ∂q ∂q∂t ∂q ∂q∂t ∂q
In the presence of non-holonomic constraints Lagrange formalism loses its elegance. The general form of
a system of different non-holonomic constraints labeled by the index α is
X
cαi (q)q̇i = 0, α = 1, 2, . . . (23)
i
If these constraints can be integrated, that is, represented as constraints on q, they are holonomic constraints.
In general, the constraints above cannot be integrated. In this case the way to proceed is first to notice that
the constraints above can be reformulated as constraints on possible variations of q, that is,
X
cαi (q)δqi = 0, α = 1, 2, . . . (24)
i
3
Constrained variation of the action can be performed with the help of the method of Lagrange multipliers.
One obtains
X ˆ
t2
X
0
0 = δS = δS + λα dt cαi (q)δqi , (25)
α t1 i
where λα are Lagrange multipliers. Using Eq. (3), one arrives at constrained Lagrange equations of motion
d ∂L ∂L X
− − λα cαi (q) = 0 (26)
dt ∂ q̇i ∂qi α
that have to be solved together with Eq. (23). The bottom line is that in the case of non-holonomic
constraint Newtonian approach is better than Lagrangian, because reaction forces within the former are
physically more transparent than Lagrange multipliers in the latter.
mv̇ = qE + q [v × B] (27)
considered above. Here the electric and magnetic fields can be expressed via the scalar and vector potentials
as follows
∂A
E=− − ∇ϕ, B = ∇ × A. (28)
∂t
Let us show that Lagrangian can be written as
mv2
L= + qv · A − qϕ. (29)
2
Indeed, Lagrange equation becomes
d ∂L ∂L d
0= − = (mv + qA) + q∇ϕ − q∇ (v · A) . (30)
dt ∂v ∂r dt
Using the formula for the gradient of a dot-product
one obtains
0 = mv̇ + q Ȧ + q∇ϕ − q (v∇) A − qv × (∇ × A) . (32)
Finally, using the formula
d ∂A
Ȧ = A(r(t), t) = + (v∇) A (33)
dt ∂t
and Eq. (28), one arrives at Eq. (27).
4
3 Transformations and conservation laws
3.1 Galilean transformation
A free body is moving with a constant velocity by inertia, if the frame, in which the motion is considered, is
not moving itself with acceleration. Such frame is called inertial frame. Any frame, moving with a constant
velocity with respect to the inertial frame, is also an inertial frame. Thus, there is an infinite number of
inertial frames. In each of these inertial frames a free body will be moving with a constant velocity.
Transformation between inertial frames is Galilean transformation,
v = v0 + V, V = const
0
r = r + Vt + const. (34)
Since all inertial frames are equivalent, equations of motion in these frames should be the same. This means
that Lagrange function transformed from one frame to the other should have the same form up to the
irrelevant full time derivative. For instance, Lagrangian of a free particle L = mv2 /2 can be transformed as
follows
where the Lagrangian in primed frame L0 = mv02 /2 has the same functional form and the irrelevant full
derivative can be discarded.
If one requires that all equations of (non-relativistic) physics are covariant (i.e., have the same form) with
respect to Galilean transformations, the principle of Galilean invariance becomes non-trivial and productive.
For instance, a charged particle in a magnetic field is circling. Galilean transformation into another frame
with V⊥B makes non-closed orbits in form of cycloids. What should be the corresponding equation of
motion? We know that cycloidal orbits emerge in the case of electric field E⊥B. Thus, to keep equations
covariant, one has to require that electromagnetic field is getting changed by Galilean transformations, so
that in the moving frame there is an electric field making trajectories cycloidal.
With the help of Lagrange equations it can be shown that in the case of L = L (q, q̇) one obtains Ė = 0
from Lagrange equations. One proceeds as follows
X ∂L X d ∂L X ∂L X ∂L X d ∂L ∂L
Ė = q̈i + q̇i − q̈i − q̇i = q̇i − = 0. (37)
∂ q̇i dt ∂ q̇i ∂ q̇i ∂qi dt ∂ q̇i ∂qi
i i i i i
Since Lagrangian is bilinear function of q̇i , the above-defined E is indeed the total energy:
X ∂L
q̇i − L = 2Ek − (Ek − U ) = Ek + U = E. (38)
∂ q̇i
i
5
3.3 Translational invariance and momentum conservation
Lagrangian of an isolated system is invariant under spatial translations
ri ⇒ ri + ε. (39)
This actually means that potential energy depends only on the differences ri − rj . That is, there is only
potential energy due to interaction between the parts of the system but no external potential energy. Con-
sidering ε as infinitesimal and require δL = 0 as the result of translation, one obtains
X ∂L X ∂L
0 = δL = ε · ⇒ = 0, (40)
∂ri ∂ri
i i
P the direction of ε is arbitrary. Further, using ∂L/∂ri = −∂U/∂ri = fi , one obtains Newton’s third law
as
i fi = 0. On the other hand, from Lagrange equations follows
X d ∂L ∂L
d X ∂L d X d
0= − = = pi = P, (41)
dt ∂vi ∂ri dt ∂vi dt dt
i i i
As the
Pdirection of δϕ is arbitrary, one concludes that the total angular momentum of the system is conserved,
L = i [ri × pi ] = const.
6
4 Small oscillations with many degrees of freedom
4.1 General formalism
Consider a dynamical system with N degrees of freedom near a minimum of the potential energy. The
Lagrangian has a general form
1X
L= (mij ẋi ẋj − kij xi xj ) , (47)
2
ij
where xi ≡ qi − qi (0) are deviations from the minimum and the mass and stiffness coefficients are symmetric,
mij = mji and kij = kji . The Lagrangian can be written in the matrix form as
1 T
L= Ẋ · M · Ẋ − XT · K · X , (48)
2
where M is the mass matrix, K is the stiffness matrix, X = (x1 , x2 , . . . , xN ) (a column) and XT its transpo-
sition (a row). The Lagrange equations read
X
(mij ẍj + kij xj ) = 0, i = 1...N (49)
j
−ω 2 M + K · a = 0.
(52)
that defines N eigenfrequencies ωα2 , α = 1 . . . N . One can prove that ωα2 are positive, if the potential energy
is a positively defined bilinear form, as it is the case for the energy minimum. Then the vectors aα are
real. We will assume the simplest case of ωα2 nondegenerate, ωα2 6= ωβ2 for α 6= β. Technically, Eq. (6) is a
generalized eigenvalue problem,
K · a = λM · a (54)
and a is eigenvector of K with respect to M. Algorithm for solving this problem is implemented in Wolfram
Mathematica.
The problem we are solving is resembling an eigenvalue problem. It is more complicated, however, since
we have two matrices instead of one. Whereas in eigenvalue problems eigenvectors corresponding to different
eigenvalues are orthogonal, here a generalized orthogonality relation takes place. To obtain it, write Eq.
(52) with two different eigenvalues ωα2 and ωβ2 :
ωα2 M · aα = K · aα
ωβ2 M · aβ = K · aβ . (55)
Now multiply the first equation by aTβ from the left, multiply the second equation by aTα from the left, and
subtract them from each other:
7
Using symmetry of matrices M and K, one can be easily show aTβ ·M·aα = aTα ·M·aβ and aTβ ·K·aα = aTα ·K·aβ .
Thus the rhs vanishes and one obtains
ωα2 − ωβ2 aTβ · M · aα = 0.
(57)
This means that for α 6= β one has aTβ · M · aα = 0. It is convenient also to requireaTα · M · aα = 1. This gives
the generalized orthogonality condition
aTα · M · aβ = δαβ . (58)
Now from the second of equations (55) one obtains
aTα · K · aβ = ωβ2 aTα · M · aβ = ωβ2 δαβ . (59)
One can compose the N × N matrix of vectors A by stacking all aα together. In terms of A Eq. (58) takes
the form
AT · M · A = I, (60)
where I is the unit matrix, whereas Eq. (59) becomes
AT · K · A = Ω2 , (61)
where Ω = diag {ωα }.
Let us now introduce the normal-coordinate vector ζ defined by
X = A · ζ, XT = (A · ζ)T = ζ T · AT . (62)
These equations can be resolved for ζ and ζα :
ζ = A−1 · X, ζα = A−1 αi xi .
(63)
8
4.2 Double pendulum
Consider a double pendulum that consists of the pendulum 1 attached in a standard way and the pendulum
2 attached to the end of pendulum 1. For simplicity we consider the case m1 = m2 = m and l1 = l2 = l.
Describing the pendula with the angles θ1 and θ2 , one writes
ml2 2 mgl
2θ̇1 + θ̇22 + 2θ̇1 θ̇2 − 2θ12 + θ22 .
L = Ek − U = (74)
2 2
Identifying this with Eq. (48) yields
2 2 1 2 0
M = ml , K = mgl . (75)
1 1 0 1
2 −ω 2 + ω02 −ω 2
a1
= 0, (76)
−ω 2 −ω 2 + ω02 a2
−ωα2 + ω02
a α = µα , (81)
ωα2
9
where µα are normalization coefficients. In particular,
√ √
−ω12 + ω02
1
2 2−
√ 1 2 √
a1 = µ1 = µ 1 ω0 = µ 1 ω0 2−1
ω12 2− 2 2
√
2 2 √
−ω2 + ω0 2 − 2√ −1 2
−1
√
a2 = µ2 = µ 2 ω0 = µ2 ω0 2+1 . (82)
ω22 2+ 2 2
Let us check orthogonality of these eigenvectors, Eq. (60):
√
2 1 −1
√
aT1 · M · a2 = µ1 µ2 ml2 ω04 1 2 · · = 0, (83)
1 1 2
as expected. Now calculate normalization factors:
√ 2 √
2 1
1
√ √
T 2 2 4
1 = a1 · M · a1 = µ1 ml ω0 2−1 1 2 · · √ = µ21 ml2 ω04 2−1 2 2
1 1 2
√ 2 √
2 1
−1
√ √
T 2 2 4
1 = a2 · M · a2 = µ2 ml ω0 2+1 −1 2 · · √ = µ22 ml2 ω04 2 + 1 2 2.
(84)
1 1 2
Thus
!1/2 √ !1/2
1 1 1 2+1
µ1 ω02 = √ √ √ =√ √
ml2 2−1 2 2 ml2 2 2
!1/2 √ !1/2
1 1 1 2−1
µ2 ω02 = √ √ √ =√ √ (85)
ml2 2+1 2 2 ml2 2 2
and, finally,
√ !1/2
1 2−1 √1
a1 = √ √
ml2 2 2 2
√ !1/2
1 2+1 −1
√
a2 = √ √ . (86)
ml2 2 2 2
Now, the angles expressed through the eigenmodes are given by Eq. (62) in matrix form or by Eq. (67)
in components. The latter yields
√ !1/2 √ !1/2
1 2−1 1 2+1
θ1 = a11 ζ1 + a12 ζ2 = √ √ ζ1 − √ √ ζ2
ml2 2 2 ml2 2 2
√ √ !1/2 √ √ !1/2
2 2−1 2 2+1
θ2 = a21 ζ1 + a22 ζ2 = √ √ ζ1 + √ √ ζ2 .
ml2 2 2 ml2 2 2
Inverse transformation with the help of
1
det ≡ a11 a22 − a21 a12 = (87)
ml2
takes the form
√ !1/2
det1 √ 2+1 √
ζ1 = = (θ1 a22 − θ2 a12 ) ml2 = ml2 √ 2θ1 + θ2
det 2 2
√ !1/2
det2 √ 2−1 √
ζ2 = = (a11 θ2 − a21 θ1 ) ml2 = ml2 √ − 2θ1 + θ2 . (88)
det 2 2
One can see that in the normal mode 1 both pendula are swinging in-phase and in the mode 2 they are
swinging antiphase. The frequency of the mode 1 is lower.
10
4.3 Two coupled oscillators
Another model that illustrates general principles and has an interesting physical behavior is the model of
two coupled oscillators with the Lagrangian
m 2
ẋ1 − ω12 x21 + ẋ22 − ω22 x22 − ∆2 x1 x2
L= (89)
2
with the positive coupling, ∆ > 0. We will show that if |ω1 − ω2 | ∆ (off-resonance case), the oscillators
behave nearly independently from each other and oscillate with their own frequencies ω1,2 , whereas for
|ω1 − ω2 | ∼ ∆ (resonance case) they strongly hybridize and each normal mode involves both coordinates.
Here the matrices M and K are given by
ω12 ∆2 /2
1 0
M=m , K=m (90)
0 1 ∆2 /2 ω22
2 ∆2
+ ω12 a1± +
−ω± a2± = 0 (95)
2
one obtains
∆2 /2
a ± = µ± , (96)
ω± − ω12
2
where µα is another set of normalization coefficients. One can check orthogonality of these eigenvectors,
aT+ · a− = 0. From the normalization condition aTα · aα = 1 one finds µα that turn out to be the same,
v
u ∆2
µα ≡ µ± = t q . (98)
u
2 ω12 − ω22 + ∆4
11
Substituting this into the formulas above and simplifying, one finally obtains a symmetric expression
r
ω12 −ω22
1± q
1 (ω12 −ω22 )+∆4
a± = √ r
ω 2 −ω 2
. (99)
2
± 1 ∓ q 21 22
(ω1 −ω2 )+∆4
Actually this result is valid for an arbitrary relation between ω1 and ω2 . Off resonance for ω1 < ω2 one has
∼ 1 ∼ 0
a− = , a+ = (100)
0 1
12
In the small-coupling case the eigenfrequencies are close to each other, so that one can approximate
1 ∼ 1 ∼ 1
= = . (108)
ω+ ω− ω0
However, one cannot make this approximation in the arguments of sin and cos since it will break down at
large times. From Eq. (94) in the weak-coupling case follows
s
∆2 ∼ ∆2
ω± = ω0 1 ± 2 = ω0 ± . (109)
2ω0 4ω0
This is a standard time dependence for a harmonic oscillator (square brackets) multiplied by a slowly
oscillating function of time. Using
2
∆
ẋ1 (t) = [−x1 (0)ω0 sin (ω0 t) + ẋ1 (0) cos (ω0 t)] cos t (111)
4ω0
(we do not differentiate the slow function), one can compute the time dependence of the energy of the first
oscillator as 2
m 2 2 2
2 ∆
E1 (t) = ẋ1 (t) + ω0 x1 (0) = E1 (0) cos t . (112)
2 4ω0
Similarly for the second oscillator one obtains
∆2
2
E2 (t) = E1 (0) sin t . (113)
4ω0
One can see that the total energy E(t) = E1 (t) + E2 (t) is conserved and slowly migrating between the two
oscillators.
13