Professional Documents
Culture Documents
Thesis by
Anil N. Hirani
Advisors
James R. Arvo, Jerrold E. Marsden
April 2000
ii
c
April 2000
Anil N. Hirani
All rights Reserved
iii
Acknowledgements
I'd like to thank my advisors Prof. Jerrold E. Marsden and Prof. Jim Arvo for their invalu-
able help and advice. The comments made by the members of my candidacy committee
were also very helpful. Besides my two advisors, the committee members were Professors
Peter Schroder, Alan Barr and Tom Hou. I am also thankful to Matthew West and Mathieu
Desbrun for some very helpful suggestions. In the text I've cited the specic result where
Matthew's suggestions were most important. Mathieu was also generous with his advice
and gave me some very good suggestions. Once, he gave me a table of coecients for nite
dierences and that really helped precipitate the completion of this work. Discussions with
Antonio Hernandez, Dong-Eui Chang and Sameer Jalnapurkar on some geometric mechanics
derivations were also helpful.
iv
v
LINEARIZATION METHODS FOR VARIATIONAL
INTEGRATORS AND EULER-LAGRANGE EQUATIONS
by
Anil N. Hirani
In Partial Fulllment of the
Requirements for the Degree of
Master of Science in Computer Science
Abstract
Hamiltonian systems arise in a wide variety of idealized physical systems and Hamilton's
equations often must be solved numerically. In general, traditional nite dierence methods
for numerically integrating ordinary dierential equations do not take into account the
special structure of Hamilton's equations. One would like the numerical solution to preserve
some or all of the properties of the continuous time solution. Variational integrators, also
called discrete Euler-Lagrange equations in this thesis, provide a way to do that.
This thesis is about dierentiating, i.e linearizing Euler-Lagrange equations and discrete
Euler-Lagrange equations by dierentiating the Lagrangian or discrete Lagrangian. The
original motivation for dierentiating the Lagrangian was to develop higher order varia-
tional integrators. However it was found that the resulting intgerators are not higher order.
Nonetheless, the pursuit of this goal turned up several interesting results :
i. Dierentiating a Lagrangian along the acceleration, i.e along (q; _ q ) results in the
Euler-Lagrange equation 0 = 0 (Lemma 2, page 20).
ii. Dierentiating a Lagrangian along a general direction (u; u_ ), determining the Euler-
Lagrange equation and then setting u = q_ results in an Euler-Lagrange equation that
is the time derivative of the original Euler-Lagrange equation corresponding to the
original Lagrangian (Lemma 3, page 21).
iii. A similar operation on the discrete Lagrangian gives a \discrete time derivative" of
the discrete Euler-Lagrange equation corresponding to the original discrete Lagrangian
(Lemma 4, page 24).
iv. The operations described in the previous two items are part of a commutative diagram
(Theorem 1, page 28).
v. Numerical measurements and analytical calculation of order of accuracy for specic
examples using this approach show that higher order methods are not obtained in
general (Chapter 5, especially Section 5.4 and 5.5).
vi. The manifold consisting of triples that satisfy a discrete Euler Lagrange equation is a
smooth manifold (Proposition 4, page 36).
vii. The algorithm on TQ × TQ is symplectic and the algorithm that updates triples of
points on Q is presymplectic (Theorem 2, page 37).
vi
I also give a derivation of a symplectic form on TQ × TQ where Q is the conguration
manifold. Most proofs given in this thesis are done using local coordinates. A possible
direction for further study is to give intrinsic proofs in order to gain a deeper understanding
of the geometric meaning of the operations of this thesis.
vii
Table of Contents
Acknowledgments iii
Abstract v
1 Introduction 1
1.1 Variational Integrators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Preliminaries 7
2.1 Lagrangian Mechanics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3 Hamiltonian Mechanics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.4 Legendre Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.5 Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3 Variational Integrators 13
3.1 Discrete Mechanics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.2 Invariance Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4 Linearization 15
4.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.2 Dierentiating Lagrangian along (q; _ q ) . . . . . . . . . . . . . . . . . . . . . . 16
4.3 Continuous Time Linearization . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.4 Discrete Time Linearization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.5 Discrete and Continuous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.6 Linearization Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.7 Invariance Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.7.1 Symplectic form on TQ × TQ . . . . . . . . . . . . . . . . . . . . . . . 31
4.7.2 Presymplectic algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5 Examples and Conclusion 39
5.1 Falling Particle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5.1.1 Continuous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5.1.2 Discrete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
5.2 Simple Harmonic Oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
5.2.1 Continuous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
5.2.2 Discrete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
5.3 Dung Oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
5.3.1 Continuous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
viii
5.3.2 Discrete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
5.4 Numerical Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
5.5 Accuracy Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
5.6 Using more accurate uk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
5.7 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Bibliography 55
1
Chapter 1
Introduction
The traditional method of numerically solving the initial value problem (IVP) for ordinary
dierential equations (ODEs) is to discretize derivatives by nite dierences. For example
for q ∈ R and the equation
dq = f(q; t); (1.1)
dt
one can choose a step size h for stepping the time discretely and replace the left hand side
of (1.1) by
qk+1 - qk :
h
Much of the development of numerical methods for IVPs has concerned itself with what to
do with the right hand side of equation (1.1) in order to discretize the equation completely.
The development has resulted in a well developed theory of truncation errors (accuracy),
stability, and convergence. The books by Hairer et.al [6], Lambert [11], Gear [3] and Iserles
[8] are excellent sources of information about numerical methods for ODEs. The table of
coecients for nite dierence approximations for various order derivatives on pages 16 and
17 of Fornberg's book [1] is also quite handy.
But consider now the following simple system of equations, given a scalar function
H : R × R ! R such that
q_ @H (1.2)
=
@p
p_ @H :
= -
@q
This is an example of a Hamiltonian system of equations, which is the form that many
idealized equations in physical sciences take. Some equations that may not at rst appear
to be in this form are also actually Hamiltonian in a sense dened in Chapter 2 and in
Chapter 5 of the book by Marsden and Ratiu [15].
Some examples of equations that are Hamiltonian are : equation of a particle in a
potential, rigid body equations, rigid body with a xed point in gravitational eld, Euler
equations for an ideal, incompressible
uid, Maxwell-Vlasov equations for a collisionless
plasma, Maxwell's equations and many others. The study and solution of Hamiltonian
equations is thus a subject with a long tradition.
2
It can be shown that for such an equation like (1.2) the function H is constant along
solutions,i.e H_ (q(t); p(t)) = 0 for all time t if (q(t); p(t)) is a solution of the equations 1.2.
If equation (1.2) is discretized using an arbitrary method there is no guarantee that the
discrete solutions will also satisfy the property of keeping H constant along solutions. Even
worse, there may be a systematic biased error introduced which will make the computed
solution drift from the true solution. Since H is often the energy of the system this is not
acceptable for many situations. Another important property of Hamiltonian equations is
that the
ow is symplectic, i.e the
ow of the vector eld dened by the equations preserves
a certain dierential form (this will be dened in Chapter 2). One consequence of symplectic
ow is that areas in phase space are conserved. An arbitrary discretization of equation (1.2)
may not yield an algorithm that is symplectic.
However, one would like a numerical solution to have some of these properties like
energy conservation or symplecticness. For example, Figures 1.1 and 1.2, which are taken
from Iserles and Zanna [7] show how initial conditions evolve under the forward Euler and
implicit midpoint methods. The smiley face shown is a cloud of initial conditions which
are followed over time. The equation being solved is that of a simple harmonic oscillator,
namely q + q = 0 and so the smiley face should just rotate rigidly through phase space. But
in Figure 1.1 the smiley face enlarges. Figure 1.2 shows the ideal behavior. The particular
implicit method used in Figure 1.2 is symplectic, so it conserves phase space area as one
steps through time.
To see a comparison of the momentum and energy behavior of fourth order non sym-
plectic Runge-Kutta versus that of a symplectic algorithm please refer to Figure 13 on page
18 of Marsden et.al [12]. It is shown there that the non symplectic Runge-Kutta method
does not preserve momentum while the symplectic method does. Furthermore, the energy
computed by symplectic methods appears to stay near the true value while that computed
by the Runge-Kutta method does not. The behavior displayed by the symplectic integrators
in Figure 13 of Marsden et. al [12] is in some sense the best possible because of a theorem
proved in Ge and Marsden [2], that a constant time stepping integrator cannot preserve
the symplectic form, momentum, and energy simultaneously. However, Kane et.al [9] show
that by using adaptive time stepping and an appropriate denition of symplecticness one
can indeed get symplectic, momentum and energy preserving algorithms.
In developing symplectic integrators early researchers used generating functions (which
are symplectic transformations) and Hamilton-Jacobi equation. A more recent approach is
to create variational integrators using discrete Euler-Lagrange equations, a method which
is described in the next section.
Figure 1.1: Phase
ow for harmonic oscillator as approximated by forward Euler method.
Horizontal axis is position and vertical axis is momentum. The upright (rightmost) smiley
face is a collection of initial conditions and others are the location of the collection at various
times. From Iserles and Zanna [7].
At least this was the current wisdom when I started working on this problem. In recent
work Kane et.al [10] and West [17] have shown that the discrete Lagrangian should be
considered to be an approximation for the action integral over one time step. But this
point of view will not be explored in this thesis.
Roughly speaking, the method used in this thesis is to replace the position variable by
some position and the velocity variable in the Lagrangian by some nite dierence. Finally
one replaces a variational principle in which an integral appears by one in which a sum
appears. Extremizing according to the principle yields a discrete Euler-Lagrange equations
which form the basis for the algorithm. It can be proved that the algorithm is symplectic
and momentum preserving.
1.2 Results
In this thesis I present some results regarding dierentiating, i.e linearizing Lagrangians
and discrete Lagrangians, the resulting Euler-Lagrange and discrete Euler-Lagrange equa-
tions and the connections between all these. The original motivation for dierentiating the
Lagrangian was to develop higher order variational integrators. However it was found that
the resulting intgerators are not, in general, higher order. Thus the discrete side results
4
Figure 1.2: Phase
ow for harmonic oscillator as approximated by implicit midpoint rule.
Horizontal axis is position and vertical axis is momentum. The upright (rightmost) smiley
face is a collection of initial conditions and others are the location of the collection at various
times. From Iserles and Zanna [7].
described below are not computationally useful. Nonetheless, the pursuit of this goal turned
up several interesting results :
i. Dierentiating a Lagrangian along the acceleration, i.e along (q; _ q ) results in the
Euler-Lagrange equation 0 = 0 (Lemma 2, page 20).
ii. Dierentiating a Lagrangian along a general direction (u; u_ ), determining the Euler-
Lagrange equation and then setting u = q_ results in an Euler-Lagrange equation that
is the time derivative of the original Euler-Lagrange equation corresponding to the
original Lagrangian (Lemma 3, page 21).
iii. A similar operation on the discrete Lagrangian gives a \discrete time derivative" of
the discrete Euler-Lagrange equation corresponding to the original discrete Lagrangian
(Lemma 4, page 24).
iv. The operations described in the previous two items are part of a commutative diagram
(Theorem 1, page 28).
v. Numerical measurements and analytical calculation of order of accuracy for specic
examples using this approach show that higher order methods are not obtained in
general (Chapter 5, especially Section 5.4 and 5.5).
5
vi. The manifold consisting of triples that satisfy a discrete Euler Lagrange equation is a
smooth manifold (Proposition 4, page 36).
vii. The algorithm on TQ × TQ is symplectic and the algorithm that updates triples of
points on Q is presymplectic (Theorem 2, page 37).
I also give a derivation of a symplectic form on TQ × TQ where Q is the conguration
manifold. The structure of the rest of this thesis is as follows. Chapter 2 is a quick review of
continuous time Lagrangian and Hamiltonian mechanics. Chapter 3 introduces variational
integrators and Chapter 4 describes the linearization results mentioned above. Chapter 5
gives examples of linearization on both the continuous and the discrete side. In this chapter
I also do some derivations of order of accuracy calculations. These are accompanied by
results from numerical experiments for measuring order of accuracy. Both, the numerical
experiments and the analytical calculations show that our method does not, in general, give
higher order symplectic integrators.
6
7
Chapter 2
Preliminaries
Before developing the theory and describing the linearization method I will give some nec-
essary denitions, standard results and examples. This section is adapted primarily from
Lecture 5 of Marsden [13] and from Chapters 2 and 5 of the book by Marsden and Ratiu
[15].
2.2 Geometry
Definition 2 If f : M ! R is a smooth function on a dierentiable manifold M then it can
be dierentiated at any point m ∈ M to obtain a map Tmf : TmM ! Tf(m)R. The tangent
space of R can be identied with itself since R is a vector space. This gives us a linear map
df(m) : TmM ! R. Thus df(m) ∈ Tm ∗
M, the dual of the vector space TmM. This map df
8
is called the differential of f. The directional derivative in the direction v ∈ TmM is
dened to be df(m) · v.
Definition 3 A symplectic form
on a vector space Z is a nondegenerate skew sym-
metric, bilinear form on Z. The pair (Z;
) is called a symplectic vector space. The
form
is said to be (weakly) nondegenerate if
(z1 ; z2 ) = 0 for all z2 ∈ Z implies
z1 = 0.
It can be shown that there is a basis for Z in which
(u; v) = uT J v
for all u; v ∈ Z and where
0 I
J=
-I 0
where 0 and I are n × n zero and identity matrices for a symplectic vector space Z of dimen-
sion 2n. Thus nite dimensional symplectic vector spaces always have an even dimension.
For an example of a symplectic vector space consider Z = W × W ∗ where W is a vector
space and W ∗ is its dual. The canonical symplectic form
on Z is dened as
((w1 ; 1 ); (w2 ; 2 )) = 2 (w1 ) - 1 (w2 )
where w1 ; w2 ∈ W and 1 ; 2 ∈ W ∗.
Definition 4 A symplectic manifold is a pair (P;
), where P is a manifold and
is a
closed (weakly) non degenerate two-form on P.
An example of a symplectic manifold is the cotangent bundle of the congurations space.
Let the manifold Q be the conguration space of a mechanical system. Then TQ is the
disjoint union (over all points of Q) of the tangent spaces and is called the tangent bundle.
At each point p ∈ Q the tangent space TpQ is a vector space and hence there is an associated
dual vector space Tp∗Q. The disjoint union of all these over all the points of the manifold is
the cotangent bundle T ∗Q and it is a symplectic manifold.
Definition 5 Let (P1 ;
1 ) and (P2;
2 ) be symplectic manifolds. A C1 -map ' : P1 ! P2
is called symplectic or canonical if
'∗ (
2 ) =
1 :
This pull-back notation means that for all q ∈ P1, and all v; w ∈ TqP1
1p (v; w) =
2'(p) (Tp' · v; Tp' · w) (2.3)
where
1p means
1 evaluated at point p and Tp' is the derivative of ' at p. An important
result (see e.g Chapter 5 of Marsden and Ratiu [15]) is
Proposition 1 A smooth canonical transformation between symplectic manifolds of
the same dimension is volume preserving and is a local dieomorphism.
9
2.3 Hamiltonian Mechanics
The motivation for these denitions above concerning symplectic manifolds and maps is
the following proposition which is proved by Marsden and Ratiu in Chapter 2 of their book
[15]. But rst we need a denition of Hamiltonian vector eld on a symplectic manifold.
Definition 6 Let (P;
) be a symplectic manifold. A vector eld X on P is called Hamil-
tonian if there is a function H : P ! R such that for all v ∈ TzP
z (X(z); v) = dH(z) · v:
In this case one writes XH for X. Hamilton’s equations are the evolution equations
z_ = XH (z).
Proposition 2 The
ow 't of a Hamiltonian vector eld XH consists of canonical
(i.e symplectic) transformations. Conversely if the
ow of a vector eld X consists of
canonical transformations, then it is Hamiltonian.
2.5 Algorithms
Definition 9 An algorithm on a phase space P is a collection of maps Fh : P ! P, usually
depending smoothly on h ∈ R for small h > 0. Advancing the solution zk by one time step
can be written as zk+1 = Fh (zk ). This means advancing time by h which is also called the
step size. Here all zk ∈ P.
Definition 10 An algorithm Fh is
11
i. a symplectic integrator if each Fh is symplectic,
ii. an energy integrator if H ◦ Fh = H,
iii. a momentum integrator if J◦ Fh = J, where J is the momentum map for the action
of a Lie group G.
Remark 1 It has been shown by Ge and Marsden [2] that a xed step size numerical
integrator can only be symplectic and momentum preserving or energy and momentum
preserving. In the remainder of this thesis I will refer to symplectic-momentum integrators
as simply symplectic integrators.
Remark 2 In this thesis I will not address the momentum conservation issue and I will not
give the denitions for the terms used in the denition of a momentum integrator above.
These can be found in Wendlandt and Marsden [20] and in the references contained therein.
12
13
Chapter 3
Variational Integrators
Chapter 4
Linearization
In this chapter I will describe our method for dierentiating, i.e linearizing Euler-Lagrange
equations and variational integrators by manipulating the Lagrangian and the discrete La-
grangian. This manipulation is such that in the continuous case, applying the appropriate
variational principle yields a continuous time derivative of the Euler-Lagrange equation
corresponding to the original Lagrangian. In the discrete case, the discrete Lagrangian is
manipulated and the discrete variational principle yields a \discrete time derivative" of the
discrete Euler-Lagrange equations corresponding to the original discrete Lagrangian. If the
original discrete Euler-Lagrange equation is linear, the discrete time derivative is simply a
nite dierence.
Of course, to linearize continuous (or discrete) Euler-Lagrange equations one could just
as well start with the equation and take its derivative (or nite dierence). But as men-
tioned in Section 1.2, my original aim which led to the present results, was to modify the
Lagrangian and then examine the resulting Euler-Lagrange equations. This is because the
discretization of the Euler-Lagrange equations is generated from the Lagrangian and not
from the continuous time equations.
4.1 Motivation
Consider the discrete Euler-Lagrange equation which gives the symplectic algorithm as
described in Chapter 3. This is repeated here for convenience :
D1 Ld ◦ + D2 Ld = 0 (4.1)
where : Q × Q ! Q × Q is dened implicitly by the above equation and (qk-1 ; qk ) =
(qk ; qk+1 ). Since Ld : Q × Q ! R, the resulting algorithm map takes a pair of points
(qk-1 ; qk ) ∈ Q and produces a pair (qk ; qk+1 ). It is reasonable to conjecture that an
algorithm that is able to use more points, say 3 points, might result in a better truncation
error since 2 points allow one to approximate derivative and 3 will allow one to approximate
acceleration as well. This was the motivation for our subsequent ideas that led to the
linearization methods of this thesis. Thus, what is desired is an algorithm map (2) :
Q × Q × Q ! Q × Q × Q.
16
Hamilton's Principle
L(q; q_ ) −−−−−−−−−−−−−! EL(L) is second order
? ?
L(2) (q; q;_ q ) −−−−−−−−−−−−−!
Hamilton's Principle
EL(L(2) ) is fourth order
Figure 4.1: On the left q has been introduced into the Lagrangian but on the right the
equations go from being second to fourth order.
acceleration into the Lagrangian. On the right one sees that the Euler-Lagrange equations
skip an order and go from being second order to fourth order. The question marks indicate
an as yet unspecied operation. What is the most obvious operation one can perform on
L(q; q_ ) to introduce acceleration? The answer is dierentiation. Thus one might expect the
question mark on the right down arrow to perhaps represent dierentiation also.
However, as it turns out, when the second order Euler-Lagrange equations for L(q; q_ )
namely equation (2.2) are dierentiated one gets a third order equation as shown by the
following calculation (using implied summation convention where necessary). First, by
dierentiating the Euler-Lagrange equations for L(q; q_ ) we get :
d d @L (q; q_ ) - @L (q; q_ ) = 0: (4.4)
dt dt @q_ i @qi
But the left hand side of the above equation is
d @2 L q_ j + @2 L q j - @2 L q_ j - @2 L q j ; (4.5)
dt @qj @q_ i @q_ j @q_ i @qj @qi @q_ j @qi
17
which is
@2 L qj + q_ j @3 L q_ k + @3 L qk +
=
@qj @q_ i @qk @qj @q_ i @q_ k @qj @q_ i
@2 L ...q j + q j @3 L q_ k + @3 L qk -
@q_ j @q_ i @qk @q_ j @q_ i @q_ k @q_ j @q_ i
@2 L q_ j - @2 L q j
@qj @qi @q_ j @qi
@2 L qj + @3 L q_ k q_ j + @3 L qk q_ j +
=
@qj @q_ i @qk @qj @q_ i @q_ k @qj @q_ i
@ L ...q j + @3 L q_ k q j + @3 L q k q j -
2
@q_ j @q_ i @qk @q_ j @q_ i @q_ k @q_ j @q_ i
@2 L q_ j - @2 L q j
@qj @qi @q_ j @qi
Therefore the dierentiation of the Euler-Lagrange equation for L(q; q_ ) gives the following
equation :
@2 L qj + @3 L q_ k q_ j + @3 L qk q_ j +
@qj @q_ i @qk @qj @q_ i @q_ k @qj @q_ i
@2 L ...q j + @3 L q_ k q j + @3 L q k q j -
@q_ j @q_ i @qk @q_ j @q_ i @q_ k @q_ j @q_ i
@2 L q_ j - @2 L q j = 0: (4.6)
@qj @qi @q_ j @qi
This equation (4.6) is third order. Thus the diagram in Fig. 4.1 will not commute if down
arrows are thought of as dierentiation. On the right one needs to go to a third order
Euler-Lagrange equation.
However if L(2) (q; q;
_ q ) was only linear in q then the term
@L(2)
@q i
in equation (4.2) will be a function only of q and q_ as a result of which
d2 @L(2)
dt2 @q i
will only be a third order term. The Euler-Lagrange for such a Lagrangian will be third
order. As the left down arrow was being thought of as dierentiation this might work out.
This suggests getting L(2) (q; q;_ q ) from L(q; q_ ) by simply formally dierentiating L(q; q_ )
with respect to time. If L(q; q_ ) is simply formally dierentiated wrt t then one gets
@L q_ i + @L q i
L(2) (q; q;_ q) = @q (4.7)
i @q_ i
Note that now L(2) (q; q;
_ q ) is linear in q , as desired. Now the next step ought to be to try
18
Hamilton's Principle
L(q; q_ ) −−−−−−−−−−−−−! EL(L) is second order
dierentiate
dierentiate
L(2) (q; q;_ q )
−−−−−−−−−−−−−! EL(L(2) ) is third order
linear inq Hamilton's Principle
Figure 4.2: On the left q has been introduced into the Lagrangian by dierentiating L.
Since L(2) is linear in q , EL(L(2) ) should be third order. But there is a major problem as
is explained in the text.
and see if the diagram in Figure 4.2 commutes. But that will not be worthwhile because
of the two Lemmas that follow. Lemma 1 below shows that for Lagrangians L of a certain
type, when L(2) is obtained as in equation (4.7) and Hamilton's principle is applied using
Lagrangian L(2) one gets the trivial identity 0 = 0 for the Euler-Lagrange equations. The
next Lemma 2 removes the restriction on the form of Lagrangian. 1
Lemma 1 Let the L be of the form
L(q; q_ ) = LT (q_ ) + LV (q) (4.8)
(The superscripts T and V are reminders that the term LT (q_ ) is the kinetic energy
and the term LV (q) is minus the potential energy term). Construct a new Lagrangian
L(2) (q; q;_ q ) as
@L q_ i + @L q i
L(2) (q; q;_ q) = @q (4.9)
i @q_ i
For such a Lagrangian L(2) the Hamilton's principle gives no information about the
evolution of state, i.e the Euler-Lagrange equation for L(2) is 0 = 0.
Proof When the Lagrangian of the form (4.8) is dierentiated to get L(2) dened by
equation (4.9)
T i @LV i
L(2) (q; q;_ q ) = @L
@q_ i q + @qi q_ (4.10)
is obtained since the other terms are 0: Dene
L(T )(q;_ q ) ≡
@LT q j (4.11)
@q_ j
L(V )(q; q_ ) ≡
@LV q_ j
@qj
1 The more general result in Lemma 2 was suggested by Matthew West when I showed him Lemma 1.
19
Now the Euler-Lagrange equation for L(2) (q; q;
_ q ), namely equation (4.2) is
@L(T ) - d @L(T ) + d2 @L(T ) +
@qi dt @q_ i dt2 @q i (4.12)
(V )
@L - d @L(V ) + d2 @L(V ) = 0
@qi dt @q_ i dt2 @q i
Substitute for L(T ) and L(V ) from equation (4.11) into equation (4.12) and consider the L(T )
and L(V ) parts separately. The L(T ) part of equation (4.12) becomes
d @L(T ) + d2 @L(T )
0 - dt @q_ i dt2 @q i
d @ @LT q j + d2 @ @LT q j
=-
dt @q_ i @q_ j dt2 @q i @q_ j
2 T
d @ L q j + d2 @LT
=-
dt @q_ i @q_ j dt2 @q_ i
2 T 2 T
d @ L j d @ L j
=-
dt @q_ i @q_ j q + dt @q_ j @q_ i q
=0
where the last step follows from the equality of mixed partials. Similarly the L(V ) part of
equation (4.12) becomes
@L(V ) - d @L(V ) + 0
@qi dt @q_ i
@ @LV q_ j - d @ @LV q_ j
=
@qi @qj dt @q_ i @qj
@ L q_ j - d @LV
2 V
=
@qi @qj dt @qi
@ L q_ j - @LV q_ j
2 V
=
@qi @qj @qj @qi
= 0
where again the last step follows from the equality of mixed partials. Thus equation (4.12)
becomes the trivial identity 0 = 0:
Remark 3 The type of Lagrangian L assumed in Lemma 1 arises commonly. Some common
examples would be : a particle in, say, a cubic potential eld where
2
L(q; q_ ) = m q_2 + q3
or a simple pendulum of length l for which
2 _2
L(; _ ) = l 2 + gl cos :
20
The restriction on the form of Lagrangian can be removed as is shown by the following
more general result.
Lemma 2 Let L be any suciently smooth function of q and q_ . Construct a new
Lagrangian L(2) (q; q;_ q ) as
@L q_ i + @L q i
L(2) (q; q;_ q) = @q (4.13)
i @q_ i
For this Lagrangian L(2) the Hamilton's principle gives no information about the evo-
lution of state, i.e the Euler-Lagrange equation for L(2) is 0 = 0.
Proof The Euler-Lagrange equation corresponding to the Lagrangian L(2) is
d2 @L(2) - d @L(2) + @L(2) = 0 (4.14)
dt2 @q i dt @q_ i @qi
for i = 1; : : : ; n. The rst term of this equation is (summation over repeated indices)
d2 @L(2) = d2 @L
dt2 @q i dt2@q_ i
d @ 2L j @2L j
=
dt @qj @q_ i q_ + @q_ j @q_ i q
@2 L q j + d @2 L q_ j + @2 L ...q j + d @2 L q j (4.15)
=
@qj @q_ i dt @qj @q_ i @q_ j @q_ i dt @q_ j @q_ i
The second term of equation (4.14) is
d @L(2) = d @2 L q_ j + @L + @2 L q j
dt @q_ i dt @q_ i @qj @qi @q_ i @q_ j
@2 L qj + d @2 L q_ j + @2 L q_ j + @2 L q j
=
@q_ i @qj dt @q_ i @qj @qj @qi @q_ j @qi
@2 L ...q j + d @2 L qj (4.16)
+
@q_ i @q_ j dt @q_ i @q_ j
and the last term of equation (4.14) is
@L(2) = @2 L q_ j + @2 L q j (4.17)
@qi @qi @qj @qi @q_ j
Substituting the expressions (4.15), (4.16) and (4.17) in equation (4.14) and using equality
of mixed partials one nds that the left hand side of equation (4.14) is 0 thus completing
the proof.
Thus dierentiating the Lagrangian along (q; q_ ) apparently does not make the diagram
4.2 commute. Section 4.3 below shows how this can be remedied by a dierent approach
to make it work. This results in continuous time linearization of the Euler-Lagrange equa-
tions. Section 4.4 shows a similar discrete time linearization of the discrete Euler-Lagrange
equations.
21
4.3 Continuous Time Linearization
In Section 4.2 the Lagrangian L was dierentiated along the acceleration vector (q; _ q) to
get a new Lagrangian L(2) which was linear in q . I showed that this new Lagrangian L(2)
yields an Euler-Lagrange equation which is a trivial identity. Now I will generalize this
idea of dierentiating L to get a new Lagrangian but this time the new Lagrangian does
yield a nontrivial Euler-Lagrange equation. Then I will describe and prove the relationship
between dierentiating the Lagrangian and the corresponding Euler-Lagrange equations.
Given L : TQ ! R, and q ∈ Q the dierential of L at (q; q_ ) ∈ TqQ is the map dL(q; q_ ) :
T(q;q_ ) TQ ! T R = R: See Section 2.2, Denition 2 for details. In Section 4.2, I wrote
@L (q; q_ ) · q_ i + @L (q; q_ ) · q i
L(2) (q; q;_ q) = dL(q; q_ ) · (q;_ q ) = @q (4.18)
i @q_ i
and found that the Euler-Lagrange equation for L(2) is 0 = 0. In equation (4.18) the
dierentiation is along the acceleration vector (q;_ q ) which is in TTQ at (q; q_ ). (Actually
to be correct one should really write such an element of TTQ as (q; q; _ q ) or even better, as
(q; q;
_ q;
_ q )). The obvious generalization of this dierentiation is to dierentiate along an
arbitrary vector in TTQ. With this view let vq ∈ TqQ and let wvq ∈ TvqTQ: Dene L(2) by
L(2) (wvq ) ≡ dL(vq ) · wvq (4.19)
In coordinates one writes vq = (q; q_ ) and wvq = (q; q; _ u; u_ ) where u ∈ TqQ and u is not
necessarily equal to vq = (q; q_ ). Thus in local coordinates equation (4.19) is
@L (q; q_ ) · ui + @L (q; q_ ) · u_ i
L(2) (q; q;_ u; u_ ) ≡ @q (4.20)
i @q_ i
We now introduce the notation EL(L) to represent the Euler-Lagrange equations corre-
sponding to a Lagrangian L. The main result of this section is that dierentiating EL(L)
results in the same equations that are obtained by rst dierentiating L to get L(2) , nding
EL(L(2) ) and setting u = q_ . This is summarized in the following Lemma.
Lemma 3 The following diagram commutes
EL(L) −−−−! EL(L(2) )ju=q_
(4.21)
L −−−−! L(2)
Proof First I will describe how to read the commutative diagram above. The up arrows
mean apply Hamilton's principle and the result is the Euler-Lagrange equations correspond-
ing to the Lagrangian one starts with at the bottom. The right arrows indicate dierentia-
tion. The top right arrow is dierentiation wrt t. The bottom right arrow is dierentiating
as in (4.20). The notation ju=q_ in the top right corner only makes sense if one arrives at
that corner from the bottom.
To be specic here is how the various paths through the diagram should be read. Start
at bottom left corner. Going up and then right means starting with the Lagrangian L nd
the Euler-Lagrange equation corresponding to it and then dierentiate that equation wrt t.
22
On the other hand the path going right and then up means, dierentiate L as in (4.20)
which gives an expression for L(2) in terms of L. Then nd the Euler-Lagrange equation
for this Lagrangian. Finally substitute u = q_ . The resulting equations will be the same as
those obtained by the up and right path.
I will now give a local coordinate proof of the commutativity of (4.21). I have already dif-
ferentiated EL(L) and the result is given in equation (4.6). Thus the result of dierentiating
EL(L) can be considered to be the EL(L) itself and the linearized EL(L) in equation (4.6).
Let us now see what one gets by writing EL(L(2) ) in terms of the original Lagrangian L .
Since L(2) (q; q;
_ u; u_ ) has 2 independent variables q and u it follows that EL(L(2) ) consists
of the two equations
d @L(2) - @L(2) = 0 (4.22)
dt @q_ i @qi
d @L(2) - @L(2) = 0 (4.23)
dt @u_ i @ui
The left hand side of equation (4.22) when written in terms of L is equivalent to
d @ @L uj + @L u_ j - @ @L uj + @L u_ j (4.24)
dt @q_ i @qj @q_ j @qi @qj @q_ j
d @ L uj + @ L u_ j - @ L uj + @2 L u_ j
2 2 2
(4.25)
=
dt @q_ i @qj @q_ i @q_ j @qi @qj @qi @q_ j
@ L u_ j + uj d @ L + @ L u j + u_ j d @2 L -
2 2 2
=
@q_ i @qj dt @q_ i @qj @q_ i @q_ j dt @q_ i @q_ j
2 2
@ L uj - @ L u_ j :
@qi @qj @qi @q_ j (4.26)
Now
d @2 L = @3 L q_ k + @3 L q k (4.27)
dt @q_ i @qj @qk @q_ i @qj @q_ k @q_ i @qj
d @2 L = @3 L q_ k + @3 L q k (4.28)
dt @q_ i @q_ j @qk @q_ i @q_ j @q_ k @q_ i @q_ j
Thus one equation of EL(L(2) ) obtained by substituting (4.27) and (4.28) in (4.26) is
@2 L u_ j + @3 L uj q_ k + @3 L uj qk + (4.29)
@q_ i @qj @qk @q_ i @qj @q_ k @q_ i @qj
@2 L u j + @3 L u_ j q_ k + @3 L u_ j q k -
@q_ i @q_ j @qk @q_ i @q_ j @q_ k @q_ i @q_ j
@2 L uj - @2 L u_ j = 0
@qi @qj @qi @q_ j
23
When one sets u = q_ one equation of EL(L(2) )ju=q_ in terms of L is obtained as
@2 L q j + @3 L q_ j q_ k + @3 L q_ j qk + (4.30)
@q_ i @qj @qk @q_ i @qj @q_ k @q_ i @qj
@2 L ...q j + @3 L qj q_ k + @3 L q j qk -
@q_ i @q_ j @qk @q_ i @q_ j @q_ k @q_ i @q_ j
@2 L q_ j - @2 L qj = 0
@qi @qj @qi @q_ j
which except for a rearrangement of terms is the same as the linearized EL(L) in equation
(4.6). The other equation of EL(L(2) ) is equation (4.23) which in terms of L is equivalent
to
d @ @L uj + @L u_ j - @ @L uj + @L u_ j = 0; (4.31)
dt @u_ i @qj @q_ j @ui @qj @q_ j
which is equivalent to
d @L @L
dt @q_ i - @qi = 0; (4.32)
which is the same as the original EL(L). This completes the proof of commutativity of
(4.21).
Thus I have shown that the Euler-Lagrange equation corresponding to L, namely EL(L)
can be dierentiated by dierentiating L along (u; u_ ) rst to get a new Lagrangian L(2) and
then deriving the Euler-Lagrange equations EL(L(2) ) corresponding to this Lagrangian and
nally setting u = q_ .
Proof First I must describe how to read the diagram. The top right arrow represents
dierentiation dened in (4.34). The down arrows represent using the discrete variational
principle to get the discrete Euler-Lagrange equations. The bottom right arrow has to be
given a meaning. I will dene an operation of discrete dierentiation as described below.
In the case of linear equations this is the same as nite dierencing.
First let's check carefully what DEL(L(d2) ) is. This is obtained by extremizing the discrete
action sum, i.e by extremizing
NX
-1
S(d2) = L(d2) (qk ; uk ; qk+1 ; uk+1 ) (4.36)
k=0
One extremizes S(d2) over qk and uk for k = 1; : : : ; N - 1 keeping q0 ,qN ,u0 and uN xed
and by setting
@S(d2) = 0; @S(d2) = 0
@qjk @ujk
for j = 1; : : : ; n. This yields the two sets of equations that comprise the discrete Euler-
Lagrange equations for L(d2) . These equations, which I will call DEL(L(d2) ) are
@L(d2) (q ; u ; q ; u ) + @L(d2) (q ; u ; q ; u ) = 0 (4.37)
@qjk k-1 k-1 k k @qjk k k k+1 k+1
@L(d2) (q ; u ; q ; u ) + @L(d2) (q ; u ; q ; u ) = 0 (4.38)
@ujk k-1 k-1 k k @ujk k k k+1 k+1
for k = 1; : : : ; N - 1 and j = 1; : : : ; n.
Now I can start the proof of the commutativity of (4.35). To do this one must write
DEL(L(d2) ) in terms of Ld . Consider the rst set of equations represented by (4.37). Substi-
tute for L(d2) in terms of Ld using (4.34). With this substitution, equation (4.37) becomes
@ ui @Ld (q q ) + ui @Ld (q ; q ) +
@qjk k-1 @qik-1 k-1; k k @qik k-1 k
@ ui @Ld (q q ) + ui @Ld (q ; q ) = 0; (4.39)
@qjk k @qik k; k+1 k+1 @qi
k+1
k k+1
25
which implies
2 2
uik-1 @j Ldi (qk-1 ; qk ) + uik @j Ld i (qk-1 ; qk ) +
@qk @qk-1 @qk @qk
2 2
uik @j Ld i (qk ; qk+1 ) + uik+1 @j Ldi (qk ; qk+1 ) = 0: (4.40)
@qk @qk @qk @qk+1
Now let's substitute
i i
uik = qk+1h- qk
etc. to get
qik - qik-1 @2 Ld (q ; q ) + qik+1 - qik @2 Ld (q ; q ) +
h @qjk @qik-1 k-1 k h @qjk @qik k-1 k
qik+1 - qik @2 Ld (q ; q ) + qik+2 - qik+1 @2 Ld (q ; q ) = 0 (4.41)
h @qjk @qik k k+1 h @qjk @qik+1 k k+1
The above equation represents one equation of
DEL(L(d2) ) uk= qk+1h-qk :
In terms of Ld the other equation, i.e (4.38) becomes
@ ui @Ld (q q ) + ui @Ld (q ; q ) +
@ujk k-1 @qik-1 k-1; k k @qik k-1 k
@ ui @Ld (q q ) + ui @Ld (q ; q ) = 0 (4.42)
@ujk k @qik k; k+1 k+1 @qik+1 k k+1
which is
@Ld (q ; q ) + @Ld (q q ) = 0 (4.43)
@qjk k-1 k @qjk k; k+1
Now DEL(Ld ) is
@Ld (q ; q ) + @Ld (q ; q ) = 0 (4.44)
@qjk k-1 k @qjk k k+1
which is the same as (4.43). The discrete time derivative of this is same as (4.41). This
derivative is taken just like the usual derivative except that instead of q_ k-1 one writes
qk - qk-1
h
If an expression is linear in its variables, its discrete time derivative is the same as its
nite dierence. Consider for example an expression f(q) linear in q. In particular let
f(q) = a1 q + a0 . Then by the above description of discrete time derivative, the discrete
26
time derivative of f(q) is
df q1 - q0
dq q0 h
which is
a1 q1 -h q0 :
Note that this is the same as
f(q1 ) - f(q0 ) ;
h
the nite dierence of the expression f(q).
Thus we have shown that
DEL(L(d2) ) qk+1h-qk
consists of two sets of equations. The rst set, equation (4.37), after substituting
uk = qk -hqk-1
is the discrete time derivative of DEL(Ld ). The second set, equation (4.38) is the same as
DEL(Ld ) which shows that the diagram in equation (4.35) commutes.
Thus the situation is exactly the same as the continuous case in which
EL(L(2) ) ju=q_
consisted of two sets of equations the rst of which was the derivative of EL(L) and the
second of which was the same as EL(L).
i i @L qk+1 + qk qk+1 - qk
L(d2) (qk ; uk ; qk+1 ; uk+1 ) = uk+12+ uk @q i 2 ; h
uik+1 - uik @L qk+1 + qk qk+1 - qk
+
h @q_ i 2 ; h (4.50)
where the last equality follows from (4.20). Equation (4.50) represents starting from top
left, going right and then bottom. This must be compared with the other path of going
down from top left and then going right. To do this one must use equation (4.34). Here,
dLd (qk ; qk+1 ) =
1 @L - 1 @L ; : : : ; 1 @L - 1 @L ; 1 @L + 1 @L ; : : : ; 1 @L + 1 @L
(4.51)
2 @q1 h @q_ 1 2 @qn h @q_ n 2 @q1 h @q_ 1 2 @qn h @q_ n
Thus
dLd (qk ; qk+1 ) · (uk ; uk+1 ) =
uik 12 @q
@L
i -
1 @L i 1 @L 1 @L
h @q_ i + uk+1 2 @qi + h @q_ i (4.52)
where i = 1; : : : ; n which implies that
i i @L uik+1 - uik @L
L(d2) (qk ; uk ; qk+1 ; uk+1 ) = uk+12+ uk @q i+ h @q_ i (4.53)
where the partials are evaluated at ((qk+1 + qk )=2; (qk+1 - qk )=h). But (4.53) is the same
as (4.50) which completes the proof of commutativity of (4.47).
The previous three lemmas can be summarized in one diagram as given by the following
theorem.
29
Theorem 1 The following diagram commutes
EL(L) −−−−! EL(L(2) )u=q_
L −−−−! L(2)
(4.54)
Ld −−−−! Ld2
( )
DEL(Ld ) −−−−! DEL(L(d2) )
uk= qk+1h-qk
Proof This follows from the previous three lemmas by \pasting" the corresponding com-
mutative diagrams together.
The left column shows the usual continuous Lagrangian and the discrete Lagrangians used
by Wendlandt and Marsden [20]. It was shown by Wendlandt and Marsden [20] that the
algorithm obtained from Ld is a symplectic-momentum algorithm. On the right column
are the Lagrangian and discrete Lagrangian I have obtained. Note that the right column is
the same as the left one with Q replaced by TQ. Thus all the invariance proofs of the left
column still apply.
This means that EL(L(2) ) has symplectic
ow and DEL(L(d2) ) in equations (4.37) and
(4.38) is a symplectic integrator. I derive the the symplectic form on TQ × TQ in subsection
4.7.1 below. One can check explicitly that this symplectic form, given as equation (4.68)
below, is preserved by the algorithm DEL(L(d2) ) though this also follows without checking
from the proof in Wendlandt and Marsden [20] as indicated above.
But we must check that similar invariance properties remain true after we set u = q_ in
EL(L(2) ) or uk = (qk+1 - qk )=h in DEL(L(d2) ). This will be done in subsection 4.7.2 for
DEL(L(d2) ).
I will dene the ber derivative FL(d2) : TQ × TQ ! T ∗TQ by analogy to this. But rst I
note that the following steps are needed to dene the symplectic form on TQ × TQ :
i. Dene the ber derivative FL(d2) : TQ × TQ ! T ∗TQ,
ii. Compute the tangent map of FL(d2) , namely
T((q0;u0 );(q1 ;u1)) FL(d2) :
T(q0;u0 ) TQ × T(q1;u1 ) TQ ! TFL(d2)((q0 ;u0 );(q1;u1 )) T ∗TQ
32
iii. Write the local coordinate expression for the canonical one form on T ∗TQ,
iv. Dene the symplectic form on TQ × TQ as
= -d(FLd(2)∗ ) where FL(d2)∗ means the
pullback under the ber derivative FL(d2) .
Step 1 : Since L(d2) maps TQ × TQ ! R, the ber derivative FL(d2) maps TQ × TQ ! T ∗TQ.
Note that FL(d2) evaluated at a point in TQ × TQ is a point in T ∗TQ so FL(d2) can be dened
by dening how it acts on a vector in TTQ. By analogy to the denition of ber derivative
F Ld given above, let ((q(t); u(t)); (q1 ; u1 )) be a parameterized curve from an open interval
of R including 0 into TQ × f(q1 ; u1 )g ⊂ TQ × TQ such that
q(0) = q0
u(0) = u0
q_ (0) = e
u_ (0) = f
The curve ((q(t); u(t)); (q1 ; u1 )) can be identied with the curve (q(t); u(t)) and this curve
then represents the vector ((q0 ; u0 ); e; f) ∈ T(q0;u0 ) TQ. The ber derivative FL(d2) evalu-
ated at ((q0 ; u0 ); (q1 ; u1 )) ∈ TQ × TQ can be dened by how its acts on ((q0 ; u0 ); e; f) ∈
T(q0;u0 ) TQ as follows:
d L(2) ((q(t); u(t)); (q ; u ))
FLd2 ((q0; u0 ); (q1 ; u1 )) · ((q0 ; u0 ); e; f) = dt
( )
d 1 1
t=0
Note the analogy with the denition in equation(4.65). When the above calculation is
carried out, in matrix notation it results in the following denition
2 ((q ; u ); (q ; u )) =
F Ld
( )
0 0 1 1
(2) (2)
((q0 ; u0 ); D1 Ld ((q0 ; u0 ); (q1 ; u1 )); D2 Ld ((q0 ; u0 ); (q1 ; u1 ))) (4.66)
Note that FL(d2) maps the point ((q0 ; u0 ); (q1 ; u1 )) ∈ TQ×TQ to a covector in T(∗q0;u0) TQ
based at (q0 ; u0 ) so the rst (q0 ; u0 ) that appears on the right hand side of equation(4.66)
is the base point of the covector.
Step 2 : To compute the expression for the tangent map of FL(d2) consider a smooth
parameterized curve ((q0 (t); u0 (t)); (q1 (t); u1 (t))) in TQ × TQ such that
q0 (0) = q0 q_ 0 (0) = e0
u0 (0) = u0 u_ 0 (0) = f0
q1 (0) = q1 q_ 1 (0) = e1
u1 (0) = u1 u_ 1 (0) = f1
Then the tangent map at ((q0 ; u0 ); (q1 ; u1 )) acting on the vector
(((q0 ; u0 ); e0 ; f0 ); ((q1 ; u1 ); e1 ; f1 )) ∈ T(q0;u0 ) TQ × T(q1;u1) TQ
33
is dened by
T((q0;u0);(q1 ;u1 )) FL(d2) · (((q0 ; u0 ); e0 ; f0 ); ((q1 ; u1 ); e1 ; f1 )) =
d FL(2) ((q (t); u (t)); (q (t); u (t)))
dt t=0 d 0 0 1 1
with the base point ((q0 ; u0 ); D1 L(d2) ; D2 L(d2) ). In the expression above, the notation D1 ,
D2 , D3 , D4 refers to the partial derivative with respect to the rst, second, third and
fourth arguments respectively, namely partial derivatives with respect to q0 , u0 , q1 , u1
respectively. The entire expression above is not really needed for the actual derivation of
the symplectic form
as will be seen in steps 3 and 4 below. It is given above just for
completeness.
Step 3 : In invariant notation, the canonical one form on T ∗TQ is
(v) =
; TTQ · v
where ∈ T ∗TQ, v ∈ T(T ∗TQ) and TQ : T ∗TQ ! TQ is the canonical projection. To
write this in local coordinates, let E be the Euclidean space that models Q locally and
let U ⊂ E be open. The base point of in local coordinates is some (q; u) ∈ U × E
and so = ((q; u); (1 ; 2 )) for some (1 ; 2 ) ∈ E∗ × E∗ . The vector v ∈ T(T ∗TQ) has
the local coordinate expression v = ((q; u); (1 ; 2 ); e; f; 1 ; 2 ) for some (e; f; 1 ; 2 ) ∈
E × E × E∗ × E∗ . Thus in local coordinates
TQ(q; u; 1 ; 2 ) = (q; u)
and so the tangent map acting on vector v, namely TTQ · v is given in local coordinates
by
TTQ · v = ((q; u); e; f) (4.67)
This gives us the expression for (v) in local coordinates as follows
(v) = ((q;u);(1;2 )) ((q; u); (1 ; 2 ); e; f; 1 ; 2 )
=
(1 ; 2 ); (e; f)
= 1 (e) + 2 (f)
34
Step 4 : Now I can dene
= -d(FL(d2)∗ )
and derive a local coordinate expression for this. I will rst derive the local coordinate
expression for the pullback part of the expression above, namely for FL(d2)∗ as follows.
L(d2)∗ )((q0 ;u0);(q1 ;u1 ))(((q0 ; u0 ); e0 ; f0 ); ((q1 ; u1 ); e1 ; f1 ))
(F
Chapter 5
In this chapter I will derive the equations for three specic examples. The rst is a particle
falling from rest under gravity. I will rst show how dierentiating the Lagrangian yields
the time derivative of the Euler-Lagrange equation. Then I will derive the discrete Euler-
Lagrange equations from the original discrete Lagrangian and the dierentiated discrete
Lagrangian. The latter is a nite dierenced version of the former, i.e is the discrete time
derivative of the original discrete Euler-Lagrange equation. The solution is a quadratic
polynomial and both the discrete equations solve the equation of motion exactly.
To see an example in which the discrete equation is not an exact solution of the con-
tinuous equations of motion I repeat the whole exercise for a simple system for which the
solution is not a polynomial. The system I use is a simple harmonic oscillator. Finally I
give an example in which the resulting discrete Euler-Lagrange equation is not linear in the
variable that is being solved for. For this I will use the example of an undamped Dung
oscillator in which the position of interest, qk+1 appears in a cubic equation.
In all these examples the conguration space Q is linear. The theory in Chapter 4 was
developed for a general, possibly nonlinear Q by using coordinate charts. In practice, for
nonlinear Q, one would use Lagrange multipliers to enforce the constraint of evolution on
the nonlinear Q rather than using coordinate charts. This is done for example by Wendlandt
and Marsden [20].
5.1.2 Discrete
The same exercise can now be repeated on the discrete side. Here, rst I give the derivation
of the discrete Euler-Lagrange equation using the method given by Wendlandt and Marsden
[20]. The discrete Lagrangian Ld is
2
1
Ld (qk-1 ; qk ) = 2 q k - qk-1
+g
q k -1 + qk
(5.1)
h 2
The discrete Euler-Lagrange equation is
@Ld @Ld
@qk (qk-1 ; qk ) + @qk (qk ; qk+1 ) = 0 (5.2)
Doing this computation for the the discrete Lagrangian above one gets the discrete Euler-
Lagrange
qk+1 - 2qk + qk-1 = g (5.3)
h2
It is worth noting that this is the discrete version of the equation q = g where the left
hand side in (5.3) is the O(h2 ), centered nite dierence approximation for q at qk . This
equation (5.3) gives an algorithm for advancing qk . One can solve for qk+1 in terms of the
values of q at the previous two time steps, namely qk and qk-1 .
41
Now I will derive the linearization on the discrete side using the method of this thesis.
According to this, as shown in Section 4.4 equation (4.34) one writes
L(d2) (qk ; uk ; qk+1 ; uk+1 ) = dLd (qk ; qk+1 ) · (uk ; uk+1 )
@Ld u + @Ld u
=
@q k @q k+1
k k+1
qk+1 - qk + g u + qk+1 - qk + g u
= -
h2 2 k h2 2 k+1
Similarly
Ld2 (qk-1 ; uk-1 ; qk ; uk ) = q k - qk-1 g q k - qk-1 g
h2 + 2 uk-1 + h2 + 2 uk (5.4)
( )
-
d @L(2) - @L(2) 0
dt @q_ @q =
5.2.2 Discrete
The discrete Lagrangian is
2 2
Ld (qk-1 ; qk ) = 21 m qk -hqk-1 - 12 K qk-12+ qk
2 2
1
Ld (qk ; qk+1 ) = 2 m q k +1 - qk 1
- K
q k + qk+1
h 2 2
Hence
@Ld m K
@qk (qk-1 ; qk ) = h2 (qk - qk-1 ) - 4 (qk-1 + qk )
@Ld (q ; q ) = - m (q - q ) - K (q + q )
@qk k k+1 h2 k+1 k 4 k k+1
which implies that the discrete Euler-Lagrange equation (5.2) is
m qk+1 - 2qk + qk-1 + K (q + 2q + q ) = 0
h2 4 k-1 k k+1 (5.13)
Comparing this to the continuous time Euler-Lagrange equation (5.11) one nds that the
acceleration q (t) of the continuous time equation has been replaced by the O(h2 ) centered
nite dierence discrete approximation of q at qk . Also, the position q(t) in the continuous
time equation has been replaced by a weighted average of the positions at qk-1 ; qk and
qk+1 .
In order to linearize the discrete Euler-Lagrange equation (5.13) using the method of
44
this thesis one denes
L(d2) (qk-1 ; uk-1 ; qk ; uk ) = dLd (qk-1 ; qk ) · (uk-1 ; uk )
L(d2) (qk ; uk ; qk+1 ; uk+1 ) = dLd (qk ; qk+1 ) · (uk ; uk+1 )
which means
L(d2) (qk-1 ; uk-1 ; qk ; uk ) = uk-1 m (q - q ) - K (q + q )
-
h2 k k-1 4 k-1 k
+ uk
m (q - q ) - K (q + q )
h2 k k-1 4 k-1 k
L(d2) (qk ; uk ; qk+1 ; uk+1 ) = uk - hm2 (qk+1 - qk ) - K4 (qk + qk+1 )
+ uk+1
m (q - q ) - K (q + q )
h2 k+1 k 4 k k+1
Then the discrete Euler-Lagrange equations (5.5) and (5.6) are
m uk+1 - 2uk + uk-1 + K (u + 2u + u ) = 0
h2 4 k-1 k k+1 (5.14)
m qk+1 - 2q
h2
k + qk-1 + K (q + 2q + q ) = 0
4 k-1 k k+1 (5.15)
The second of these is the same as the original discrete Euler-Lagrange equation and when
one substitutes
uk = qk+1h- qk
in the rst equation, namely in (5.14), one gets the linearized version of the original discrete
Euler-Lagrange equation. The linearized equation that one gets with the above substitution
is
m q k +2 - 3qk+1 + 3qk - qk-1
h3
K q k - qk-1
+2
q k +1 - qk q k +2 - qk+1
= 0 (5.16)
+
4 h h +
h
Note that the equation (5.16) is the discrete version of the continuous equation (5.12)
m...q + Kq_ = 0
...
The q of the continuous equation has been replaced by the O(h) one sided nite dierence
approximation at qk-1 and the velocity q_ appearing in the equation has been replaced by
a weighted average of the O(h) approximations of the velocities at several time steps. Also
note that equation(5.16) can be obtained from the original discrete Euler-Lagrange equation
(5.13) by nite dierencing as follows
1 ((5.13) at(q ; q ; q ) - (5.13) at(q ; q ; q ))
h k+2 k+1 k k+1 k k-1
45
since that gives
m qk+2 - 2qk+1 + qk + K (q + 2q + q )
h h2
4h k+2 k+1 k
m q k +1 - 2qk + qk-1 K
-
h h2 -
4h (qk-1 + 2qk + qk+1 ) = 0 (5.17)
which is the same as equation (5.16). As explained earlier, nite dierencing is the same as
taking the discrete time derivative in such cases where the equation is linear in its variables.
5.3.1 Continuous
Let the Lagrangian be
2 4
L(q; q_ ) = 21 q_ 2 + q2 - q4
Then the Euler-Lagrange equation is
q - q + q3 = 0 (5.18)
On dierentiating the Lagrangian L(q; q_ ) to get L(2) (q; q;
_ u; u_ ) one gets
L(2) (q; q;_ u; u_ ) = qu - q3 u + q_ u_
and the corresponding Euler-Lagrange equations are
u - u + 3q2 u = 0 (5.19)
q - q + q3 = 0 (5.20)
As expected, the second one is the Euler-Lagrange equation corresponding to the original
Lagrangian and the rst one on substituting u = q_ becomes the derivative of the original
equation, i.e it becomes
...
q - q_ + 3q2 q_ = 0 (5.21)
46
5.3.2 Discrete
The discrete Lagrangian is
2 2 4
Ld (qk-1 ; qk ) = 12 qk -hqk-1 + 12 qk-12+ qk - 14 qk-12+ qk
and similarly for Ld (qk ; qk+1 ). The discrete Euler-Lagrange equation DEL(Ld ) is
qk+1 - 2qk + qk-1 - 1 (q + 2q + q ) +
h2 4 k-1 k k+1
1 qk-1 + qk 3 + qk + qk+1 3 = 0 (5.22)
2 2 2
Dierentiating the discrete Lagrangian Ld to get L(d2) according to the method of this thesis
one gets
L(d2) (qk-1 ; uk-1 ; qk ; uk ) =
(q - q ) (q + q ) (q + q )
uk-1 - k h2 k-1 + k-14 k - k-116 k
( q - q ) (q + q ) (q + q )
+ uk
k k-1 + k-1 k - k-1 k (5.23)
h2 4 16
and similarly for L(d2) (qk ; uk ; qk+1 ; uk+1 ). There are two corresponding discrete Euler-
Lagrange equations one of which is the same as the discrete Euler-Lagrange equation cor-
responding to the original discrete Lagrangian, i.e it is the same as equation (5.22). The
other equation is the discrete time derivative of that equation and in terms of uk etc. it is
given by
uk+1 - 2uk + uk-1 - uk-1 + 2uk + uk+1
h2
4 2 2
1 q k + qk+1 q k + qk+1
+
4 3uk+1 2 + 3uk
2
+ 3uk
qk-1 + qk 2 + 3u qk-1 + qk 2
0 (5.24)
2 k-1 2 =
Substituting
uk = qk+1h- qk
47
in the above equation gives the discrete time derivative of the original discrete Euler-
Lagrange equation. The equation one gets with this substitution is
qk+2 - 3qk+1 + 3qk - qk-1
h3
1 q k - qk-1 q k +1 - qk q k +2 - qk+1
-
4 h + 2 h +
h
2
1 qk+2 - qk+1 qk + qk+1
+
4 3 h 2
2
+3
q k+1 - qk q k + qk+1
h 2
2
+3
q k+1 - qk q k-1 + qk
h 2
2
+ 3
qk +1 - qk q k -1 + qk
= 0 (5.25)
h 2
It is worth noting some features of the equation above. Compare this equation with the
continuous Euler-Lagrange equation (5.21) and note that equation (5.25) is the discrete
version of the continuous equation.
... The rst term in (5.25) is the O(h) one sided nite
q
dierence approximation of . The next term in the discrete time equation is a weighted
_ 2 at various
average of q_ at various points and the last big term is a weighted average of 3qq
2
points where the q term in q is itself an average position. All this is as one would expect
from the commutative diagram (4.54) of Chapter 4. Note that equation (5.25) cannot be
obtained by taking a a nite dierence from the original discrete Euler-Lagrange equation
(5.22) since the original equation is not linear. However, equation (5.25) can be obtained by
taking the discrete time derivative of the original discrete Euler-Lagrange equation (5.22).
In the above equation let qk+1 = q(t + h) etc. in the left hand side. As a result one obtains
that the left hand side is
m K
h2 (q(t + h) - 2q(t) + q(t - h)) + 4 (q(t + h) + 2q(t) + q(t - h)) :
49
Discrete EL
1.6 Linearized Discrete EL
1.4
|Computed−Analytic| at time 1
1.2
0.8
0.6
0.4
0.2
0
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016
Step size h
Discrete EL
Linearized Discrete EL
1.2
1
|Computed−Analytic| at time 5
0.8
0.6
0.4
0.2
0
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016
Step size h
Discrete EL
6 Linearized discrete EL
2
Computed − Analytic
−2
−4
−6
−8
0 1 2 3 4 5 6 7 8 9 10
Time
Figure 5.3: Point wise error for step size h = 0:001 as a function of time
K
+ 2q(t)
4
K q (t) + hq (t) +
h2 q (t) + h3 q(3) (t) + h4 q(4) (t) + h5 q(5) (t) + O(h6 )
:
+
4 2 6 24 120
Carrying out the various cancellations above yields
m h2 q (t) + h4 q(4) (t) + O(h6 )
h2 12
K 4q 2
(t) + h q (t) +
h4 q(4) (t) + O(h6 )
+
4 12
2 2
= m q (t) + h12 q(4) (t) + O(h4 ) + K q(t) + h4 q (t) + O(h4 )
= mq (t) + Kq(t) + O(h2 )
= O(h2 )
since mq (t) + Kq(t) = 0. A similar calculation for equation (5.16) yields
LHS = (mq 3 (t) + Kq (t)) + 1 mq(4) (t) + 1 Kq (t) h
( )
2 2
1 mq(5) (t) + 5 Kq(3) (t) h2 + O(h3 )
+
4 12
2
= O(h )
since mq(3) (t) + Kq (t) = 0 and mq(4) (t) + Kq (t) = 0. Thus according to our denition of
local error the error of both the discrete Euler-Lagrange equation and that of the linearized
version is O(h2 ). The equality of order is also seen in the numerical global error comparison
in the previous section.
For the Dung oscillator the local error computed was O(h2 ) for the discrete Euler-
Lagrange equation and O(h) for the linearized version. This shows that the error can be
worse for the linearized integrator.
One idea to try to improve the order of accuracy of the linearized discrete Euler-Lagrange
equation is to use a better approximation for uk . But when one uses the O(h2 ) centered
52
nite dierence approximation of the rst derivative by setting
uk = qk+1 2h
- qk-1
(5.29)
instead of the O(h) one sided nite dierence approximation as in
uk = qk+1h- qk
one still gets a method that is O(h2 ) for the case of the simple harmonic oscillator. The
linearized discrete Euler-Lagrange equation that one gets for the harmonic oscillator if the
more accurate uk is used is
m -qk-2 + q + q + qk+2
h3 2 k-1 k+1 2
K qk - qk-2 q k +1 - qk-1 q k +2 - qk
+
4 2h + 2 2h +
2h = 0 (5.30)
This is an expected linearization of the continuous equation in that the rst term is the
centered dierence O(h2 ) approximation of the third derivative and the other term is the
average of the O(h2 ) approximation of the rst derivative at several points.
5.7 Conclusion
I have shown that Euler-Lagrange equations and discrete Euler-Lagrange equations can be
linearized, i.e dierentiated, by dierentiating the Lagrangian or discrete Lagrangian. The
original motivation for dierentiating the Lagrangian was to develop higher order varia-
tional integrators. However it was found that the resulting intgerators are not higher order.
Nonetheless the pursuit of this goal turned up several interesting results :
i. Dierentiating a Lagrangian along the acceleration, i.e along (q; _ q ) results in the
Euler-Lagrange equation 0 = 0 (Lemma 2, page 20).
ii. Dierentiating a Lagrangian along a general direction (u; u_ ), determining the Euler-
Lagrange equation and then setting u = q_ results in an Euler-Lagrange equation that
is the time derivative of the original Euler-Lagrange equation corresponding to the
original Lagrangian (Lemma 3, page 21).
iii. A similar operation on the discrete Lagrangian gives a \discrete time derivative" of
the discrete Euler-Lagrange equation corresponding to the original discrete Lagrangian
(Lemma 4, page 24).
iv. The operations described in the previous two items are part of a commutative diagram
(Theorem 1, page 28).
v. Numerical measurements and analytical calculation of order of accuracy for specic
examples using this approach show that higher order methods are not obtained in
general (Chapter 5, especially Section 5.4 and 5.5).
vi. The manifold consisting of triples that satisfy a discrete Euler Lagrange equation is a
smooth manifold (Proposition 4, page 36).
53
vii. The algorithm on TQ × TQ is symplectic and the algorithm that updates triples of
points on Q is presymplectic (Theorem 2, page 37).
I also gave a derivation of a symplectic form on TQ × TQ where Q is the conguration
manifold. Most proofs given in this thesis were done using local coordinates. A possible
direction for further study is to give intrinsic proofs in order to gain a deeper understanding
of the geometric meaning of the operations of this thesis.
Consider for example the operation of setting u = q_ after the variational principle has
been applied. The calculus equivalent of this is to nd stationary points in a problem of
nding extrema and then imposing constraints after the stationary points have been found.
The setting of u = q_ after applying the variational principle is the calculus of variations
equivalent of this problem. This apparently \wrong" operation leads to Euler-Lagrange
equations that have some structure, namely that they are the derivative of the original
equations.
Similar comments apply on the discrete side. However, on the discrete side, the lin-
earization described in this thesis may be a simple consequence of commuting of mixed
partials.
54
55
Bibliography