<?xml version="1.0" encoding="UTF-8"?>

<record version="4" id="97">
 <title>Maple for PlanetPhysics</title>
 <name>MapleForPlanetPhysics</name>
 <created>2005-09-02 12:26:13</created>
 <modified>2005-09-02 23:23:05</modified>
 <type>Definition</type>
 <creator id="1" name="bloftin"/>
 <modifier id="1" name="bloftin"/>
 <author id="1" name="bloftin"/>
 <classification>
	<category scheme="msc" code="01.30.Xx"/>
 </classification>
 <preamble>% this is the default PlanetMath preamble.  as your knowledge
% of TeX increases, you will probably want to edit this, but
% it should be fine as is for beginners.

% almost certainly you want these
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsfonts}

% used for TeXing text within eps files
%\usepackage{psfrag}
% need this for including graphics (\includegraphics)
\usepackage{graphicx}
% for neatly defining theorems and propositions
%\usepackage{amsthm}
% making logically defined graphics
%\usepackage{xypic}

% there are many more packages, add them here as you need them
\usepackage{maplestd2e}
% define commands here</preamble>
 <content>%% Created by Maple 10, Mac OS X
%% Source Worksheet: poincare.mws
%% Generated: Fri Sep 02 21:05:07 MDT 2005
\def\emptyline{\vspace{12pt}}
\pagestyle{empty}
\DefineParaStyle{Maple Heading 4}
\DefineParaStyle{Maple Heading 2}
\DefineParaStyle{Maple Text Output}
\DefineParaStyle{Maple Bullet Item}
\DefineParaStyle{Maple Warning}
\DefineParaStyle{Maple Error}
\DefineParaStyle{Maple Dash Item}
\DefineParaStyle{Maple Heading 3}
\DefineParaStyle{Maple Heading 1}
\DefineParaStyle{Maple Title}
\DefineParaStyle{Maple Normal}
\DefineCharStyle{Maple 2D Input}
\DefineCharStyle{Maple Maple Input}
\DefineCharStyle{Maple 2D Output}
\DefineCharStyle{Maple 2D Math}
\DefineCharStyle{Maple Hyperlink}
\begin{maplelatex}\begin{center}\begin{Maple Normal}{\textbf{Illustrative Session for the Poincare Package}\textbf{}}\end{Maple Normal}
\end{center}\end{maplelatex}\begin{maplelatex}\begin{Maple Normal}{\textbf{Note:} the results in this worksheet were generated on a Pentium-II 400 PC with 128 MB RAM.  For testing this package on a computer that has a slower processor, try changing the stepsize, iterations, or even the time interval, as explained in the help pages.
}\end{Maple Normal}
\end{maplelatex}\begin{mapleinput}
\mapleinline{active}{1d}{\textbf{restart;}}{}
\end{mapleinput}
\begin{mapleinput}
\mapleinline{active}{1d}{\textbf{with(DEtools,poincare,generate_ic,zoom,hamilton_eqs);}}{}
\end{mapleinput}

\mapleresult
\begin{maplelatex}\mapleinline{inert}{2d}{%[poincare, generate_ic, zoom, hamilton_eqs]}{
$[{\it poincare},{\it generate\_ic},{\it zoom},{\it hamilton\_eqs}\\
\mbox{}]$}
\end{maplelatex}\begin{maplelatex}\begin{Maple Heading 1}{\textbf{The Toda Hamiltonian}}\end{Maple Heading 1}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{\textbf{Reference: }A.J. Lichtenberg and M.A. Lieberman, "Regular and Stochastic Motion", \textit{Applied Mathematical Sciences} 38 (New York: Springer Verlag, 1994).}\end{Maple Normal}
\textbf{H := 1/2*(p1\symbol{94}2 + p2\symbol{94}2) + 1/24*(exp(2*q2+2*sqrt(3)*q1) + exp(2*q2-2*sqrt(3)*q1) + exp(-4*q2))-1/8;}\end{maplelatex}
\mapleresult
\begin{maplelatex}\mapleinline{inert}{2d}{%H := p1^2/2+p2^2/2+1/24*exp(2*q2+2*3^(1/2)*q1)+1/24*exp(2*q2-2*3^(1/2)*q1)+1/24*exp(-4*q2)-1/8}{
$H\, := \,1/2\,{{\it p1}}^{2}+1/2\,{{\it p2}}^{2}+1/24\,{e^{2\,{\it q2}+2\,\sqrt {3}{\it q1}}}\\
\mbox{}+1/24\,{e^{2\,{\it q2}-2\,\sqrt {3}{\it q1}}}+1/24\,{e^{-4\,{\it q2}}}-1/8$}
\end{maplelatex}\begin{mapleinput}
\mapleinline{active}{1d}{\textbf{H, t=-150..150, \{[0,.1,1.4,.1,0]\}:}}{}
\end{mapleinput}
\begin{mapleinput}
\mapleinline{active}{1d}{\begin{Maple Normal}{\textbf{poincare(%, stepsize=.05,iterations=5); }(12 sec.)}\end{Maple Normal}
}{}
\end{mapleinput}

\mapleresult
\begin{maplelatex}\mapleinline{inert}{2d}{%_____________________________________________________}{
\[{\it \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_}\]}
\end{maplelatex}\begin{maplelatex}\mapleinline{inert}{2d}{%`H = .99005020`, `  Initial conditions:`, t = 0, p1 = .1, p2 = 1.4, q1 = .1, q2 = 0}{
$\mbox {{\tt `H = .99005020`}},\,\mbox {{\tt `  Initial conditions:`}},\,t=0,\,{\it p1}= 0.1,\,{\it p2}= 1.4,\,{\it q1}= 0.1,\,{\it q2}=0$}
\end{maplelatex}\begin{maplelatex}\mapleinline{inert}{2d}{%`Number of points found crossing the (p1,q1) plane: 127`}{
$\mbox {{\tt `Number of points found crossing the (p1,q1) plane: 127`}}$}
\end{maplelatex}\begin{maplelatex}\mapleinline{inert}{2d}{%`Maximum H deviation : .5740000000e-5 %`}{
$\mbox {{\tt `Maximum H deviation : .5740000000e-5 \%`}}$}
\end{maplelatex}\begin{maplelatex}\mapleinline{inert}{2d}{%_____________________________________________________}{
\[{\it \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_}\]}
\end{maplelatex}\begin{maplelatex}\mapleinline{inert}{2d}{%`Time consumed: 12 seconds`}{
$\mbox {{\tt `Time consumed: 12 seconds`}}$}
\end{maplelatex}\mapleplot{poincareplot1.eps}
\begin{maplelatex}\begin{Maple Normal}{Figure 1.a. shows a 2-D surface-of-section (2PS) over the q2=0 plane, with 127 intersection points lying on smooth curves.
}\end{Maple Normal}
\end{maplelatex}\begin{mapleinput}
\mapleinline{active}{1d}{\begin{Maple Normal}{\textbf{poincare(%%,stepsize=.05,iterations=5,scene=[p2,q2]); }(13 sec.)}\end{Maple Normal}
}{}
\end{mapleinput}

\mapleresult
\begin{maplelatex}\mapleinline{inert}{2d}{%_____________________________________________________}{
\[{\it \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_}\]}
\end{maplelatex}\begin{maplelatex}\mapleinline{inert}{2d}{%`H = .99005020`, `  Initial conditions:`, t = 0, p1 = .1, p2 = 1.4, q1 = .1, q2 = 0}{
$\mbox {{\tt `H = .99005020`}},\,\mbox {{\tt `  Initial conditions:`}},\,t=0,\,{\it p1}= 0.1,\,{\it p2}= 1.4,\,{\it q1}= 0.1,\,{\it q2}=0$}
\end{maplelatex}\begin{maplelatex}\mapleinline{inert}{2d}{%`Number of points found crossing the (p2,q2) plane: 146`}{
$\mbox {{\tt `Number of points found crossing the (p2,q2) plane: 146`}}$}
\end{maplelatex}\begin{maplelatex}\mapleinline{inert}{2d}{%`Maximum H deviation : .5730000000e-5 %`}{
$\mbox {{\tt `Maximum H deviation : .5730000000e-5 \%`}}$}
\end{maplelatex}\begin{maplelatex}\mapleinline{inert}{2d}{%_____________________________________________________}{
\[{\it \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_}\]}
\end{maplelatex}\begin{maplelatex}\mapleinline{inert}{2d}{%`Time consumed: 13 seconds`}{
$\mbox {{\tt `Time consumed: 13 seconds`}}$}
\end{maplelatex}\mapleplot{poincareplot2.eps}
\begin{maplelatex}\begin{Maple Normal}{Figure 1.b is a 2PS over the q1=0 plane with 146 intersection points. The smoothness of the curves in both (\textit{p,q}) planes is related to the integrability of the system.
}\end{Maple Normal}
\end{maplelatex}\begin{maplelatex}\begin{Maple Normal}{}\end{Maple Normal}
\begin{Maple Normal}{A Poincare space-of-section corresponding to Figure1.a can be manipulated with the mouse to obtain the following illustrative perspectives:}\end{Maple Normal}
\end{maplelatex}\begin{mapleinput}
\mapleinline{active}{1d}{\begin{Maple Normal}{\textbf{F2 := poincare(H,t=-100..100, }(11 sec.)\textbf{\{[0,.1,1.4,.1,0]\},stepsize=.1,iterations=4,scene=[p1=-1.5..1.5,q1=-1.5..1.5,q2=-1.2..1.3],3):}}\end{Maple Normal}
}{}
\end{mapleinput}

\mapleresult
\begin{maplelatex}\mapleinline{inert}{2d}{%_____________________________________________________}{
\[{\it \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_}\]}
\end{maplelatex}\begin{maplelatex}\mapleinline{inert}{2d}{%`H = .99005020`, `  Initial conditions:`, t = 0, p1 = .1, p2 = 1.4, q1 = .1, q2 = 0}{
$\mbox {{\tt `H = .99005020`}},\,\mbox {{\tt `  Initial conditions:`}},\,t=0,\,{\it p1}= 0.1,\,{\it p2}= 1.4,\,{\it q1}= 0.1,\,{\it q2}=0$}
\end{maplelatex}\begin{maplelatex}\mapleinline{inert}{2d}{%`Maximum H deviation : .3758100000e-3 %`}{
$\mbox {{\tt `Maximum H deviation : .3758100000e-3 \%`}}$}
\end{maplelatex}\begin{maplelatex}\mapleinline{inert}{2d}{%_____________________________________________________}{
\[{\it \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_}\]}
\end{maplelatex}\begin{maplelatex}\mapleinline{inert}{2d}{%`Time consumed: 11 seconds`}{
$\mbox {{\tt `Time consumed: 11 seconds`}}$}
\end{maplelatex}\begin{mapleinput}
\mapleinline{active}{1d}{\textbf{F2;}}{}
\end{mapleinput}

\mapleresult
\mapleplot{poincareplot3d3.eps}
\begin{maplelatex}\begin{Maple Normal}{Figure 2.a  - 3-D projection of a surface of section (3PS) showing a KAM surface of regular trajectories.  The plot has been manipulated with the mouse to produce a view at \begin{maplelatex}\mapleinline{inert}{2d}{%Theta = -20}{
\[\Theta=-20\]}
\end{maplelatex}, \begin{maplelatex}\mapleinline{inert}{2d}{%Phi = 75}{
\[\Phi=75\]}
\end{maplelatex}.

 }\end{Maple Normal}
\end{maplelatex}\begin{mapleinput}
\mapleinline{active}{1d}{\textbf{F2;}}{}
\end{mapleinput}

\mapleresult
\mapleplot{poincareplot3d4.eps}
\begin{maplelatex}\begin{Maple Normal}{Figure 2.b The same figure was manipulated with the mouse to display a plane projection of the 3PS (at \begin{maplelatex}\mapleinline{inert}{2d}{%Theta = 0}{
\[\Theta=0\]}
\end{maplelatex}, \begin{maplelatex}\mapleinline{inert}{2d}{%Phi = -180}{
\[\Phi=-180\]}
\end{maplelatex}) showing how the intersection points are joined outside the 2PS.\textbf{
}}\end{Maple Normal}
\end{maplelatex}\begin{maplelatex}\begin{Maple Normal}{}\end{Maple Normal}
\begin{Maple Normal}{Another indication of the integrability of the system is that regular curves exist whatever the value of H. As an example of this, a surface-of-section (one solution curve), and a related 3-D projection, at H=256, can be built as follows:}\end{Maple Normal}
\begin{Maple Normal}{}\end{Maple Normal}
\begin{Maple Normal}{A set with one list of initial conditions satisfying the Hamiltonian constraint (H0=256):}\end{Maple Normal}
%\textbf{ics_256 := generate_ic(H,\{t=0,p2=22,q1=0,q2=0,energy=256\},1):}\textbf{poincare(H,t=-50..50,ics_256,stepsize=.005,iterations=4,scene=[p2,q2]);}\end{maplelatex}

\mapleresult
\begin{maplelatex}\mapleinline{inert}{2d}{%_____________________________________________________}{
\[{\it \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_}\]}
\end{maplelatex}\begin{maplelatex}\mapleinline{inert}{2d}{%`H = 256.00000`, `  Initial conditions:`, t = 0., p1 = 5.291502622, p2 = 22., q1 = 0., q2 = 0.}{
$\mbox {{\tt `H = 256.00000`}},\,\mbox {{\tt `  Initial conditions:`}},\,t= 0.0,\,{\it p1}= 5.291502622,\,{\it p2}= 22.0,\,{\it q1}= 0.0,\,{\it q2}= 0.0$}
\end{maplelatex}\begin{maplelatex}\mapleinline{inert}{2d}{%`Number of points found crossing the (p2,q2) plane: 342`}{
$\mbox {{\tt `Number of points found crossing the (p2,q2) plane: 342`}}$}
\end{maplelatex}\begin{maplelatex}\mapleinline{inert}{2d}{%`Maximum H deviation : .3289900000e-3 %`}{
$\mbox {{\tt `Maximum H deviation : .3289900000e-3 \%`}}$}
\end{maplelatex}\begin{maplelatex}\mapleinline{inert}{2d}{%_____________________________________________________}{
\[{\it \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_}\]}
\end{maplelatex}\begin{maplelatex}\mapleinline{inert}{2d}{%`Time consumed: 39 seconds`}{
$\mbox {{\tt `Time consumed: 39 seconds`}}$}
\end{maplelatex}\mapleplot{poincareplot5.eps}
\begin{maplelatex}\begin{Maple Normal}{Figure 3.a shows smooth curves on the 2PS, q1=0 plane.
                 }\end{Maple Normal}
\end{maplelatex}\begin{mapleinput}
\mapleinline{active}{1d}{\textbf{F3b := poincare(H,t=0..20,ics_256,stepsize=.01,iterations=4,scene=[p2,q2,q1],3):}}{}
\end{mapleinput}

\mapleresult
\begin{maplelatex}\mapleinline{inert}{2d}{%_____________________________________________________}{
\[{\it \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_}\]}
\end{maplelatex}\begin{maplelatex}\mapleinline{inert}{2d}{%`H = 256.00000`, `  Initial conditions:`, t = 0., p1 = 5.291502622, p2 = 22., q1 = 0., q2 = 0.}{
$\mbox {{\tt `H = 256.00000`}},\,\mbox {{\tt `  Initial conditions:`}},\,t= 0.0,\,{\it p1}= 5.291502622,\,{\it p2}= 22.0,\,{\it q1}= 0.0,\,{\it q2}= 0.0$}
\end{maplelatex}\begin{maplelatex}\mapleinline{inert}{2d}{%`Maximum H deviation : .4215140000e-2 %`}{
$\mbox {{\tt `Maximum H deviation : .4215140000e-2 \%`}}$}
\end{maplelatex}\begin{maplelatex}\mapleinline{inert}{2d}{%_____________________________________________________}{
\[{\it \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_}\]}
\end{maplelatex}\begin{maplelatex}\mapleinline{inert}{2d}{%`Time consumed: 11 seconds`}{
$\mbox {{\tt `Time consumed: 11 seconds`}}$}
\end{maplelatex}\begin{mapleinput}
\mapleinline{active}{1d}{\textbf{zoom(F3b,-30..30, -3..5, -4..4);}}{}
\end{mapleinput}

\mapleresult
\mapleplot{poincareplot3d6.eps}
\begin{maplelatex}\begin{Maple Normal}{Figure 3.b is a 3PS corresponding to Figure 3.a, displaying a KAM surface constituted by just one regular curve. The plot has been manipulated with the mouse to produce a view at \begin{maplelatex}\mapleinline{inert}{2d}{%Theta = 100}{
\[\Theta=100\]}
\end{maplelatex}, \begin{maplelatex}\mapleinline{inert}{2d}{%Phi = 40}{
\[\Phi=40\]}
\end{maplelatex}, and the Projection was set to \textit{Far} (in menu bar when the plot is selected.)
}\end{Maple Normal}
\end{maplelatex}\begin{maplelatex}\begin{Maple Heading 1}{\textbf{The HÈnon-Heiles Hamiltonian}}\end{Maple Heading 1}
\end{maplelatex}
%% End of Maple 10 Output
\begin{maplelatex}\begin{Maple Heading 1}{\textbf{References}}\end{Maple Heading 1}
\end{maplelatex}
%% End of Maple 10 Output
\begin{maplelatex}\begin{Maple Normal}{For more information, see the following help pages: Introduction to the Poincare subpackage, DEtools[generate\_ic], DEtools[hamilton\_eqs], and DEtools[zoom].}\end{Maple Normal}
\end{maplelatex}\begin{maplelatex}\begin{Maple Normal}{}\end{Maple Normal}
\begin{Maple Normal}{Return to Index for Example Worksheets\textbf{}}\end{Maple Normal}
\end{maplelatex}</content>
</record>
