hamilton eqns - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


DEtools

  

hamilton_eqs

  

generate Hamilton equations

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

hamilton_eqs(H)

Parameters

H

-

any algebraic expression representing the Hamiltonian

Description

• 

hamilton_eqs receives a Hamiltonian and returns a sequence with Hamilton's equations and a list with the p's and q's involved.

• 

Some useful conventions were adopted to represent the p's and q's. All p's and q's must appear as pn or qn where n is a positive integer, as in p1, p2, and the time dependence need not be explicit, as in pn or qn instead of pn(t) or qn(t). The Hamilton equations will be automatically returned using pn(t) or qn(t).

• 

This function is part of the DEtools package, and so it can be used in the form hamilton_eqs(..) only after executing the command with(DEtools). However, it can always be accessed through the long form of the command by using DEtools[hamilton_eqs](..).

Examples

> 

with⁡DEtools:

The Toda Hamiltonian

> 

H≔12⁢p12+p22+124⁢exp⁡2⁢q2+2⁢sqrt⁡3⁢q1+exp⁡2⁢q2−2⁢sqrt⁡3⁢q1+exp⁡−4⁢q2−18

H≔p122+p222+ⅇ2⁢q2+2⁢3⁢q124+ⅇ2⁢q2−2⁢3⁢q124+ⅇ−4⁢q224−18

(1)
> 

hamilton_eqs⁡H

ⅆⅆtp1⁡t=−3⁢ⅇ2⁢q2⁡t+2⁢3⁢q1⁡t12+3⁢ⅇ2⁢q2⁡t−2⁢3⁢q1⁡t12,ⅆⅆtp2⁡t=−ⅇ2⁢q2⁡t+2⁢3⁢q1⁡t12−ⅇ2⁢q2⁡t−2⁢3⁢q1⁡t12+ⅇ−4⁢q2⁡t6,ⅆⅆtq1⁡t=p1⁡t,ⅆⅆtq2⁡t=p2⁡t,p1⁡t,p2⁡t,q1⁡t,q2⁡t

(2)

The Henon-Heiles Hamiltonian

> 

H≔12⁢p12+p22+q12+q22+q12⁢q2−q233

H≔12⁢p12+12⁢p22+12⁢q12+12⁢q22+q12⁢q2−13⁢q23

(3)
> 

hamilton_eqs⁡H

ⅆⅆtp1⁡t=−2⁢q1⁡t⁢q2⁡t−q1⁡t,ⅆⅆtp2⁡t=−q1⁡t2+q2⁡t2−q2⁡t,ⅆⅆtq1⁡t=p1⁡t,ⅆⅆtq2⁡t=p2⁡t,p1⁡t,p2⁡t,q1⁡t,q2⁡t

(4)

See Also

DEtools

generate_ic

PDEtools

poincare

Poincare