generate Hamilton equations
any algebraic expression representing the Hamiltonian
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](..).
The Toda Hamiltonian
H ≔ 1⁢p12+p222+1⁢ⅇ2⁢q2+2⁢3⁢q1+ⅇ2⁢q2−2⁢3⁢q1+ⅇ−4⁢q224−18
H ≔ 12⁢p12+12⁢p22+124⁢ⅇ2⁢q2+2⁢3⁢q1+124⁢ⅇ2⁢q2−2⁢3⁢q1+124⁢ⅇ−4⁢q2−18
The Henon-Heiles Hamiltonian
H ≔ 1⁢p12+p22+q12+q222+q12⁢q2−q233
H ≔ 12⁢p12+12⁢p22+12⁢q12+12⁢q22+q12⁢q2−13⁢q23
Download Help Document
What kind of issue would you like to report? (Optional)
Thank you for submitting feedback on this help document. Your feedback will be used
to improve Maple's help in the future.