Details
The acronym ODE stands for "ordinary differential equation."
Specification of variables
{λ,ϕ,α} is optional if the Hamiltonian is written in terms of the formal action-angle variables

.
Input Hamiltonian
H should be polynomial in

and linear in

, something like

.
Input Hamiltonian H can also be specified in Cartesian (p,q) or spherical (X,Y,Z) coordinates.
Spherical curves are drawn on the surface of a unit sphere, X 2+Y 2+Z 2=1.
The default rewrite rules change from either system to action-angle coordinates:
Cartesian |  |
Spherical |  |
Note: Both the plane and the sphere are symplectic manifolds with canonical action-angle coordinates.
Time t is defined in terms of the tangents Dt{λ,ϕ}={-∂ϕH,∂λH}.
The invariant time differential may then be written most directly as dt=dϕ/(∂λH).
Subsequent α-derivatives of the integrand dt are written as (∂α)ndt=(∂λH)dt(∂α)n1/(∂λH).
Here we operate ∂α through λ via the chain rule with ∂αλ=1/(∂λH). For example: ∂αf(α, λ(α))=f(1,0)(α,λ(α))+f(0,1)(α, λ(α))/(∂λH).
The primary task of
ResourceFunction["DihedralODE"] is to compute a set of coefficients
cn(α) and a certificate
Ξ(q,p) such that

. When this condition is satisfied, the exact differential can be integrated to zero around a contour, which implies

The form of the minimal output is an ordinary differential equation constraining period functions T(α).
The proof data described above can be put into an
Association:
PastedInput | H |
Hamiltonian | α=H |
Coordinates | {λ,ϕ,α} |
Tangents | {-∂ϕH,∂λH} |
Time Forms | (∂α)ndt,n=0, 1, … |
ODE Coefficients | cn,n=0, 1, … |
Certificate Function |  |
Truth Value |  |
The last item with the key "Truth Value" should auto-evaluate to 0 for valid data.
By applying a clever hack, ∂λH can be written as a ratio of λ-polynomials. If it succeeds, the algorithm should proceed rapidly to a solution, whereas if it fails the algorithm stops.
Caveat emptor: This function is effective for a few interesting results but comes with no warranty otherwise!