CH 10
CH 10
Thus far we have solved problems by using Newton’s Laws (a vector approach) or energy
conservation (a scalar approach.) In this chapter we approach the subject in a very different
fashion, and one that initially seems far from evident. We will still use kinetic and potential
energies, but will define the Lagrangian, L = T − V from which we can generate the
equations of motion by doing simple derivatives
The power of this approach will become evident in examples. The development of this
approach spanned the work of Wilhelm von Leibniz(1646-1716), Johann Bernoulli (1667-
1748), Jean LeRond D’Alembert (1717-1783), and Joseph Louis de Lagrange(1736-1813).
We begin with William Rowan Hamilton’s (1805-1865) Variational Principle espoused sub-
sequent to the work of those previously mentioned.
When the Lagrangian method works it is very slick. So why use Newton’s methods at
all? The Lagrangian method is particularly powerful when dealing with a conservative
system (and indeed that is the only application we will do.) If what we want is an equation
of motion, Lagrange works well—when we also want to find a constraint force such as a
normal force, Lagrangian life may be tougher than Newtonian life.
When non-conservative forces or velocity dependent forces are present Newtonian methods
are generally preferred.
L=T −V (1)
the difference between kinetic and potential energies. To do this we must already know
expressions for the energies, and this has developed from the Newtonian perspective.
Next suppose that the system evolves from time t1 to t2 along a particular trajectory, that
is a particular y(t), ẏ(t) where for simplicity I am considering 1D motion. The starting and
1
ending points are fixed, but we can imagine that there are many paths that can be taken
between these fixed points as shown in Figure 10.1.1.
Hamilton’s Variational Principle states that the integral of the Lagrangian along the actual
path of motion is an extremum (maximum or minimum) along the actual path taken. In
symbols we evaluate the integral Z t2
J= L dt (2)
t1
and say that Z t2
δJ = δ L dt = 0 (3)
t1
The notation may seem a little odd. Recall that if we have a function of a variable, F (x),
its extrema are found by dF/dx = 0.
We are now expressing something slightly different in Equation 3: the integral is a function
of two parameters, y, ẏ (position and velocity) represented in 1D by paths on the y−t, ẏ−t
graphs. A change in the parameter, i.e. a change in the path taken between fixed start
and end points, will change the result of the integral, and this integral is an extremum
(maximum or minimum) for the actual path traveled.
E.g. Consider the case of an object falling near the earth in 1D motion. We will show first
that Hamilton’s Principle leads to the usual differential equation. We have kinetic energy
T = mẏ 2 /2 and potential energy V = mgy so
1
L = mẏ 2 − mgy (4)
2
To evaluate the variation we consider δy, δ ẏ to be slight variations in position and time
from the extremum value. Thus1
Z t2 Z t2
1
δJ = δ mẏ 2 − mgy dt = [m ẏ δ ẏ − mg δy] dt (5)
t1 2 t1
where this equation illustrates how to bring the variation inside the integral.
Now
d(δy)
δ ẏ = (6)
dt
We evaluate the first term using integration by parts as
Z t2 t2 Z t2
m ẏ δ ẏ dt = mẏ δy − mÿ δy dt (7)
t1 t1 t1
1 ∂F ∂F
This is sort of like a total differential. dF = ∂ ẏ
dẏ + ∂y
dy.
2
Since the endpoints are fixed, with no variation, the first term on the right must be zero.
Hence Z t2
δJ = [−mÿ − mg] δy dt = 0 (8)
t1
Since δy is arbitrary, this variation can be zero only if
−mÿ − mg = 0 (9)
Here η(t) represents the variation, and is any function of time that (a) has a continuous
first derivative (velocity) on the time interval [t1 , t2 ], and (b) has values η(t1 ) = 0 = η(t2 )
so that the starting and ending points are fixed.
The parameter α is the strength of the variation. When α = 0 we have our true solu-
tion.
From Equation 10 we have
ẏ(α, t) = ẏ(0, t) + αη̇(t) (11)
and η̇(t1 ) = 0 = η̇(t2 )
Using these expressions we can get the kinetic and potential energies and hence the La-
grangian.
1 1 1 1
T = m [ẏ(0, t) + αη̇(t)]2 = m [−gt + αη̇(t)]2 = mg 2 t2 − mg t α η̇(t) + mα2 η̇ 2 (t) (12)
2 2 2 2
1
V = mg [y(0, t) + αη(t)] = − mg 2 t2 + mg α η(t) (13)
2
1
L = m g 2 t2 − αg [tη̇(t) + η(t)] + α2 η̇ 2 (t) (14)
2
Now evaluate the integral of the Lagrangian. First evaluate the term linear in α, integrating
by parts. Z t2 t2 Z t2 Z t2
[tη̇(t) + η(t)] dt = tη(t) − η(t)dt + η(t)dt = 0 (15)
t1 t1 t1 t1
This means that Z t2
1 1
J(α) = g 2 (t32 − t31 ) + α2 η̇ 2 (t)dt (16)
3 2 t1
3
Now for any function η(t), η̇ 2 (t) is positive, and the latter integral must be positive, so
J(α) must be parabolic in α. The minimum in this function occurs for α = 0 as expected
from Hamilton’s Principle.
E.g. Motion of a particle in force-free region. We have Newton’s First Law that says
the motion should be a straight line. We will use Hamilton’s Principle to show that if we
assume that the motion is sinusoidal, the sinusoid must have zero amplitude, and hence be
straight line motion between the start and end.
We suppose the particle to move from t = 0, x = 0, y = 0 to t = x1 /vx , x = x1 , y = 0. The
components of the position during motion are
x = vx t (17)
πvx t
y = ±η sin (18)
x1
where η, the amplitude of the sinusoid, can be varied. (Like α in the previous exam-
ple.)
The potential energy V is constant, so
" 2 #
1 ηπv x πvx t
L = m vx2 + cos2 −V (19)
2 x1 x1
Evaluating J(η),
mvx x1 x1 mvx π 2
J(η) = −V + η2 (20)
2 vx 4x1
and this is a minimum for η = 0.
4
E.g. A pendulum constrained to move in the x − y plane. Initially we might choose
cartesian (x, y, z) coordinates, however they do not encapsulate two constraints: the plane
of oscillation is x−y and the length of the pendulum, r, is fixed: i.e. z = 0 and r2 −x2 −y 2 =
0. It is more convenient to choose cylindrical polar coordinates with z = 0, i.e. plane polar
coordinates. The second constraint is r = constant meaning that there is only one variable,
θ, and we can describe the motion as “one dimensional” meaning a single variable describes
the motion. Similarly motion of a roller coaster car is one dimensional.
Generalized coordinates qi are a set of coordinates that are independent, and just sufficient
to uniquely specify the configuration of a system.
Degrees of freedom are the number of variables that are needed to describe a system. Thus
a single particle in 3D space has 3 degrees of freedom (x, y, z) while two particles in 3D
space have 6 degrees of freedom, (x1 , y1 , z1 , x2 , y2 , z2 ). However a rigid dumbbell composed
of two particles separated by a rigid rod has only 5 degrees of freedom. A good choice
of generalized coordinates for the dumbbell would be (x, y, z) for the center of mass plus
(θ, φ) for the orientation of the rod joining the particles (see Figure 10.2.2).
Conditions of constraint are statements about limitations on motion of a system. They
are categorized into holonomic and non-holonomic types.
Holonomic constraints can be represented by an equality involving coordinates such as
2 2 2 2
d − (x1 − x2 ) + (y1 − y2 ) + (z1 − z2 ) = 0.
Being on a surface, or having a fixed separation between two particles are examples.
Non-holonomic constraints include those that involve an inequality (being outside the
earth) or involving velocity constraints. We will focus on holonomic constraints and leave
non-holonomic constraints for an advanced mechanics course.
If we have N particles and m holonomic constraints, there are 3N − m degrees of freedom
and the same number of generalized coordinates.
Here we will look at a more complicated system (one we would NOT want to tackle with
just Newton’s Laws) and get the same result three different ways.
The system consists of two particles. One has mass M and is constrained to move in a
straight line on a frictionless surface. Attached to it is a simple pendulum of length r with
mass m constrained to swing in a plane. We want to find kinetic and potential energies so
that we can construct the Lagrangian.
5
The natural choice for generalized coordinates are the position of the first mass, X, and
the angle that the pendulum makes with the vertical, θ. Refer to Figure 10.3.1.
Path 1 Start with the cartesian coordinates, (X, Y, Z) and (x, y, z). Constraints can be
written Y = Z = z = 0 and (x − X)2 + y 2 − r2 = 0. This means we have two
generalized coordinates (duh, we just said that!)
In terms of cartesian coordinates,
1 1
T = M Ẋ 2 + m(ẋ2 + ẏ 2 )
2 2
V = mgy (21)
Now we write transformation equations from the cartesian coordinates to the gener-
alized coordinates.
X = X (22)
x = X + r sin θ (23)
y = −r cos θ (24)
(25)
Hence
Ẋ = Ẋ (26)
ẋ = Ẋ + rθ̇ cos θ (27)
ẏ = rθ̇ sin θ (28)
(29)
Using the coordinate transformations is usually necessary to get the potential energy.
There are alternate ways to get the kinetic energy.
Notice that
• The kinetic energy term has a cross term in it. The generalized coordinates are
not orthogonal.
• The potential energy depends on a single generalized coordinate (this is not true
in general.)
6
• The variable X does not appear.
Path 2 Using generalized coordinates at the start to get velocities.
~M = îẊ and the velocity of m is the sum of the velocity of M
The velocity of M is V
and the velocity of m relative to M .
~M + ~vm,rel = îẊ + êθ rθ̇
~vm = V (32)
Then since êθ = cos θ î + sin θ ĵ, ẋ = Ẋ + rθ̇ cos θ and ẏ = rθ̇ sin θ as in Path 1.
Path 3 Similar to Path 2
If we write
1 ~ ~ 1
T = MV M · VM + m~
vm · ~vm (33)
2 2
then using î · êθ = cos θ we find the expression for kinetic energy in Equation 30.
Usually either Path 1 or Path 3 will be helpful.
The qi are parameters that are functions of time, and we can write
d(δqi )
δ q̇i = (35)
dt
We can use this to evaluate the second term of Equation 34 using integration by parts.
Z t2 X X ∂L t2 Z t2 X d ∂L
∂L
δ q̇i dt = δqi − δqi dt (36)
t1 ∂ q̇i ∂ q̇i t1 t1 dt ∂ q̇i
i i i
7
The generalized coordinates are independent, and so each δqi is independent of the other
variations. Thus to ensure that the integral is identically zero for all variations the item in
square brackets must be zero for each generalized coordinate. The Lagrange equations of
motion are thus
∂L d ∂L
− =0 i = 1, 2, · · · , N (38)
∂qi dt ∂ q̇i
This can also be written as
∂L d ∂L
= i = 1, 2, · · · , N (39)
∂qi dt ∂ q̇i
In Section 6 we will define a conjugate generalized momentum for each generalized coordi-
nate, pi = ∂∂L
q̇i and the equations of motion can be written
dpi ∂L
ṗi ≡ = (40)
dt ∂qi
Equations 38, 39, and 40 are all equivalent. Now we need to see how to use them.
The equations are sometimes called the Euler-Lagrange
E.g. 1 Free particle Yup this is boring, but let’s make sure it works for a particle moving
in 1D with no forces, therefore no potential energy. There is only one generalized
coordinate, x. The Lagrangian is simply L = T = 12 mẋ2 .
8
∂L ∂L
Then the partial derivatives are ∂xi = 0 and ∂ ẋi = mẋ and the equation of motion is
d
0= (mẋ) (41)
dt
i.e. linear momentum is constant, just a restatement of Newton’s First Law.
E.g. 2 Projectile Motion in Uniform g Imagine motion in the x − z plane. The gen-
eralized coordinates are just (x, z) and we can quickly write the Lagrangian
1
L = m(ẋ2 + ż 2 ) − mgz (42)
2
The partials are
∂L ∂L ∂L ∂L
=0 = −mg = mẋ = mż (43)
∂x ∂z ∂ ẋi ∂ żi
so the equations of motion are
d
0= (mẋ) i.e. horizontal momentum is constant (44)
dt
d
−mg =(mż) = mz̈ (45)
dt
and these are just what we get from Newton’s Laws
E.g. 3 Harmonic Oscillator in 1D We have a single generalized coordinate x repre-
senting the displacement of the mass from the unstretched location of the spring.
The Lagrangian is L = 21 mẋ2 − 21 kx2 and the partials are
∂L ∂L
= −kx = mẋ (46)
∂x ∂ ẋ
and our equation of motion is simply
9
Since the potential energy comes from a central force, it only depends on r. The
kinetic energy can be calculated by Path 1 by (1/2)(ẋ2 + ẏ 2 ) using the above trans-
formations (cross terms cancel) resulting in the Lagrangian
1
L = m ṙ2 + r2 θ̇2 − V (r) (49)
2
The text illustrates getting the Lagrangian using Path 3. The partials are
∂L ∂L ∂V ∂L ∂L
= mṙ = mrθ̇2 − = mr2 θ̇ =0 (50)
∂ ṙ ∂r ∂r ∂ θ̇ ∂θ
Recognizing that f (r) = −∂V /∂r we write the equations of motion as
d
mr̈ = mrθ̇2 + f (r) (mr2 θ̇) = 0 (51)
dt
These are familiar from Chapter 6.
Notice that anytime a generalized coordinate (like θ here) does not appear in the
Lagrangian, then the conjugate momentum, ∂L/∂ q̇i (yet to be discussed) is constant.
In this example the angular momentum, mr2 θ̇ is constant.
E.g. 5 The Complete Atwood’s Machine Consider a pulley mounted on a fixed, fric-
tionless bearing having moment of inertia I and radius a. A string of length ` connects
two blocks of masses m1 , m2 that can only move vertically. We neglect any air resis-
tance and assume an ideal string (massless and non-stretchy) that does not slip on
the pulley. This is shown in figure 10.5.1.
There are 5 holonomic constraints, y1 = z1 = y2 = z2 = 0 produce 1D motion, and
` = constant for the string length. So we need (3× 2 − 5 = 1) generalized coordinates.
(Or if you include the pulley, with three holonomic constraints on position of pulley,
(3 × 3 − 8 = 1) generalized coordinates.)
We use x for the position of m1 and then the position of m2 is (` − πa − x). We also
know that since the string does not slip, ω = ẋ/a.
The Lagrangian is then
1 I
L= m1 + m2 + 2 ẋ2 + m1 gx + m2 g(` − πa − x) (52)
2 a
The partials are
∂L ∂L I
= (m1 − m2 )g = m1 + m2 + 2 ẋ (53)
∂x ∂ ẋ a
10
Leading to the equation of motion
I
m1 + m2 + 2 ẍ = (m1 − m2 )g (54)
a
meaning that the acceleration is constant with value
(m1 − m2 )g
(55)
m1 + m2 + aI2
x1 + xp − ` = 0 (57)
0
x2 + x3 − 2xp − ` = 0
0
(2x1 + x2 + x3 ) − (2` + ` ) = 0 (58)
Here we have defined down as positive x, so the potential energy is V = −m1 gx1 −
m2 gx2 − m3 gx3 .
Hence we get the Lagrangian
1 1 1
L = m1 ẋ2 + m2 (−ẋ+ẋ0 )2 + m3 (ẋ+ẋ0 )2 +(m1 −m2 −m3 )gx+(m2 −m3 )gx0 +Constants
2 2 2
(59)
The partials are
∂L ∂L
= (m1 − m2 − m3 )g = m1 ẋ − m2 (−ẋ + ẋ0 ) + m3 (ẋ + ẋ0 )
∂x ∂ ẋ
11
∂L ∂L
= (m2 − m3 )g = m2 (−ẋ + ẋ0 ) + m3 (ẋ + ẋ0 ) (60)
∂x0 ∂ ẋ0
and the equations of motion are
12
and we can solve these simultaneous equations to yield
−g sin θ cos θ g sin θ
ẍ = ẍ0 = (68)
(1 + M/m) − cos2 θ 1 − m cos2 θ/(m + M )
Try to think of all limiting cases to check the validity of these equations.
We now have several examples of Lagrangian formulation. In several of the examples the
Lagrangian did not include one of the generalized coordinates (look at example 7, x does
not appear in L), and in these cases the text refers to the coordinate as “ignorable”.
Whenever we have an ignorable coordinate q, ∂L/∂q = 0 and therefore ∂L/∂ q̇ is constant.
We define the generalized momentum conjugate to the generalized variable q (conjugate
momentum for short) as
∂L
pq = (69)
∂ q̇
and thus can write the equation of motion as
dpq ∂L
ṗq ≡ = (70)
dt ∂q
If q has units of length, its conjugate momentum has units of momentum, kg·m/s. If q
is an angle, the conjugate momentum has units of angular momentum, kg·m2 /s. In some
cases they clearly represent a momentum or momentum component that we might write
down directly (example 1-4, in the latter case pr is the radial component of momentum, pθ
is the angular momentum) while in other cases the conjugate momentum is not as obvious
(Examples 5-7).
Generalized coordinates and their conjugate momenta become central in our definition of
the Hamiltonian at the end of this chapter.
E.g. 8 Pendulum Attached to Movable Support In Section 3 we began discussing a
mass M constrained to move in a straight line on a frictionless surface with a simple
pendulum of length r, mass m attached to it. The generalized coordinates were X
and θ and the Lagrangian was
1 1 h i
L = M Ẋ 2 + m Ẋ 2 + (rθ̇)2 + 2Ẋrθ̇ cos θ + mgr cos θ (71)
2 2
X is ignorable so
13
and the equations of motion are
(M + m)Ẍ + mrθ̈ cos θ − mrθ̇2 sin θ = 0 (73)
d 2
r θ̇ + Ẋr cos θ = −(Ẋrθ̇ + gr) sin θ
dt
or
Ẍ g
θ̈ + cos θ + sin θ = 0 (74)
r r
The last two equations can be combined to eliminate Ẍ and yield a rather ugly
looking second order differential equation in θ.
The text makes some simplifying assumptions to see if these equations make sense.
Read and understand these
E.g. 9 Spherical Pendulum Including Approximations Return to the simple pen-
dulum, a mass m attached to a string of length ` that s fixed at the other end, but
now let the pendulum be free to move in 3D.
This problem is identical to that of a spherical bowl of radius r = ` with a frictionless
bar of soap free to move in it.
There are two degrees of freedom, (θ, φ), the usual spherical polar variables. The
velocity (Equation 1.12.12) is
~v = êθ `θ̇ + êφ ` sin θ φ̇ (75)
If we choose the lowest position for V = 0, the height is y = `(1 − cos θ) and the
Lagrangian is
1
L = m`2 (θ̇2 + φ̇2 sin2 θ) − mg`(1 − cos θ) (76)
2
Since φ is ignorable we have conservation of the conjugate momentum,
pφ = m`2 φ̇ sin2 θ = constant ≡ m`2 S (77)
2
φ̇ sin θ = S (78)
where we have defined a new constant S = φ̇ sin2 θ.
The remaining equation of motion is then
d 2
m` θ̇ = m`2 θ̈ = m`2 φ̇2 sin θ cos θ − mg` sin θ
dt
or
g cos θ
θ̈ + sin θ − S 2 3 = 0 (79)
` sin θ
We shall NOT try to solve this in general, but will look at three special cases: (a) sim-
ple plane pendulum, φ̇ = 0, (b) Conical pendulum, θ̇ = 0, and (c) slight perturbation
from a conical pendulum.
14
1. For the simple plane pendulum, φ̇ = 0, we have S = 0 and the equation of
motion becomes
g
θ̈ + sin θ = 0 (80)
`
which is just what we have seen before for the plane pendulum. So we gain
confidence that our derivation is correct.
2. For a conical pendulum, θ̇ = 0, the bob moves in a circle with the string having
a constant angle θ0 and the equation of motion becomes
g cos θ
sin θ − S 2 3 = 0
` sin θ
or, putting in the expression for S
g g
φ̇2 = = sec θ (81)
` cos θ `
and this gives the required angular velocity φ̇ for the conical motion.
3. Now suppose we disturb the conical pendulum slightly from the above value.
To indicate the perfect conical pendulum value we will add a subscript
g g
φ̇20 = = sec θ0 (82)
` cos θ0 `
Also we will express the ideal conical value of
g
S02 = sin4 θ0 sec θ0 (83)
`
Also we will indicate the period of the circular motion of the conical pendulum
as s
2π ` cos θ0
T0 = = 2π (84)
φ̇ g
We assume that the perturbation will not change the value of S significantly
(nor will it change the period T0 ) and write the equation of motion as
sin4 θ0 cos θ
g
θ̈ + sin θ − =0 (85)
` cos θ0 sin3 θ
Now consider the expression in parentheses
sin4 θ0 cos θ
f (θ) = sin θ − (86)
cos θ0 sin3 θ
Do a Taylor series expansion about θ = θ0 to first order to get
15
Introduce the variable (pronounced ksi ) ξ = θ − θ0 , with ξ¨ = θ̈ so that the
equation of motion is
g
ξ¨ + (3 cos θ0 + sec θ0 )ξ (88)
`
This is our familiar friend the harmonic oscillator with period
s
`
T1 = 2π (89)
g(3 cos θ0 + sec θ0 )
So as the pendulum makes its primarily circular motion with period T0 , it bobs
up and down with period T1 .
E.g. Suppose that ` = 60 cm and θ0 = 35◦ . Then T0 = 1.407 s and T1 = 0.811
s.
The maxima in θ are a good visual reference to the motion. In the time T1
between successive maxima, the bob rotates through an angle
2π
φ ≈ φ̇0 T1 = √ >π (90)
3 cos2 θ0 + 1
and so the point of maximum θ precesses in the direction of increasing φ as
shown in Figure 10.6.2. The text integrates the equation of motion once to
get an effective potential that it plots versus angle to show the angular turning
points.
The previous sections have shown how the Lagrangian lets us determine constants of motion
and equations of motion. We may also want to determine the size of the constraint forces
such as normal forces or tensions. Rather than return to Newton’s Methods, we introduce
another new powerful method, Lagrange multipliers.
In the Lagrangian method used previously we used the constraints to reduce the num-
ber of variables needed to describe the system, and to make all the remaining variables
independent.
Consider a system with two generalized coordinates, (q1 , q2 ) connected by a single equation
of constraint, f (q1 , q2 , t) = 0 where a time dependent constraint has been allowed. In the
Lagrangian approach already used we would use the constraint to reduce the system to a
16
single generalized coordinate. Here we will NOT do this step so that we can determine a
force of constraint.
Start with Hamilton’s Variational Principle from Section 4,
Z t2 Z t2 X
∂L d ∂L
δ L dt = − δqi dt = 0 (91)
t1 t1 ∂qi dt ∂ q̇i
i
In Section 4 the constraints had already been used, so the δq’s were all independent.
In this section we are starting earlier and have not used the constraint, so the δq are
NOT independent. We write the variation in the constraint, which at any time must be
zero.
∂f ∂f
δf = δq1 + δq2 = 0 (92)
∂q1 ∂q2
Hence
∂f /∂q1
δq2 = − δq1 (93)
∂f /∂q2
Putting this into Equation 91,
Z t2
∂L d ∂L ∂L d ∂L ∂f /∂q1
− − − δq1 dt = 0 (94)
t1 ∂q1 dt ∂ q̇1 ∂q2 dt ∂ q̇2 ∂f /∂q2
Now we are varying a single coordinate, and the variation can take any value. To make
the integral zero, therefore, the item in square brackets must be zero, or
(∂L/∂q1 ) − (d/dt)(∂L/∂ q̇1 ) (∂L/∂q2 ) − (d/dt)(∂L/∂ q̇2 )
= (95)
(∂f /∂q1 ) (∂f /∂q2 )
The text states that the left hand side is an expression that is a function of (q1 , q̇1 , t) with
time being either implicitly (via q1 (t), q̇1 (t)) or explicitly involved. Likewise the right hand
side is a function of (q2 , q̇2 , t). For these to be equal for arbitrary choices of the generalized
variables, they must both equal a function of time alone, that we call −λ(t).
Then we can write
∂L d ∂L ∂f
− + λ(t) = 0 (96)
∂q1 dt ∂ q̇1 ∂q1
∂L d ∂L ∂f
− + λ(t) = 0 (97)
∂q2 dt ∂ q̇2 ∂q2
These two equations plus the constraint condition provide three equations in the three
unknowns (q1 (t), q2 (t), λ(t)) that can be solved.
The quantities
∂f
Qi = λ(t) (98)
∂qi
17
are called the generalized forces and are either a force for a spacelike q or a torque for an
angular q.
The text generalizes to more than 2 generalized coordinates and more than one con-
straint.
We will start with an example that is more straightforward calculus: Consider the function
F (x, y) = x2 +y 2 . What values of (x, y) will minimize this function subject to the constraint
y = 2x + 1.
Geometrically we can see that the constraint describes a straight line on the x − y plane,
and F is the square of the distance from the origin to the line.
Standard calculus would use the constraint equation to eliminate y in F , then dF/dx = 0
could be solved for the desired value, x = −0.4. Then y = 0.2.
Instead we introduce a Lagrange multiplier λ and write F 0 = x2 + y 2 + λ(y − 2x − 1) and
get three equations, ∂F 0 /∂x = 0, ∂F 0 /∂y = 0 ∂F 0 /∂λ = 0 or in this case
2x − 2λ = 0 (99)
2y + λ = 0 (100)
y − 2x − 1 = 0 (101)
L0 = L + λf (102)
∂L0 d ∂L0
− =0 (103)
∂qi dt ∂ q̇i
18
7.3 Examples
E.g. 1 Ball rolling down a ramp A ball of radius R and moment of inertia I = mk 2
rolls without slipping down a slope inclined at α to the horizontal. Find the equations
of motion and the generalized forces.
Choose up the incline to be positive x and positive θ to be consistent with this. The
constraint between these variables is x − Rθ = 0.
The modified Lagrangian is then
1 1
L0 = mẋ2 + I θ̇2 − mgx sin α + λ(x − Rθ) (104)
2 2
We have two equations of motion that come from this modified Lagrangian, plus the
constraint equation,
These are solved in a trivial fashion to get (using the radius of gyration k)
R2
ẍ = −g sin α (108)
R2 + k 2
R
θ̈ = −g sin α (109)
R2 + k 2
k2
λ = mg sin α (110)
R2 + k 2
k2
∂f
Fx = λ = mg sin α (111)
∂x R2 + k 2
k2
∂f
Fθ ≡ N = λ = −mgR sin α (112)
∂θ R2 + k 2
E.g. The yo-yo A solid disk, mass m radius a, is used in a yo-yo. Use Lagrangians and
Lagrange multipliers to get the acceleration and the tension in the string.
19
Using y (down positive) and φ (clockwise positive) as variables, we can write the
Lagrangian
1 1
L = mẏ 2 + Icm φ̇2 + mgy (113)
2 2
There is a constraint relating y and φ, y − aφ = 0 and for a disk Icm = 12 ma2 . If we
use these two facts the Lagrangian becomes
3
L = mẏ 2 + mgy (114)
4
with the resulting equation of motion quickly reducing to
2
ÿ = g (115)
3
Now we solve the problem without using the constraint to eliminate a dependent
variable. The constraint is f = y − aφ = 0. Start with the modified Lagrangian
1 1
L0 = mẏ 2 + Icm φ̇2 + mgy + λ(y − aφ) (116)
2 2
Then we get three Lagrange equations using variables y, φ and λ
∂L0 d ∂L0
=
∂y dt ∂ ẏ
mg + λ = mφ̈ (117)
∂L0 d ∂L0
=
∂φ dt ∂ φ̇
−λa = Icm φ̈ (118)
∂L0 d ∂L0
=
∂λ dt ∂ λ̇
y − aφ = 0 (119)
Take the second derivative of the last equation, ÿ − aφ̈ = 0, insert the moment of
inertia, and solve the equations to get
1
λ = − mg (120)
3
2g
φ̈ = (121)
3a
2
ÿ = g (122)
3
20
The generalized force associated with y is
∂f 1
Qy = λ = λ = − mg (123)
∂y 3
This is the tension in the string. The generalized force associated with φ is
∂f 1
Qφ = λ = −λa = mga (124)
∂φ 3
and this is the torque on the disk.
This section extends the Lagrangian formulation to systems that might include non-
conservative forces. We will not go into the details, but here is what I understand about the
meaning of the approach. Newton focuses on vector forces. The Europeans contemporaries
of Newton focused on scalar quantities like energy. Bernoulli and D’Alembert made the
connection between the two approaches by introducing the ideas of virtual work.
If the objects in a system are instantaneously displaced from equilibrium by infinitesimal
displacements, subject to satisfying constraint equations, then the virtual work done is
zero. Since we want to deal with non-equilibrium situations, we move the rate of change
of momentum to the force side of the equation and write D’Alembert’s Principle,
X
(F~i − p~˙ ) · δ~ri = 0 (125)
Again we will not go into any detail (and really, neither does the text).
Define a new function, the Hamiltonian which is
X
H= q̇i pi − L (126)
i
It can be shown that this function is just the total energy of a system, H = T + V .
In the Lagrangian formulation we had L = T (qi , q̇1 ) − V (qi ) as a function of generalized
coordinates and their derivatives. We also defined momenta conjugate to the coordinates,
pi = ∂L/∂qi .
21
This equation can be solved (at least in principle) for q̇i = q̇i (q1 , p1 ) and then by using
Hamilton’s Variational Principle we find Hamilton’s canonical equations of motion
∂H
= q̇i (127)
∂pi
∂H
= −ṗi (128)
∂qi
While Lagrangians for a system of n degrees of freedom yields n second order differential
equations, Hamilton’s equations yield 2n first order differential equations.
E.g. 1D Simple Harmonic Oscillator The energies are
1 1
T = mẋ2 V = kx2 (129)
2 2
hence L = mẋ2 /2 − kx2 /2. The conjugate momentum is p = ∂L/∂ ẋ = mẋ and we
invert to get ẋ = p/m. Rewrite the energies in terms of x and p, and add to get H.
p2 kx2
H =T +V = + (130)
2m 2
Hamilton’s canonical equations are
∂H ∂H
= ẋ = −ṗ (131)
∂p ∂x
and doing the derivatives,
p
= ẋ kx = −ṗ (132)
m
The first equation is a restatement of the definition of momentum, and the second is
the same as our Newton’s Law result.
Particle on Cylindrical Surface Subject to a Central Force Imagine an origin sur-
rounded symmetrically by a cylinder of radius R extending in the z-direction. A
particle of mass m is constrained to move on the surface of the cylinder. A force
F~ = −k~r acts on the particle.
The constraint is x2 + y 2 = R2 . The force has an associated potential energy
1 1 1
V = kr2 = k(x2 + y 2 + z 2 ) = k(R2 + z 2 ) (133)
2 2 2
Symmetry suggests the use of cylindrical coordinates, in which v 2 = ṙ2 + r2 θ̇2 + ż 2 ,
and since r = R = Constant,
1
T = m(R2 θ̇2 + ż 2 ) (134)
2
22
The Lagrangian is
1 1
L = m(R2 θ̇2 + ż 2 ) − k(R2 + z 2 ) (135)
2 2
whence we can get expressions for the generalized momenta
(From Classical Dynamics of Particles and Systems, Jerry B. Marion) Here is a bit more
rigorous discussion of Euler’s equations.
We imagine two fixed end points, x1 , x2 and a function y(x) that describes the path taken
between these points. In the Brachistochrone problem this describes the shape of a wire
connecting starting and ending points.
We define a functional that is evaluated on this path. For the Brachistochrone problem
this is the time taken to travel the wire. A useful notation for the functional is
23
This means the functional depends on the function y as well as its derivative dy/dx, and
the parametric variable is x.
We integrate the functional over the range,
Z x2
J= f [y, y 0 ; x]dx (142)
x1
Our goal in the calculus of variations is to find a function y that will produce a stationary
state, that is an extremum for the integral. This desired solution will be called y(0, x).
Introduce variations to this desired solution as
Now we can do some calculus. From above we can write (notice the total derivative of η
in the second equation)
∂y ∂y 0 dη
= η(x) = η0 = (146)
∂α ∂α dx
Z x2
∂J ∂
= f [y, y 0 ; x]dx (147)
∂α ∂α x1
∂f ∂y 0
Z x2
∂f ∂y
= + dx (148)
x1 ∂y ∂α ∂y 0 ∂α
Z x2
∂f ∂f dη
= η+ 0 dx (149)
x1 ∂y ∂y dx
We can evaluate the second term using integration by parts with u = ∂f /∂y 0 and dv =
dη
dx dx. Then
Z x2 Z x2
∂J ∂f ∂f x2 d ∂f
= η dx + 0 η − η dx (150)
∂α x1 ∂y ∂y x1 x1 dx ∂y
24
The variable α is hidden implicitly in y and y 0 . For this to be true for all variations
η(x),
∂f d ∂f
− =0 (152)
∂y dx ∂y
This is Euler’s Equation. When applied in mechanics to the Lagrangian it is called La-
grange’s Equation. Or collectively refer to it as the Euler-Lagrange equation.
E.g. The Brachistochrone problem. Imagine two points with coordinates (x1 , y1 ) and
(x2 , y2 ) connected by a wire of arbitrary shape. A bead can slide along the wire with no
friction. Find the shape of the wire (i.e. y(x)) that minimizes the time taken by the bead
to move between the points. Choose down as positive-x and to the right as positive-y and
assume the bead is at rest at the starting point.
We will determine what the functional is that we wish to evaluate, then use Euler’s rela-
tion.
Since the bead is released from rest, x = 0, when it is at x we can use simple kinematics
to write the speed, v 2 = 2gx. In a short time the bead will travel a distance
s 2
p dy p
ds = dx2 + dy 2 = 1 + dx = 1 + y 02 dx (153)
dx
∂f ∂f y0
=0 0
=p (155)
∂y ∂y x(1 + y 02
y 02 1
= (157)
x(1 + y 02 ) 2a
r
dy x
y0 = = (158)
dx 2a − x
25
This relation defines the relation between y and x that is required to minimize the time.
Now we will show that the relation defines a cycloid. Rearrange and integrate to get y,
using initial condition that x = y = 0 at release.
Z
x
y= √ dx (159)
2ax − x2
We talked about cycloids last quarter, and had the parameterization x = a(1 − cos θ).
Inserting this and doing some algebra we get
Z
y = a(1 − cos θ)dθ = aθ − a sin θ (160)
10.1 Notation
Fowles and Cassiday use δJ for the variation if the integral. Marion indicates that this is
short hand for the following. With y(α, x) = y(0, x) + αη(x),
Z x2
∂J ∂f d ∂f ∂y
δJ = dα = − dα dx (161)
∂α x1 ∂y dx ∂ ẏ ∂α
meaning that
∂J ∂y
dα ≡ δJ dα ≡ δy (163)
∂α ∂α
26