1
PHYS 705: Classical Mechanics
Derivation of Lagrange Equations
from D’Alembert’s Principle
2
D’Alembert’s Principle
Following a similar argument for the virtual displacement to be consistent
with constraints, i.e, f r 0 (no virtual work for f )
i
i i i
We can write down, F p r 0 when we include dynamics,
i
i
(a)
i i
This is the D’Alembert’s Principle.
Again, since the coordinates (and the virtual variations) are not necessary
independent. This does not implies, Fi (a)
p i 0 .
We now need to look into changing variables to a set of independent
generalized coordinates so that we can write ?
j
j
q j 0 and set
the independent coefficients ? j 0 in the sum to zero.
3
Derivation of Lagrange Equations
Break Fi
i
(a)
p i ri 0 into two pieces:
1. F
i
i
(a)
ri (1)
Assume that we have a set of n=3N-K independent generalized coordinates
q j and the coordinate transformation,
r is the position vector in
ri ri q1 , q2 , , qn , t
Cartesian Coordinates
From chain rule, we have
ri
ri qj (note:
ri
t 0 since it is a virtual disp)
j q j t
(Index convention: i goes over # particles and j over generalized coords)
4
Derivation of Lagrange Equations
This links the variations in ri to qj, substituting it into expression (1), we have,
( a ) ri ( a ) ri
F i
(a)
ri Fi
q j
q j Fi
qj
q j
i i j i
j
Defining ri
Q j Fi( a ) as the “generalized forces”
i q j
We can then write,
i ri Q j q j
F
i
(a)
j
(1')
(Note: Qj needs not have the dimensions of force but Q j q j must have
dimensions of work.)
5
Derivation of Lagrange Equations
i :
Now, we look at the second piece involving p
2. p r
i
i i (2) (don’t forget the “-” sign in the original Eq)
mi
ri ri (mass is assumed to be constant)
i
ri
mi
ri qj
q
i j j
ri
mi ri q j (2a )
i
j q j
6
Derivation of Lagrange Equations
Let, go backward a bit. Consider the following time derivative:
d ri d ri ri Note: This is the term
i i
m r mi ri m
r
i i
dt q j dt q j q j from previous page
Rearranging, the term (from the previous page) can be written as,
ri d ri d ri dri
mi ri mi vi mi v i (2b) where v i
q j dt q j dt q j dt
Now, consider the blue and red terms in detail,
7
Derivation of Lagrange Equations
ri
blue term:
q j
Since we have ri ri q1 , q2 , , qn , t , applying chain rule, we have
dri r r
vi i qk i
dt k qk t
Taking the partial of above expression with respect to q j, we have
v i ri
(note: ri does not depend on q )
q j q j j
red term: d ri dri v i
dt q (switching derivative order)
dt q j q j j
Is it ok? Check …
8
explicit check ri ri q1 , q2 , , qn , t
d ri ri ri
LHS: qk
dt q j k qk q j t q j
dri ri ri
q
q j dt q j k qk
RHS: k
t
ri ri qk
qk t note
0
k q j qk q q
j
j
ri ri
qk
k qk q j t
jq
Check! The two terms are the same.
9
Derivation of Lagrange Equations
ri d r d ri
Putting these two terms back into Eq. (2b): mi
ri mi v i i m v
q j dt
i i
q j dt q j
ri d v i v i
mi ri mi vi mi v i
q j dt q j q j
With this, we finally have the following for expression (2):
ri
i i i
p r
i i
j
m r
q j
q j
i
d v i v i
mi v i mi v i qj (2c)
j dt q j q j
i
(reminder: i sums over # particles and j sums over generalized coords)
10
Derivation of Lagrange Equations
We are almost there but not quite done yet. Consider taking the qj derivative of
the Kinetic Energy,
T 1 2 1
2 i i q 2 i i i
m v m v v
q j q j i j i
1 v i vi
mi v i vi
2 i q j q j
v i
mi v i
i q j
Similarly, we can do the same manipulations on T wrt to q j ,
T 1 2 v i
i i i i i q
q j q j i 2
m v m v
j
11
Derivation of Lagrange Equations
Substituting these two expressions into Eq. (2c), we have:
d v i v i
i p i ri j dt i mi vi q i mi vi q q j
j j
d T T
qj
j dt q j q j
Finally, reconstructing the two terms in the D’Alembert’s Principle, we have:
i F (a )
p i ri 0
i
d T T
j Q j dt q q j 0
j q j
12
Derivation of Euler-Lagrange Equations
Now, since all the q j are assumed to be independent variations, the
individual bracketed terms in the sum must vanish independently,
d T T
Qj (3)
dt q j q j
There are 3N-K of these differential equations for 3N-K qj and the solution of these
equations gives the equations of motion in terms of the generalized coords
without explicitly needing to know the constraint forces.
Also, note the advantage of this equation as a set of scalar equations (with T)
instead of the original 2nd law which is a vector equation in terms of forces.
13
E-L Equation for Conservative Forces
Case 1: Fi( a ) derivable from a scalar potential
Fi( a ) iU r1 , r2 , , rN , t (note: U not depend on velocities)
ri ri
Qj F i
(a)
iU
i q j i q j
i ˆ ˆ
j ˆk U x ˆi y ˆj z kˆ
i i i
i xi yi zi q j
U xi U yi U zi
i xi q j yi q j zi q j
U
Qj
q j
14
E-L Equation for Conservative Forces
Putting this expression into the RHS of Eq. (3), we have,
d T T U
Qj
dt q j q j q j
d T T U
0
dt q j q j
Notice that since U does not depends on the generalized velocity q j , we
are free to subtract U from T in the first term,
d T U T U
0
dt q j q j
15
E-L Equation for Conservative Forces
We now define the Lagrangian function L = T – U and the desired
Euler-Lagrange’s Equation is:
d L L
0
dt q j q j
Note: there is no unique choice of L which gives a particular set of
equations of motion. Given G(q, t) being a differentiable function of
the generalized coordinate, then
dG
L ' q, q , t L q, q , t
dt
is a different Lagrangian but will result in the same EOM.
16
E-L Equation for Velocity Dependent Potentials
Case 2: U is velocity-dependent, i.e., U (q j , q j , t )
U d U
In this case, we redefine the generalized force as, Q j
q j dt q j
d T T
Now, substitute this Q j into Q j , we then have,
dt q j q j
d T T U d U
q
dt q j q j q j dt j
17
E-L Equation for Velocity Dependent Potentials
Combing terms using L = T – U, we again have the same Lagrange’s Equation,
d T U T U
0
dt q j q j
d L L
0
dt q j q j
This is the case that applies to EM forces on moving charges q with velocity v,
U q A v where is the scalar potential
1 2
And, L mv q A v and A is the vector potential
2
18
E-L Equation for General Forces
Case 3 (General): Applied forces CANNOT be derived from a potential
One can still write down the Lagrange’s Equation in general as,
d L L
Qj
dt q j q j
Here,
- L contains the potential from conservative forces as before and
- Qj represents the forces not arising from a conservative potential
19
E-L Equation for Dissipative Forces
Example (dissipative friction):
F f k x vx , k y v y , k z v z
For this case, one can define the Rayleigh’s dissipation function:
1
2 i
k xi vxi 2 k yi v yi 2 k zi vzi 2
Then, the friction force for the ith particle can be written as,
F f ,i , , v ,i
vx v yi vzi
i
20
E-L Equation for Dissipative Forces
Plugging this into the component of the generalized force for the
force of friction, we can get,
ri
Q j F f ,i
i q j q j
ri vi
To see this, plug in our earlier relation : , we have
q j q j
v i
Q j F f ,i
i q j
v i
v ,i
i q j q j
21
E-L Equation for Dissipative Forces
Then, the Lagrange’ Equation for the case with dissipation becomes,
d L L
Qj
dt q j q j
q j
- Both scalar function L and must be specified to get EOM.
- L will contain the potential derivable from all conservative forces as
previously.
22
Simple Applications of the Lagrangian Formulation
A particle moving under an applied force F in Cartesian Coordinates :
In 3D, r = (x, y, z) and there will be three diff eqs for the EOMs.
1
The Lagrangian is given by, L T m x 2 y 2 z 2
2
Then, the x-equation is given by,
d L L (Note: Qx Fi
ri
Fx )
Fx x
dt x x i
This gives,
similarly for y & z
d
mx 0 Fx m
rF
dt
23
Simple Applications of the Lagrangian Formulation
Let redo the calculation in Cylindrical Coords with the same applied force F:
The coordinates are: r = (r, q, z) z
1
From before, we have T m x y z
2 2 2
2 r y
Tranformation: x, y , z r ,q , z
r
x r cos q x r sin q q r cos q q
y r sin q y r cos q q r sin q x
zz z z
Expressing T in Cylindrical Coords:
m 2 2 2
T (r q sin q 2rrq sin q cos q r 2 cos 2 q
2
r 2q 2 cos 2 q 2rrq cos q sin q r 2 sin 2 q z 2 )
24
Simple Applications of the Lagrangian Formulation
Combining and canceling like-color terms, we have
m 2 2 2
T (r r q z 2 ) (*)
2
It is constructive to consider the following alternative way to get to this expression,
Let try to express the speed in T in cylindrical coordinates,
z Start with the position vector r,
zzˆ r r rˆ z zˆ
r y Taking the time derivative,
dr d rˆ Note: the directional
rrˆ v r rrˆ z zˆ vectors rˆ change in
dt dt time as the particle
x
moves
25
Simple Applications of the Lagrangian Formulation
To examine on how these directional vectors changes, consider the following
infinitesimal change,
r (t ') Notice that,
y
drˆ ˆ
qθ
r (t ) d rˆ dq θˆ dt
d θˆ dq rˆ d θˆ
qrˆ
drˆ
dθˆ θ̂ rˆ '
dt
θˆ ' r̂
dq t ' t dt x
dr drˆ
Back to the v vector, r rrˆ z zˆ rqθˆ rrˆ z zˆ
v
dt dt
m m
v rq r 2 z 2 and T v 2 ( r 2 r 2q 2 z 2 )
2
2
So,
2 2
26
Simple Applications of the Lagrangian Formulation
Now, let calculate the generalized force in cylindrical coordinates,
r:
r r
Qr F Since, r r rˆ z zˆ , we have rˆ
r r
So, Qr F rˆ Fr
q:
r r rˆ q θˆ
Qq F r r r θˆ (recall previous page)
q q q q
So, Qq F rθˆ rFq (this looks like torque)
z:
r
Qz F F zˆ Fz
z
27
Simple Applications of the Lagrangian Formulation
m 2 2 2
The EOM is then given by: Recall, T ( r r q z 2 )
2
d T T
r: Fr mr mq 2 r Fr
dt r r
q : d T T rFq
d
mr 2q rFq (this is
dL
N)
dt q q dt dt
mr 2q m2rrq rFq
m rq 2rq Fq
d T T d
z: Fz mz Fz mz Fz
dt z z dt
28
Simple Applications of the Lagrangian Formulation
Putting the components of F together,
F Fr rˆ Fq θˆ Fz zˆ
F m
r q 2 r rˆ m rq 2rq θˆ mzzˆ (*)
Is that the same F mr that we have gotten previously in Cartesian Coords?
Check: v r rqθˆ rrˆ z zˆ
r
dv d ˆ
dt dt
=
rq θ rrˆ z zˆ
rr
dt
d ˆ ˆ drˆ
q θ rq θ r
dt
rrˆ
z zˆ
dθˆ ˆ drˆ
r q q θ rq θ r
ˆ rrˆ
z zˆ
dt dt
29
Simple Applications of the Lagrangian Formulation
Using the directional vectors relations that we had earlier,
d θˆ drˆ ˆ
qrˆ , qθ
dt dt
r r q qrˆ qθˆ rqθˆ r qθˆ
rrˆ
z zˆ
Collecting all terms in the same direction,
r rq 2 rˆ rq 2rq θˆ
r z zˆ
So the EOM in (*) on the previous page is indeed F mr , i.e.,
r q 2 r rˆ rq 2rq θˆ
F m z zˆ m
r