22
  a   r    X    i   v   :    1    3    0    1  .    3    2    4    4   v    1    [   m   a    t    h     p    h    ]    1    5    J   a   n    2    0    1    3 Symbolic computation of second-order normal forms for Hamiltonian systems relative to periodic ows M. Avenda˜ no-Camacho, J. A. V allejo and Y u. V orobjev Departamento de Matem´ aticas, Universida d de Sonora (M´ exico) Blvd L. Encinas y Rosales s/n Col. Centro Edicio 3K-1 CP 83000 Hermosillo (Son) Email (JAV, corresponding author):  [email protected] January 16, 2013 Abstract A Maxima package called  pdynamics is described. It is aimed to study Poisson (and symple ctic) systems and, parti cularly, the dete rminat ion of the second -order normal form for perturbed Hamiltonians  H ǫ  =  H 0 + ǫH 1 + ǫ 2 H 2 , relative to the periodic ow of the unperturbed Hamiltonian  H 0 . The forma lism presented here is global, it does not require recursive computations and allows an ecient symbolic implementation. Contents 1 Introduction . . . . . . . . . . . . . . . . . . . . . . .  2 I Theoretical background  2 2 V ector elds with periodic ow . . . . . . . . . . . . . . . . .  3 3 Averaging operators . . . . . . . . . . . . . . . . . . . .  4 4 The Hamiltonian case . . . . . . . . . . . . . . . . . . . .  6 5 The main result . . . . . . . . . . . . . . . . . . . . . .  8 II Software implement ation  10 6 Poisson brackets . . . . . . . . . . . . . . . . . . . . . .  11 7 Hamilton’s equations . . . . . . . . . . . . . . . . . . . .  13 8 V ector elds and ows . . . . . . . . . . . . . . . . . . . .  15 9 The averaging method for normal forms . . . . . . . . . . . . . .  16 1

Symbolic computation of second-order normal forms for Hamiltonian systems relative to periodic flows

Embed Size (px)

Citation preview

Page 1: Symbolic computation of second-order normal forms for  Hamiltonian systems relative to periodic flows

8/12/2019 Symbolic computation of second-order normal forms for Hamiltonian systems relative to periodic flows

http://slidepdf.com/reader/full/symbolic-computation-of-second-order-normal-forms-for-hamiltonian-systems-relative 1/22

a r X i v : 1 3 0 1 . 3 2 4 4 v 1 [ m a t h - p h ] 1 5 J a n 2 0 1 3

Symbolic computation of second-order normal forms forHamiltonian systems relative to periodic ows

M. Avenda˜ no-Camacho, J. A. Vallejo and Yu. VorobjevDepartamento de Matem´ aticas, Universidad de Sonora (Mexico)

Blvd L. Encinas y Rosales s/n Col. CentroEdicio 3K-1 CP 83000 Hermosillo (Son)

Email (JAV, corresponding author): [email protected]

January 16, 2013

Abstract

A Maxima package called pdynamics is described. It is aimed to study Poisson (andsymplectic) systems and, particularly, the determination of the second-order normalform for perturbed Hamiltonians H ǫ = H 0 + ǫH 1 + ǫ2 H 2 , relative to the periodic ow of the unperturbed Hamiltonian H 0 . The formalism presented here is global, it does notrequire recursive computations and allows an efficient symbolic implementation.

Contents

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . 2

I Theoretical background 22 Vector elds with periodic ow . . . . . . . . . . . . . . . . . 33 Averaging operators . . . . . . . . . . . . . . . . . . . . 44 The Hamiltonian case . . . . . . . . . . . . . . . . . . . . 65 The main result . . . . . . . . . . . . . . . . . . . . . . 8

II Software implementation 106 Poisson brackets . . . . . . . . . . . . . . . . . . . . . . 117 Hamilton’s equations . . . . . . . . . . . . . . . . . . . . 138 Vector elds and ows . . . . . . . . . . . . . . . . . . . . 159 The averaging method for normal forms . . . . . . . . . . . . . . 16

1

Page 2: Symbolic computation of second-order normal forms for  Hamiltonian systems relative to periodic flows

8/12/2019 Symbolic computation of second-order normal forms for Hamiltonian systems relative to periodic flows

http://slidepdf.com/reader/full/symbolic-computation-of-second-order-normal-forms-for-hamiltonian-systems-relative 2/22

1 Introduction

In this paper we discuss some computational aspects of the normal form theory for Hamil-tonian systems on general phase spaces, that is, Poisson manifolds. According to Deprit

[9], a perturbed vector eld

A = A0 + ǫA1 + ǫ2

2 A2 + · · · +

ǫk

k Ak + O(ǫk+1 )

on a manifold M , is said to be in normal form of order k relative to A0 if [A0 , Ai ] = 0for i ∈ 1, . . . , k . In the context of perturbation theory, the normalization problem isformulated as follows: to nd a (formal or smooth) transformation which brings a perturbeddynamical system to a normal form up to a given order.The construction of a normalization transformation, in the framework of the Lie transformmethod [ 8, 12, 13, 15], is related to the solvability of a set of linear non homogeneousequations, called the homological equations. If the homological equations admit globalsolutions, dened on the whole M , we speak of a global normalization, which essentiallydepends on the properties of the unperturbed dynamics.

Here we are interested in the global normalization of a perturbed Hamiltonian dynamicsrelative to periodic Hamiltonian ows. In this case, a result due to Cushman [6], states thatif A is Hamiltonian, and the ow of the unperturbed vector eld A0 is periodic, then thetrue dynamics admits a global Deprit normalization to arbitrary order. The correspondingnormal forms can be determined by a recursive procedure (the so-called Deprit diagram)involving the resolution of the homological equations at each step.

In this paper, we extend Cushman’s result to the Poisson case and derive an alterna-tive coordinate-free representation for the second-order normal form, involving only threeintrinsic operations: the averaging operators associated to the S1− action, and the Pois-son bracket. We give a direct derivation of this representation based on a period-energyargument [ 11] for Hamiltonian systems, and some properties of the periodic averaging onmanifolds [3, 6, 18]. This formalism allows us to get an efficient symbolic implementationfor some models related to polynomial perturbations of the harmonic oscillator with 1:1resonance. In particular, we compute the second-order normal form of the Henon-Heiles [ 6],and the spring pendulum [4, 5, 10] Hamiltonians, expressed in terms of the Hopf variables.

Let us remark that the second-order normal form plays a very important rˆ ole in theapproximation of a perturbed dynamics by solutions of the averaged system when a long-time scale is used [2, 19]. Our desire to study this kind of dynamics led to the presentwork.

Also, we present a package, called pdynamics , written in the CAS Maxima, which canautomatically compute the second-order normal form in most cases of interest (see comments

in Part II for an overview of its limitations). We have chosen this particular CAS becauseof its ease of use, its syntax (very similar to that used on a blackboard), and its open-sourcecharacter. The second part of this paper, in which we show how to use the package, is moreelementary in mathematical terms. We give a complete list of the functions contained inthe package with examples of use for each one of them. The software can be downloadedfrom http://galia.fc.uaslp.mx/ ~jvallejo/pdynamics.zip .

2

Page 3: Symbolic computation of second-order normal forms for  Hamiltonian systems relative to periodic flows

8/12/2019 Symbolic computation of second-order normal forms for Hamiltonian systems relative to periodic flows

http://slidepdf.com/reader/full/symbolic-computation-of-second-order-normal-forms-for-hamiltonian-systems-relative 3/22

Part ITheoretical background

2 Vector elds with periodic owThroughout the paper, we set S1 = R/ 2πZ . We collect here some results regarding theow Flt

X of a vector eld X , on an arbitrary manifold M , in the case when Fl tX is periodic.

Although these results are general, later they will be applied to the case of a Hamiltonianvector eld on a Poisson manifold ( M, P ).

Let X ∈ X (M ) be a complete vector eld whose ow is periodic with period functionT ∈ C ∞ (M ), T > 0, that is: for any p ∈ M ,

Fl t+ T X ( p) = Fl t

X ( p). (1)

Then, X determines an S1− action S1 × M → M given by (t, p) → Flt/ω ( p)X ( p), where

ω := 2π/T > 0 is the frequency function, and t ∈ S1. Thus, the S1− action is periodic, withconstant period 2 π.

The generator Υ of this S1− action can be readily computed:

Υ( p) = ddt t=0

Fl t/ω ( p)X ( p) =

1ω( p)

dds s=0

FlsX ( p) =

1ω( p)

X ( p),

so Υ = 1ω X . Notice, from ( 1), that T ( p) > 0 is the period of the integral curve of X passing

through p ∈ M at t = 0, c p : R → M (which is such that c(0) = p and c p(0) = X ( p)). Inother words, c p(0) = p = c p(T ( p)). Also, each point on the image of the integral curve c p,gives the same value for the period: T ( p) = T (c p(t)) , for all t ∈ R . In terms of the ow of X , that means

((Fl t

X )∗T )( p) = T (Fl t

X ( p)) = T ( p), for all p ∈ M.

As T is constant along the orbits of X , its Lie derivative with respect to X vanishes:

LX T = ddt t=0

(Fl tX )∗T = 0 .

Now, from T ω = 2π, we get

0 = LX (T ω) = ( LX T )ω + T LX ω = T LX ω.

But T > 0, so this implies that ω is a rst integral (or invariant) of X ,

LX ω = 0. (2)

Denition 1. A smooth function f ∈ C ∞ (M ) is said to be an S1− invariant if it is invariant

under the ow of the generator Υ = 1ω X , that is,LΥ f = 0 .

Clearly, this is equivalent to the condition (Fl tΥ )∗f = f , for all t ∈ [0, 2π].

Remark 1. By (2), the frequency function is also an invariant of the S1− action:

LΥ ω = 1ω

LX ω = 0 .

3

Page 4: Symbolic computation of second-order normal forms for  Hamiltonian systems relative to periodic flows

8/12/2019 Symbolic computation of second-order normal forms for Hamiltonian systems relative to periodic flows

http://slidepdf.com/reader/full/symbolic-computation-of-second-order-normal-forms-for-hamiltonian-systems-relative 4/22

3 Averaging operators

Given a vector eld X ∈ X (M ) with periodic ow, the associated S1− action can be usedto dene two averaging operators, which we will denote by · and S . In this section, M

will be an arbitrary manifold.Denition 2. For any tensor eld R ∈ Γ T sr (M ) ( r − covariant, s− contravariant), the aver-age of R with respect to the S1− action on M induced by X , is the tensor eld (of the same type as R) dened by

R := 12π

0(Fl t

Υ )∗R dt.

The properties of the ow [ 1] guarantee that R is well-dened as a differentiable tensoreld. Also, note that if R ∈ Γ T sr (M ), and X 1, . . . , X r ∈ X (M ), α1, . . . , α s ∈ Ω1(M )are arbitrary, then, for every p ∈ M , t → (Fl t

Υ )∗R(X 1, . . . , X r , α 1 , . . . , α s )( p) is a realdifferentiable funcion on the compact [0 , 2π], hence integrable. We will use this denitionmainly applied to the case of functions f ∈ C ∞ (M ) ((0, 0)− tensors) and vector elds Y ∈X (M ) ((0, 1)− tensors).The other averaging operator that will be important in what follows, is the S operator.

Denition 3. The operator S : Γ T sr (M ) → Γ T sr (M ) is given by

S (R) := 12π

0(t − π)(Fl t

Υ )∗R dt.

Note that both, · and S , are R− linear operators. Other properties are listed below.

Lemma 3.1. For any complete vector eld Y ∈ X (M ) (whose ow is not necessarily periodic) and smooth tensor eld R ∈ Γ T sr (M ), we have:

dds s=0 (Fl

sY )∗

R = 12π (Fl

2πY )

R − R ,

where the averaging is taken with respect to the ow of Y , that is, R is given by R :=1

2π 2π

0 (Fl tY )∗R dt.

Proof. Start from the identities (which follow directly from the denitions of ow and Liederivative):

(Fl tY )∗(LY R) =

ddt

(Fl tY )∗R =

dds s=0

(Fl s+ tY )∗R =

dds s=0

(Fl sY )∗(Fl t

Y )∗R.

Taking the integral with respect to t between 0 and 2 π on both sides, we get, on the onehand:

12π 2π

0(Fl t

Y )∗(LY R) dt = d

ds s=0(Fl s

Y )∗ 1

2π 2π

0(Fl t

Y )∗R dt = d

ds s=0(Fl s

Y )∗ R ,

and, on the other:

12π

0(Fl t

Y )∗(LY R) dt =

12π

0

ddt

(Fl tY )∗R dt =

12π

(Fl 2πY )

∗R − R .

4

Page 5: Symbolic computation of second-order normal forms for  Hamiltonian systems relative to periodic flows

8/12/2019 Symbolic computation of second-order normal forms for Hamiltonian systems relative to periodic flows

http://slidepdf.com/reader/full/symbolic-computation-of-second-order-normal-forms-for-hamiltonian-systems-relative 5/22

Proposition 3.2. For every R ∈ Γ T sr (M ), the following properties hold:

(a) R is invariant under the ow of Υ (that is, S1− invariant) if and only if R = R.

(b) LΥ R = 0.

(c) If g ∈ C ∞ (M ) is S1− invariant, then gR = g R .

(d) The averaging operator commutes with tensor contractions whenever one of the tensors is S1− invariant, that is, if S ∈ Γ T ba (M ) is S1− invariant and C lk is any contraction,then C lk (R ⊗S ) = C lk( R ⊗S ).

Proof. (a) If R is invariant under the ow of Υ, then (Fl tΥ )∗R = R, for all t ∈ [0, 2π], and

from this it is immediate that R = R. Reciprocally, if R = R we may apply thepreceding lemma to obtain:

dds

s=0

(Fl sΥ )∗R =

12π

(Fl 2πΥ )∗R − R ,

and from the fact that the ow of Υ is 2 π− periodic,

LΥR = ddt t=0

(Fl tΥ )∗R = 0.

(b) From the properties of the Lie derivative and the denition of R :

(Fl tY )∗(LY R ) =

ddt

(Fl tΥ )∗ R =

ddt

12π

0(Fl s+ t

Υ )∗R ds = ddt

12π

t+2 π

t(Fl u

Υ )∗R du.

Now, because Fl uΥ is 2π− periodic:

(Fl tY )∗(LY R ) =

ddt

12π

0(Fl u

Υ )∗R du = 0 ,

so, as Fl tΥ is a diffeomorphism, LΥ R = 0.

(c) It is a straightforward computation.

(d) It is just a consequence of the commutativity between the pull-back and the tensorcontractions, and the functorial property (Fl t

Υ )∗(R ⊗S ) = (Fl tΥ )∗R ⊗ (Fl t

Υ )∗S .

Remark 2. In particular, from (d) we get that if Y ∈ X (M ) and α ∈ Ω(M ) is S1− invariant,

then iY α = i Y α.Proposition 3.3. For any R ∈ Γ T sr (M ) and g ∈ C ∞ (M ) S1− invariant, the following hold:

(a) S (gR) = gS (R).

(b) (LΥ S )(R) = R − R .

Proof. (a) A straightforward computation.

5

Page 6: Symbolic computation of second-order normal forms for  Hamiltonian systems relative to periodic flows

8/12/2019 Symbolic computation of second-order normal forms for Hamiltonian systems relative to periodic flows

http://slidepdf.com/reader/full/symbolic-computation-of-second-order-normal-forms-for-hamiltonian-systems-relative 6/22

(b) With an obvious change of variable, we have:

(Fl sΥ )∗S (R) =

12π

0(t − π)(Fl s+ t

Υ )∗R dt = 12π

s+2 π

s(u − s − π)(Fl u

Υ )∗R du.

Differentiating both sides of this identity with respect to the parameter s, and takinginto account the 2 π− periodicity of the ow Fl s

Υ , it results:

dds

(Fl sΥ )∗S (R) = (Fl s

Υ )∗(R − R ).

The statement follows by recalling that Fl sΥ is a diffeomorphism, and the identity (see

[1]):dds

(Fl sΥ )∗S (R) = (Fl s

Υ )∗(LΥ S (R)) .

Finally, let us give some useful properties involving the averaging operators.

Proposition 3.4. For all R ∈ Γ T sr (M ), the operators LΥ , · , and S , satisfy the relations:

(a) LΥ R = LΥ R = 0.

(b) S (R) = S ( R ) = 0 .

(c) dα = d α , for all α ∈ Ω(M ).

Proof. Straightforward computations, making use of Proposition 3.3 and the fact that dcommutes with pull-backs.

4 The Hamiltonian case

Let (M, P ) be an m− dimensional Poisson manifold, where P ∈ ΓΛ 2T M is a Poisson bivectordetermining a bracket f, g = P (df, dg), for all f, g ∈ C ∞ (M ). For every f , its Hamiltonianvector eld X f ∈ X (M ) is given by X f (g) := f, g , for any g ∈ C ∞ (M ), equivalently,

X f = idf P. (3)

At any point the distribution spanned by the Hamiltonian vector elds is involutive, asa consequence of Jacobi’s identity for the Poisson bracket ·, ·. Thus, these Hamiltonianvector elds give rise to a foliation whose leaves turn out to be symplectic manifolds (see[20]). On each leaf S , the restriction P |S is a non-degenerate Poisson bivector eld whichdetermines a symplectic structure σS through:

σS (X f , X g) := f, g .Indeed, by a theorem of Weinstein ( [20]), the local structure of ( M, P ) can be described asfollows: for any p ∈ M there exists a chart ( U, φ) of M around p such that, if the coordinatesof φ : U → R m (2k + l = m) are q 1,...,q k , p1 ,...,p k , y1,...,y l, then

P |U =k

i=1

∂ ∂q i∧

∂ ∂p i

+ 12

l

i,j =1

ϕij (y1,...,y l) ∂ ∂y i

∧ ∂ ∂y j

, (4)

6

Page 7: Symbolic computation of second-order normal forms for  Hamiltonian systems relative to periodic flows

8/12/2019 Symbolic computation of second-order normal forms for Hamiltonian systems relative to periodic flows

http://slidepdf.com/reader/full/symbolic-computation-of-second-order-normal-forms-for-hamiltonian-systems-relative 7/22

Page 8: Symbolic computation of second-order normal forms for  Hamiltonian systems relative to periodic flows

8/12/2019 Symbolic computation of second-order normal forms for Hamiltonian systems relative to periodic flows

http://slidepdf.com/reader/full/symbolic-computation-of-second-order-normal-forms-for-hamiltonian-systems-relative 8/22

Proof. Recalling that d commutes with the averaging (Proposition 3.4 (c)), Remark 2, andthe preceding Corollary, we get:

iX g σ = − d g = − dg = iX g σ = i X g σ.

Hence, by the non-degeneracy of σ, X g = X g . Now, if g is S1− invariant, g = g, and soX g = X g .

Corollary 4.4. For any S1− invariant g ∈ C ∞ (S ), we have

LΥX g = [X Υ , X g] = 0.

Now, suppose that we are given a function H ∈ C ∞ (M ) on the Poisson manifold ( M, P )such that its Hamiltonian vector eld X H ∈ X (M ) has periodic ow (with frequency func-tion ω ∈ C ∞ (M ), ω > 0). Let Υ = 1

ω X H be the generator of the associated S1− action.From the results above we know that M is foliated by symplectic leaves S in such a waythat P |S is equivalent to a symplectic form σS (recall (4)), and these are invariant underHamiltonian ows. Thus:

0 = LX H P = LωΥ P = ωLΥ P − ωΥ

ω ∧idωP = ωLΥ P +

X H ∧X ω ,

where we have used the formula LfX A = f LX A − X ∧ idf A (valid for any function f ∈C ∞ (M ), vector eld X ∈ X (M ) and multivector eld A ∈ Γ (Λ T M ), see [17], p. 358), aswell as (3) and the fact that ω > 0. From this identity and the energy-period relation ( 6),we deduce that P is S1− invariant,

LΥ P = 0 .

Moreover, if g ∈ C ∞ (M ) is S1− invariant, the ow of its Hamiltonian vector eld X g leavesthe integral submanifolds S invariant and, as we have seen, on each of them it satisesLΥ X g = 0, so this is also true on M . In other words, the ows of Υ and X g commute onM . The following result exploits this fact.

Proposition 4.5. Let (M, P ) be a Poisson manifold, and H ∈ C ∞ (M ) such that its Hamil-tonian vector eld X H ∈ X (M ) has periodic ow. If f , g ∈ C ∞ (M ) and g is invariant under the induced S1− action, then:

(a) H, g = 0 .

(b) f, g = f , g.

Proof. Item ( a) is proved by a straightforward computation. Item ( b) is a direct consequenceof the S1− invariance of g and the fact that the ows of Υ and X g commute.

5 The main result

Let H ε = H 0 + εH 1+ 12 ε2H 2+ O(ε3) an ε− dependent Hamiltonian function which describes a

perturbed Hamiltonian system on a Poisson manifold ( M, P ), with associated bracket ·, ·.We will denote by X H ε = X H 0 + εX H 1 + 1

2 ε2X H 2 + O(ε3) the corresponding Hamiltonianvector eld.

8

Page 9: Symbolic computation of second-order normal forms for  Hamiltonian systems relative to periodic flows

8/12/2019 Symbolic computation of second-order normal forms for Hamiltonian systems relative to periodic flows

http://slidepdf.com/reader/full/symbolic-computation-of-second-order-normal-forms-for-hamiltonian-systems-relative 9/22

Denition 4. The perturbed Hamiltonian vector eld X H ε is in (Deprit) normal form relative to X H 0 of order k in ε if

[X H 0 , X H i ] = 0, for all i ∈ 1, 2,...,k . (7)

In terms of Hamiltonian functions, ( 7) is satised whenever

H 0 , H i = 0 , for all i ∈ 1, 2,...,k .

Theorem 5.1. Suppose that the ow of X H 0 is periodic with frequency function ω ∈C ∞ (M ), ω > 0. Then, there exists a canonical near-to-identity transformation Φε on (M, σ )which brings the perturbed Hamiltonian H ε to a Hamiltonian normal form relative to H 0 of arbitrary order in ε. In particular, the second order normal form can be expressed as:

H ε Φε = H 0 + ε H 1 + ε2

2H 2 + S

H 1

ω, H 1 + O(ε3). (8)

Proof. If the Hamiltonian vector eld X H 0 has periodic ow, the existence of the near-to-identity canonical transformation Φ ε is a well known fact [3, 6, 15, 16]. Here we give aexplicit formula for it.Let Φε be the ow of the perturbed vector eld Z ε = Z 0+ εZ 1 where Z 0 and Z 1 are the Hamil-tonian vector eld of the functions G0 = 1

ω S (H 1) and G1 = 1ω S (H 2 + S ( 1

ω H 1), H 1 + H 1 ),respectively. Using the Lie transform method [ 6, 8, 12, 13], the second order developmentof H ε Φε is given by:

H ε Φε = H 0 + ε (LZ 0 H 0 + H 1)

+ε2

2 L2Z 0 H 0 + 2 LZ 0 H 1 + LZ 1 H 0 + H 2 + O(ε

3) (9)

Now, we apply the results of the preceding sections to put this Hamiltonian in the form ( 8).To this end, we compute:

LZ 0 H 0 = −L X H 0S (

H 1) = H 1 − H 1,

L2Z 0 H 0 = LX G 0

( H 1 − H 1) = 1ω

S (H 1), H 1 − H 1,

LZ 0 H 1 = LX G 0H 1 =

S (H 1), H 1,

and, nally

LZ 1 H 0 = −L X H 0S (H 2 + S (

H 1), H 1 + H 1 )

= H 2 + S (1ω

H 1), H 1 − (H 2 + S (1ω

H 1), H 1 + H 1 ).

Substituting these identities into ( 9), we obtain the second-order normal form ( 8).

9

Page 10: Symbolic computation of second-order normal forms for  Hamiltonian systems relative to periodic flows

8/12/2019 Symbolic computation of second-order normal forms for Hamiltonian systems relative to periodic flows

http://slidepdf.com/reader/full/symbolic-computation-of-second-order-normal-forms-for-hamiltonian-systems-relative 10/22

Further simplication in the expression of the normal form can be achieved through theuse of Hopf variables, see subsection 9.4 below.

Part IISoftware implementation

To use the package, simply unpack it and copy the le pdynamics.mac in the contrib di-rectory of your Maxima installation (for instance, in a Unix box this directory will be some-thing as /usr/share/maxima/5.28.0/share/contrib/ , while in a Windows machine it willbe located at C: \ Program Files \ Maxima-5.28.0 \ share \ maxima \ 5.28.0 \ share \ contrib ,depending on the version number). If you place it somewhere else, you can use Maxima’sfile search command, as in file search( “ /home/johndoe/maxima/pdynamics.mac ” ) .In what follows, we assume that any one of these methods has been applied, so the packageis available to Maxima.

(%i1) load(pdynamics)$

In this part, we discuss the functions included in the package with examples of theirusage. In the next section we offer an example of the code, the function pbracket , makingsome comments about its implementation, but due to space reasons we omit the code forthe remaining functions. The interested reader can take a look at the source of the package,which for the most part is self-explanatory.

Let us say some words about the limitations of the package. As it is based on thecomputation of averages along the ow of a Hamiltonian vector eld, it involves at somepoint the symbolic computation of an integral (when determining the integral curves that

dene the ow). Thus, the package is as good as it is the Maxima symbolic integrator,which is far from perfect. It may happen that some integral can be done “by hand” andMaxima can not solve it, or that some other CAS (like Maple or Mathematica) can ndthe integral while Maxima can not. In these cases, the user can circumvent the difficulty byusing this external output to directly dene the Hamiltonian ow of the Hamiltonian understudy, say h, as phamflow(h):=[F1,...,Fn] , where F 1,...,F n are the components of theow, found by whatever means. But, of course, when some particular integral not solvablein closed form appears, the package is useless and numerical methods are required.

Another drawback is that the frequency function ω must be supplied by the user. Evenin the simplest cases, to determine in an automated way whether a certain function isperiodic and, if so, to compute its (shortest) period is a tricky task (for instance, consider

the Dirichlet function X Q ), for Maxima or for any other CAS1. Thus, we have preferredto avoid it here. In most practical cases, the Hamiltonian will be a perturbation of the

harmonic oscillator, so this seems to be not a serious problem 2.1 For a discussion related to Wolfram Alpha, see:

http://math.stackexchange.com/questions/141033/how-to-effectively-compute-a-periodic-function .2 Here is an example of what the user can do in most cases. Suppose we want to nd the period of

the function f (t) = p1 sin ωt/ω + q 1 cos ωt (see 8.7 below). In a Maxima session, do load(to poly solve) ,then f(t):=p1*sin(w*t)/w+q1*cos(w*t) , and nicedummies(%solve(f(t+T)-f(t),T)) . Among the solu-

10

Page 11: Symbolic computation of second-order normal forms for  Hamiltonian systems relative to periodic flows

8/12/2019 Symbolic computation of second-order normal forms for Hamiltonian systems relative to periodic flows

http://slidepdf.com/reader/full/symbolic-computation-of-second-order-normal-forms-for-hamiltonian-systems-relative 11/22

6 Poisson brackets

Here we implement a function for computing the Poisson bracket of two functions f, g ∈ R 2n :

f, g =

n

i=1

∂f ∂p i

∂g∂q i −

∂f ∂q i

∂g∂p i .

We must dene rst the functions in the form f (q 1, p1,...,q n , pn ). The order of the argumentsis important, but their names are not. The function pbracket always returns the answerin the standard form (with coordinates q 1, p1,...,q n , pn ).

pbracket(f,g):=block([n,Q,P,vars],n:length(args(lhs(apply(fundef,[f]))))/2,Q:makelist(concat(q,j),j,1,n),P:makelist(concat(p,j),j,1,n),vars:join(Q,P),lsum(-diff(apply(f,vars),Q[i])*diff(apply(g,vars),P[i])+diff(apply(f,vars),P[i])*diff(apply(g,vars),Q[i]),i,makelist(j,j,1,n)))$

The rst lines of this function appear repeatedly in other functions, so let us brieyexplain what they do. As the dimension n in R2n is variable, the rst thing to do is toknow it, and this can be achieved by looking at the number of arguments of the functionsf, g . The second line does that 3. Thus, if f is of the form f = f (a,b,c,d ) we know thatn = 2. Next, we form a list of the variables involved, naming them internally in a consistent

way as (q 1, p1,...,qn,pn ). To work iteratively we need a labelling and we have chosen itto be (q j , p j ) (note that given two lists Q : [q 1,...,qn ], P : [ p1,...,pn ], Maxima’s commandjoin will intersperse them). This labelling is done independently of the user’s one, so if thefunctions have been dened as, say, f = f (a,b,c,d) and g = g(x,y,z , t ), we will treat themas functions f = f (q 1, p1, q 2, p2), g = g(q 1, p1, q 2, p2) and the output f, g will be again afunction of ( q 1, p1, q 2, p2). The user can change then the name of the variables to whatevershe wants.

6.1 Example

Consider in R4 with coordinates ( q 1, p1 , q 2, p2) (we denote q = ( q 1, q 2), p = ( p1, p2) and|q | =

q 21 + q 22 , | p| =

p2

1 + p22) the functions 1

2 |q |2 , 12 | p|2 and q · p = q 1 p1 + q 2 p2 :

(%i2) normq(q1,p1,q2,p2):=(q1^2+q2^2)/2$

(%i3) normp(q1,p1,q2,p2):=(p1^2+p2^2)/2$

tions, there is the one of interest for us: 2 πk/ω , k ∈ Z .3 Thanks to R. Dodier, from the Maxima list, for this trick.

11

Page 12: Symbolic computation of second-order normal forms for  Hamiltonian systems relative to periodic flows

8/12/2019 Symbolic computation of second-order normal forms for Hamiltonian systems relative to periodic flows

http://slidepdf.com/reader/full/symbolic-computation-of-second-order-normal-forms-for-hamiltonian-systems-relative 12/22

(%i4) prodqp(q1,p1,q2,p2):=q1*p1+q2*p2$

These functions close in ( C ∞

(R4

), ., .) a Lie subalgebra isomorphic to sl 2(R ):(%i5) pbracket(normp,normq);

(%o5) p2 q 2 + p1 q 1

(%i6) pbracket(prodqp,normq);

(%o6) q 22 + q 12

(%i7) pbracket(prodqp,normp);

(%o7) − p22

− p12

6.2 Example

Consider a central force in R3, F , with potential V = U (r ), where r = x2 + y2 + z2 . Thecomponents of F are those of the gradient − grad V , and they are computed using the chainrule, as the dependence of U with r is undetermined. We can work in Maxima with anarbitrary U (r ) declaring its (also undetermined) derivative to be U ′ (r ):

(%i8) V(x,y,z):=U(sqrt(x^2+y^2+z^2))$

(%i9) gradef(U(r),U\’(r))$

For instance, F x = − ∂V/∂x is given by

(%i10) diff(V(x,y,z),x);

(%o10)x U ′ z2 + y2 + x2

z2 + y2 + x2

For a particle moving in R3 under the inuence of U , its Hamiltonian is

(%i11) Hcentral(x,px,y,py,z,pz):=(px^2+py^2+pz^2)/2 + V(x,y,z)$

and its angular momentum in the z direction

(%i12) L[z](x,px,y,py,z,pz):=x*py-y*px$

12

Page 13: Symbolic computation of second-order normal forms for  Hamiltonian systems relative to periodic flows

8/12/2019 Symbolic computation of second-order normal forms for Hamiltonian systems relative to periodic flows

http://slidepdf.com/reader/full/symbolic-computation-of-second-order-normal-forms-for-hamiltonian-systems-relative 13/22

Then, no matter what the explicit expression of U is, the z component of the momentumis an integral of motion:

(%i13) pbracket(Hcentral,L[z]);

(%o13) 0

The same is true for the other components of L = ( Lx , Ly , Lz )4.

7 Hamilton’s equations

Given a Hamiltonian H (q 1, p1,...,q n , pn ), the evolution equation for any classical observablef = f (q 1, p1 ,...,q n , pn ) along a physical trajectory c(t) = ( q 1(t), p1(t),...,q n (t), pn (t)) inphase space, is

dc(t)dt

= H, f . (10)

In particular, the canonical (Hamilton’s) evolution equations are:

dq idt

= ∂H ∂p i

d pi

dt = −

∂H ∂q i

, (11)

for i ∈ 1,...,n . In order to write down the evolution equation for an observable, we rstsolve (11) and then substitute the obtained solutions q i = q i (t), pi = pi (t) into ( 10).

7.1 Canonical equations

The following functions return and solve the canonical equations. The Hamiltonian mustbe dened rst in the form H = H (q 1, p1 ,...,q n , pn ). The ordering of the arguments of H is important, but their names are not. The function pcanonical eqs gives a list of theform [eq q1 , eq p1 ,...,eq qn , eq pn ] where each eq qi , eq pi is the rst-order equation correspondingto q i (t), pi(t), respectively. On the other hand, pcanonical sol returns a list of the form[q 1(t), p1(t),...,q n (t), pn (t)], the solutions to these equations.

7.2 Example

The freely falling particle in an homogeneous gravitational eld has a Hamiltonian:

(%i14) K(q,p):=p^2/2+m*g*q$

so the canonical equations are:4 In fact, it is true that the square norm of the total angular momentum L 2 = L2

x + L 2y + L 2

z has vanishingPoisson bracket with Hcentral , but we can’t compute directly pbracket(Hcentral, L 2

x + L2y + L2

z ) becauseL 2

x + L 2y + L 2

z is not a single explicit function. While it is possible to implement properties such as bilinearity,the Jacobi identity or the Leibniz rule in the denition of pbracket , the form presented here is sufficient forour purposes.

13

Page 14: Symbolic computation of second-order normal forms for  Hamiltonian systems relative to periodic flows

8/12/2019 Symbolic computation of second-order normal forms for Hamiltonian systems relative to periodic flows

http://slidepdf.com/reader/full/symbolic-computation-of-second-order-normal-forms-for-hamiltonian-systems-relative 14/22

(%i15) pcanonical_eqs(K);

(%o15) [ d

d t q1 (t) = p1 ( t) ,

d

d t p1 (t) = − g m]

with solutions:

(%i16) pcanonical_sol(K);

(%o16) [q1(t) = −g m t 2

2 + p1 (0) t + q1(0) , p1 (t) = p1(0) − g m t ]

7.3 Example

For the harmonic oscillator of frequency ω > 0, with Hamiltonian:

(%i17) assume(%omega > 0);

(%o17) [ω > 0]

(%i18) Hosc(x,y):=y^2/2+%omega^2*x^2/2;

(%o18) Hosc (x, y) := y2

2 +

ω2 x2

2the canonical equations are:

(%i19) pcanonical_eqs(Hosc);

(%o19) [ dd t

q1 (t) = p1 ( t) , dd t

p1 (t) = − ω2 q1 (t)]

with solutions:

(%i20) pcanonical_sol(Hosc);

(%o20) [q1(t) = p1(0) sin( ω t)

ω +q1 (0) cos ( ω t) , p1 (t) = p1 (0) cos ( ω t)− q1(0) ω sin( ω t)]

7.4 Evolution of observables

The function pevolution computes the evolution of an observable f = f (q 1, p1,...,q n , pn )with respect to a Hamiltonian H = H (q 1, p1,...,q n , pn ). It needs that the functions pbracketand pcanonical sol be previously loaded.

7.5 Example

Let us do a little sanity check. If the observable is one of the coordinates q i , its evolutionmust coincide with that resulting from the canonical equations. In this case we compute

14

Page 15: Symbolic computation of second-order normal forms for  Hamiltonian systems relative to periodic flows

8/12/2019 Symbolic computation of second-order normal forms for Hamiltonian systems relative to periodic flows

http://slidepdf.com/reader/full/symbolic-computation-of-second-order-normal-forms-for-hamiltonian-systems-relative 15/22

Page 16: Symbolic computation of second-order normal forms for  Hamiltonian systems relative to periodic flows

8/12/2019 Symbolic computation of second-order normal forms for Hamiltonian systems relative to periodic flows

http://slidepdf.com/reader/full/symbolic-computation-of-second-order-normal-forms-for-hamiltonian-systems-relative 16/22

8.5 The Hamiltonian vector eld

Assume the manifold R2n endowed with the canonical symplectic form

Ω = d p1 ∧ dq 1 + · · · + d pn ∧ dq n . (12)

Given a Hamiltonian H = H (q 1, p1,...,q n , pn ), its associated Hamiltonian vector eld X H is given by the condition iX H Ω = − dH . This is easily seen to lead to the components

X =∂H ∂p1

, −∂H ∂q 1

,..., ∂H ∂pn

, −∂H ∂q n

,

in the basis ∂/∂q 1 ,∂/∂p 1 ,...,∂/∂q n ,∂/∂p n . The function phamvect computes X H fromH , expressing its components in the form [ X 1(q, p),...,X 2n (q, p)].

8.6 Example

For the harmonic oscillator, the Hamiltonian vector eld is:

(%i25) phamvect(Hosc);

(%o25) [ p1, − ω2 q 1]

8.7 The Hamiltonian ow

Suppose we have a Hamiltonian vector eld on R2n endowed with the canonical symplecticform (12) above. Given a Hamiltonian H = H (q 1, p1,...,q n , pn ), the ow of its associatedvector eld X H is called the Hamiltonian ow.

The function phamflow computes the Hamiltonian ow determined by a Hamiltonian H . Itis just the composition of pvectflow and phamvect .For example, if H is taken to be the Hamiltonian of the harmonic oscillator we recoverprevious results (cfr. Examples 8.4 and 8.6):

(%i26) phamflow(Hosc);

(%o26) [ p1sin(ω t)

ω + q 1cos(ω t) , p1cos(ω t) − ω q 1sin(ω t)]

9 The averaging method for normal forms

9.1 Averaging of a function respect to a periodic ow

Suppose we have a Hamiltonian system (with phase space Rm ) on which there is anS1− action with generator X . Then, the ow Fl t

X is periodic. The average of an observableg with respect to the induced S1− action is the function dened by

g = 12π

0(Fl t

X )∗g dt.

16

Page 17: Symbolic computation of second-order normal forms for  Hamiltonian systems relative to periodic flows

8/12/2019 Symbolic computation of second-order normal forms for Hamiltonian systems relative to periodic flows

http://slidepdf.com/reader/full/symbolic-computation-of-second-order-normal-forms-for-hamiltonian-systems-relative 17/22

Page 18: Symbolic computation of second-order normal forms for  Hamiltonian systems relative to periodic flows

8/12/2019 Symbolic computation of second-order normal forms for Hamiltonian systems relative to periodic flows

http://slidepdf.com/reader/full/symbolic-computation-of-second-order-normal-forms-for-hamiltonian-systems-relative 18/22

The command pnormal2 performs the necessary computations given the Hamiltonians H 0,H 1, H 2, and the parameter ǫ. Another variable ω (the frequency function for the ow of X H 0 ) is optional: if it is not included, it is assumed that this frequency is ω = 1. Thatfunction ω, if included in the argument of pnormal2 , must have been previously dened.

9.3 Example: The Henon-Heiles Hamiltonian

This example is taken from [ 7]. The Hamiltonian is

K = 12

( p21 + p2

2) + 12

(q 21 + q 22) + ǫq 313

− q 1q 22

(note that the perturbation term is an homogeneous polynomial of degree 3), so we dene:

(%i32) K0(q1,p1,q2,p2):=(p1^2+p2^2)/2+(q1^2+q2^2)/2;

(%o32) K0 (q 1, p1, q 2, p2) := p12 + p22

2 + q 12 + q 22

2(%i33) K1(q1,p1,q2,p2):=q1^3/3-q1*q2^2;

(%o33) K1 (q 1, p1, q 2, p2) := q 13

3 − q 1 q 22

(%i34) K2(q1,p1,q2,p2):=0;

(%o34) K2 (q 1, p1, q 2, p2) := 0

The frequency function for the ow of X K 0 is readily found to be (see footnote 2 in page11):

(%i35) u(q1,p1,q2,p2):=1$

The second-order normal form is then 5:

(%i36) pnormal2(K0,K1,K2,%epsilon,u);

(%o36)

p22 + p12

2 +

q 22 + q 12

2 −

ǫ2

485 q 24 + 10 q 12 + 10 p22 − 18 p12 q 22

+56 p1 p2 q 1 q 2 + 5 q 14 + 10 p12 − 18 p22 q 12 + 5 p24 + 10 p12 p22 + 5 p14

9.4 Hopf variables

It is usual to express the normal form in terms of the Hopf variables w1 , w2 , w3, w4, as aprevious step to carry on the reduction of symmetry process (see [6],[7]). For the case inwhich H 0 is the Hamiltonian of the 2 D − harmonic oscillator, these variables form a system

5 We have slightly edited the output in order to make it more readable.

18

Page 19: Symbolic computation of second-order normal forms for  Hamiltonian systems relative to periodic flows

8/12/2019 Symbolic computation of second-order normal forms for Hamiltonian systems relative to periodic flows

http://slidepdf.com/reader/full/symbolic-computation-of-second-order-normal-forms-for-hamiltonian-systems-relative 19/22

of functionally independent generators of the algebra of rst integrals of H 0, and are denedas w1 = 2( q 1q 2 + p1 p2), w2 = 2( q 1 p2 − q 2 p1), w3 = q 21 + p2

1 − q 22 − p22, w4 = q 21 + q 22 + p2

1 + p22. The

functions phopf2 , phopf4 attempt to express a given expression (a homogeneous polynomialin the variables ( q 1, q 2, p1, p2) of degree 2 and 4, respectively) in terms of them. To apply

these functions to the output of pnormal2 above, we can select the independent term andthe coefficient of ǫ2 as follows:

(%i37) phopf2(coeff(%,%epsilon,0));

(%o37) w4

2(%i38) phopf4(coeff(%th(2),%epsilon^2));

(%o38) w2

2 (48%r 1 + 7)48

− w2

4 (48%r 1 + 5)48

+ w23 %r 1 + w2

1 %r 1

The formulas appearing in [ 7] are recovered by choosing the value 0 of the parameter:(%i39) subst(%r1=0,%);

(%o39) 7w2

248

− 5w2

448

Thus, the second-order normal form of the Henon-Heiles system is

H ǫ Φǫ = w4

2 +

ǫ2

487w2

2 − 5w24 + O(ǫ3).

9.5 Example: The spring pendulum

Consider the case of the Hamiltonian of a spring-pendulum (see [5],[4],[10]):

H (q 1, p1, q 2, p2) = p2

1 + p22

2 +

q 21 + q 222

− ǫ2

q 21(1 + q 2),

which is that of a perturbed system H 0 + ǫH 1, where

H 0(q 1, p1, q 2, p2) = p2

1 + p22

2 +

q 21 + q 222

,

and

H 1(q 1, p1, q 2, p2) = −q 21(1 + q 2)

2 .

Note that the perturbation term now is not homogeneous. We dene the terms of theperturbed Hamiltonian:

(%i40) H0(q1,p1,q2,p2):=(p1^2+p2^2)/2+(q1^2+q2^2)/2;

(%o40) H0 (q 1, p1, q 2, p2) := p12 + p22

2 +

q 12 + q 22

2

19

Page 20: Symbolic computation of second-order normal forms for  Hamiltonian systems relative to periodic flows

8/12/2019 Symbolic computation of second-order normal forms for Hamiltonian systems relative to periodic flows

http://slidepdf.com/reader/full/symbolic-computation-of-second-order-normal-forms-for-hamiltonian-systems-relative 20/22

(%i41) H1(q1,p1,q2,p2):=-q1^2*(1+q2)/2;

(%o41) H1 (q 1, p1, q 2, p2) :=− q 12 (1 + q 2)

2(%i42) H2(q1,p1,q2,p2):=0;

(%o42) H2 (q 1, p1, q 2, p2) := 0

and compute the normal form in the original variables 6. Note that we do not explicitlywrite the frequency function (thus assuming it is the constant 1):

(%i43) pnormal2(H0,H1,H2,%epsilon);

(%o43)

p22 + p122

+ q 22 + q 122

− ǫ4

q 12 + p12

− ǫ2

19220 q 12 − 4 p12 q 22 + 48 p1 p2 q 1 q 2 + 5 q 14+

− 4 p22 + 10 p12 + 12 q 12 + 20 p12 p22 + 5 p14 + 12 p12

As before, we can express in terms of the Hopf variables the independent terms and thecoefficient of ǫ:

(%i44) phopf2(coeff(%,%epsilon,0));

(%o44) w42

(%i45) phopf2(coeff(%th(2),%epsilon,1));

(%o45) − w4

8 −

w3

8Note that the coefficient of ǫ2 is not a homogeneous polynomial (of degree 4): there are

two 2− degree terms: ( q 21 + p21)/ 16. Thus, it does not make sense to apply phopf4 , as this

would lead to an error. Luckily, these terms can be easily expressed in terms of the variablesw1 , w2, w3, w4 (as (q 21 + p2

1)/ 16 = ( w4 + w3)/ 32) and then we can analyse the remainder,which is a polynomial of degree 4:

(%i46) phopf4(coeff(%th(3),%epsilon,2)+12*(q1^2+p1^2)/192);

(%o46) − w2

4 (768%r 2 + 25)768

+ w2

3 (256%r 2 + 5)256

+ w2

2 (32%r 2 + 1)32

+ w21 %r 2 −

5w3 w4

384Let us take the simplest solution:

6 Again, we have slightly edited the output.

20

Page 21: Symbolic computation of second-order normal forms for  Hamiltonian systems relative to periodic flows

8/12/2019 Symbolic computation of second-order normal forms for Hamiltonian systems relative to periodic flows

http://slidepdf.com/reader/full/symbolic-computation-of-second-order-normal-forms-for-hamiltonian-systems-relative 21/22

Page 22: Symbolic computation of second-order normal forms for  Hamiltonian systems relative to periodic flows

8/12/2019 Symbolic computation of second-order normal forms for Hamiltonian systems relative to periodic flows

http://slidepdf.com/reader/full/symbolic-computation-of-second-order-normal-forms-for-hamiltonian-systems-relative 22/22

[11] W . B. Gordon, ‘On the relation between period and energy in periodic dynamicalsystems’, J. Math. Mech. , 19 (1969) 111–114.

[12] G . Hori, ‘Theory of general perturbations with unspecied canonical variables’, Publ.

Astron. Soc. Japan , 18

(1966) 287–296.[13] A . A. Kamel, ‘Perturbation method in the theory of nonlinear oscillations’, Celest.

Mech., 3 (1970) 90–106.

[14] M axima.sourceforge.net, Maxima, a Computer Algebra System . Version 5.28.0 (2012).http://maxima.sourceforge.net/ .

[15] K . R. Meyer, ‘Normal forms for Hamiltonian systems’, Celest. Mech. , 9 (1974) 517–522.

[16] K . R. Meyer G. R. Hall, Introduction to Hamiltonian dynamical systems and the N-Body problem (Springer-Verlag, New York, 1992).

[17] P

. W. Michor, Topics in Differential Geometry (American Mathematical Society,Rhode Island, 2008).

[18] J . Moser, ‘Regularization of Kepler’s problem and the averaging method on a manifold’,Comm. on Pure and Appl. Math. , 23 , Issue 4 (1970) 609–636.

[19] J . Murdock, J. A. Sanders, F. Verhulst, Averaging method in nonlinear dynamical systems (2nd. Ed.) (Springer Verlag, New York, 2007).

[20] A . Weinstein, ‘The local structure of Poisson manifolds’, J. Differential Geom. , 18 n.3 (1983) 523–557.

22