Hamiltonian Formulation via the PMP
Recall from Part 1 that we want to minimise arc length among horizontal curves in $\mathrm{SE}(2)$:
\[\min \int_0^T \sqrt{u_1^2 + u_2^2}\,dt, \qquad \dot g = u_1 X_1(g) + u_2 X_2(g).\]We use the standard normalisation $u_1^2 + u_2^2 = 1$ (unit-speed parametrisation), which reduces the problem to minimising $T$ — the total arc length.
The Pontryagin Maximum Principle (PMP) introduces a covector $\lambda$ in the cotangent bundle, evolving alongside the state:
\[\lambda \in T^{*}_{g}\,\mathrm{SE}(2).\]In the left-trivialisation provided by the Lie algebra,
\[T^{*}\mathrm{SE}(2) \;\cong\; \mathrm{SE}(2) \times \mathfrak{se}(2)^{*},\]the costate becomes a triple of components $(h_1, h_2, h_3)$ defined by
\[h_i = \langle \lambda,\, X_i(g)\rangle, \qquad i = 1, 2, 3.\]The Hamiltonian for the PMP maximisation condition is
\[H = h_1 u_1 + h_2 u_2 - \nu \sqrt{u_1^2 + u_2^2},\]where $\nu \in {0, 1}$ is the abnormality constant ($\nu = 1$ for normal extremals, $\nu = 0$ for abnormal; Appendix A3 carries out the maximisation in full). Minimising length is equivalent to minimising the energy $\tfrac12!\int(u_1^2 + u_2^2)\,dt$ over a fixed interval (Cauchy–Schwarz), and for normal extremals the PMP maximisation then delivers the normal (sub-Riemannian) Hamiltonian
\[\mathcal{H}_n = \tfrac{1}{2}\bigl(h_1^2 + h_2^2\bigr).\]The Hamiltonian equations on $\mathfrak{se}(2)^{*}$, via the Lie–Poisson bracket, read
\[\dot h_1 = \{h_1, \mathcal{H}_n\} = h_2 h_3, \quad \dot h_2 = \{h_2, \mathcal{H}_n\} = -h_1 h_3, \quad \dot h_3 = \{h_3, \mathcal{H}_n\} = -h_1 h_2.\]Two integrals reduce this 3D system to a 1D motion. The Hamiltonian itself, $\mathcal{H}_n = \tfrac{1}{2}(h_1^{2} + h_2^{2})$, is conserved because the flow is Hamiltonian. The second is the Casimir of $\mathfrak{se}(2)^{*}$,
\[C \;=\; h_1^{2} + h_3^{2},\]which Poisson-commutes with every smooth function and is therefore automatically preserved by any Hamiltonian flow on the dual algebra.
The Casimir labels the symplectic leaves of the Lie–Poisson bracket — the coadjoint orbits. For $\mathfrak{se}(2)^{*}$ the orbits are the cylinders ${h_1^{2} + h_3^{2} = C}$, on which the Hamiltonian dynamics is genuinely symplectic.
Fix the unit-speed normalisation $\mathcal{H}_n = 1/2$, so $h_1^{2} + h_2^{2} = 1$. The angle $\alpha$ defined by
\[h_1 = \sin\alpha, \qquad h_2 = \cos\alpha\]then evolves as $\dot\alpha = h_3$ (from $\dot h_1 = h_2 h_3$). Using $h_3^{2} = C - h_1^{2} = C - \sin^{2}\alpha$, set $\varphi = 2\alpha$:
\[\dot\varphi^{2} \;=\; 4 h_3^{2} \;=\; (4C - 2) \,+\, 2\cos\varphi.\]Differentiating once more in time gives the pendulum equation.
The Pendulum Equation
The three dynamically distinct regimes of the pendulum sort every extremal of both horizontal problems — the free SR geodesics and their elastica siblings — into three families:
| Energy $E$ | Pendulum motion | Elastica family |
|---|---|---|
| $-1 < E < 1$ | oscillation (libration) | inflectional |
| $E = 1$ | separatrix (infinite period) | borderline (solitary) |
| $E > 1$ | rotation | non-inflectional |
From the pendulum to the curve — one engine, two problems
The pendulum lives on the costate; getting a plane curve out of it can be done two ways, and they give different curves (Appendix A3 carries both out in full).
The free SR geodesics. Keep both controls. The plane projection’s arc length is $ds = |h_1|\,dt$, its curvature works out to $\kappa_{\mathrm{SR}} = \cot(\varphi/2)$ — unbounded, blowing up each time the forward speed $h_1$ crosses zero — so the projections of SR geodesics are generically curves with cusps, at which the point reverses its direction of travel while the heading keeps turning (Moiseev–Sachkov 2010). These cuspidal curves are the true shortest paths of the V1 metric.
The elastica siblings. Pin the forward speed, $u_1 \equiv 1$, so $t$ is arc length. The very same pendulum now drives the heading directly, and the curvature comes out in closed form as one of the three smooth Jacobi-elliptic profiles below, each solving the elastica curvature ODE — the Duffing form equivalent to the pendulum,
\[\kappa''(s) + \tfrac{1}{2}\kappa(s)^{3} - \mu\,\kappa(s) \;=\; 0,\]with the integration constant $\mu$ fixed by the Casimir $C$. These are Euler’s elastica — the classical smooth completion curves, and the family every figure in this series draws. One pendulum, two horizontal problems: the smooth elastica where the forward speed never stalls, the cuspidal SR geodesics where it may.
Three Families via Jacobi Elliptic Functions
Inflectional Elastica ($-1 < E < 1$)
The pendulum oscillates; $\varphi(s)$ changes sign. The curvature of the projected plane curve therefore changes sign: these are curves with inflection points.
Setting the energy $E = 2k^{2} - 1$ with $k \in (0, 1)$, the curvature is
\[\boxed{\;\kappa(s) = 2k\,\mathrm{cn}(s \mid k^{2})\;}\]The Jacobi function $\mathrm{cn}(s \mid k^{2})$ has period $4K(k^{2})$ in $s$, so the curvature and tangent repeat with period
\[T_{\kappa} = 4K(k^{2}).\]As $k \to 0$: $\mathrm{cn}(s\mid 0) = \cos s$ and the elastica approximates a cosine-curvature curve (nearly straight). As $k \to 1$: $K(1) = \infty$ and the period diverges; on every fixed compact $s$-interval the curve approaches the borderline elastica. A repeated curvature profile does not by itself imply that the plane curve closes: after one period the position may have acquired a nonzero translational drift.
The Borderline (Solitary) Elastica ($E = 1$, separatrix)
At the separatrix the curvature is
\[\kappa(s) = \frac{2}{\cosh s}.\]This is the borderline elastica — the solitary-wave member of the family, a single loop whose curvature is one smooth bump decaying to zero at both ends; the total turning is $\Delta\theta = 2\pi$, and both tails straighten out along the same asymptotic line. It is the limiting case between oscillating and rotating pendulum, with infinite period $T_\kappa = \infty$. (It is not the Euler–Cornu spiral / clothoid of railway engineering, whose curvature grows linearly, $\kappa \propto s$ — a common conflation worth flagging.)
Non-Inflectional Elastica ($E > 1$)
The pendulum rotates without stopping; $\varphi(s)$ is monotone. Setting $m = 2/(E + 1) \in (0, 1)$ (here $m$ parametrises this family — at $E=1$ the separatrix gives $m=1$, and as $E\to\infty$ we have $m\to 0$) and rescaling arc length by $\sqrt m$ — elastica are defined up to similarity; in the unit-pendulum clock the profile is $\tfrac{2}{\sqrt m}\,\mathrm{dn}(s/\sqrt m \mid m)$, with period $2\sqrt m\,K(m)$ — the curvature is
\[\kappa(s) = 2\,\mathrm{dn}(s \mid m).\]These curves have no inflection points — the curvature never changes sign. The Jacobi function $\mathrm{dn}(s\mid m)$ has period $2K(m)$ in $s$, so in the rescaled arc length the spatial period is
\[T_{\kappa} = 2K(m).\]As $m \to 1$: $\mathrm{dn}(s\mid 1) = \mathrm{sech}(s)$ — the non-inflectional family approaches the borderline elastica from the other side. As $m \to 0$: $\mathrm{dn}(s\mid 0) = 1$ and $\kappa \to 2$ — the curves degenerate into circles of radius $1/2$ in the rescaled arc length (high-energy uniform rotation).
The Complete Elliptic Integral K(k²)
The period formula $T_\kappa = 4K(k^{2})$ is not incidental — $K(k^{2})$ is the exact quarter-period of $\mathrm{sn}(s\mid k^{2})$ by definition. This makes the elastica period computable to arbitrary precision via the arithmetic–geometric mean (AGM):
\[K(m) = \frac{\pi}{2\,\mathrm{AGM}\!\bigl(1,\;\sqrt{1 - m}\bigr)}, \qquad m = k^{2}.\]The AGM converges quadratically: about 16 significant digits in 6 iterations.
This is the iteration the elliptic package exposes as agm:
from elliptic import agm
import numpy as np
ellipticK = lambda m: np.pi / (2 * agm(1.0, np.sqrt(1 - m))) # K(m) = π / (2·AGM(1, √(1−m)))
k = np.linspace(0, 0.999, 500)
Tk = 4 * ellipticK(k**2) # spatial period of curvature oscillation
For the Jacobi functions themselves:
from elliptic import ellipj
K = ellipticK(k**2) # quarter-period of sn, cn
s = np.linspace(-2*K, 2*K, 800)
sn, cn, dn, _ = ellipj(s, k**2) # ellipj returns (sn, cn, dn, am)
kappa = 2 * k * cn # curvature of inflectional elastica
The three functions satisfy the differential equations
\[\frac{d}{ds}\mathrm{sn} = \mathrm{cn}\,\mathrm{dn}, \qquad \frac{d}{ds}\mathrm{cn} = -\mathrm{sn}\,\mathrm{dn}, \qquad \frac{d}{ds}\mathrm{dn} = -m\,\mathrm{sn}\,\mathrm{cn},\]and the Pythagorean identities
\[\mathrm{sn}^{2} + \mathrm{cn}^{2} = 1, \qquad \mathrm{dn}^{2} + m\,\mathrm{sn}^{2} = 1.\]These let us differentiate $\kappa(s)$ analytically:
\[\kappa'(s) = -2k\,\mathrm{sn}(s)\,\mathrm{dn}(s),\]which will be essential in Part 3 for locating Maxwell strata.
Integrating the Elastica
Given $\kappa(s)$, the plane curve is recovered by Frenet–Serret integration:
\[\frac{d}{ds}\begin{pmatrix}x\\ y\\ \theta\end{pmatrix} = \begin{pmatrix}\cos\theta\\ \sin\theta\\ \kappa(s)\end{pmatrix}.\]The $\theta$-equation integrates explicitly for the inflectional family:
\[\theta(s) = \theta_0 + 2\arcsin\!\bigl(k\,\mathrm{sn}(s\mid k^{2})\bigr),\]then $x, y$ require a further integration involving $\mathrm{sn}$ and $\mathrm{cn}$ that can be expressed via the incomplete elliptic integral of the second kind $E(s\mid k^{2})$.
In the elliptic package:
from elliptic import elliptic12
am = np.arcsin(sn) # Jacobi amplitude am(s | k²), valid for |s| ≤ K
# (beyond that, unwrap am continuously)
F_vals, E_vals, _ = elliptic12(am, k**2) # F(am | k²) = s and E(am | k²); third value is Jacobi Z
x = 2 * E_vals - F_vals # x(s) = 2 E(am(s)|k²) − s
The full closed-form expressions are classical (in the present notation see Sachkov 2008, cited in Part 3). With $\theta_0 = 0$ and the curve started at the origin,
\[x(s) = 2E\bigl(\mathrm{am}(s\mid k^2)\mid k^2\bigr) - s, \qquad y(s) = 2k\bigl(1 - \mathrm{cn}(s\mid k^2)\bigr),\]obtained by integrating $\cos\theta = 1 - 2k^2\mathrm{sn}^2$ and $\sin\theta = 2k\,\mathrm{sn}\,\mathrm{dn}$. No numerical ODE integration is needed.
What the Three Families Look Like
The interactive figure above lets you explore all three families. A few landmarks worth noting:
-
$k = 0.1$ (inflectional): nearly straight, very gentle curvature oscillation. The curve barely bends before straightening again.
-
$k \approx 0.909$ (inflectional): the “figure-eight” elastica — at the modulus where $2E(k^2) = K(k^2)$, the curve crosses itself once per period and the endpoints of one period coincide. This is where the mirror-pair Maxwell point of the elastica family lands back at the origin (Part 3).
-
$k \to 1^-$ (inflectional → borderline): the period $4K(k^2)$ diverges and, on bounded arc-length intervals, the curve converges to the solitary borderline elastica. There is no finite period left at $k=1$.
-
Borderline elastica ($k = 1$): curvature $2/\cosh(s)$, total turning $2\pi$. In the standard normalisation its two tails approach the same asymptotic line; the complete curve is non-periodic and contains one loop.
-
Non-inflectional, $m = 0.3$: like a wavy circle — curvature oscillates but never changes sign. Curvature and tangent repeat after $2K(m)$, but the plane curve closes only when the net displacement over a period also vanishes.
Summary and Preview of Part 3
We have shown that the reduced pendulum has three Jacobi-elliptic regimes. For the pinned reconstruction they give the three smooth Euler-elastica families, with inflectional curvature $\kappa(s)=2k\,\mathrm{cn}(s\mid k^2)$. For the free SR reconstruction the same pendulum produces different, generically cuspidal plane curves whose curvature is not this elastica profile. The complete elliptic integral $K(k^2)$ controls the spatial period of the curvature, and the closed-form $x(s), y(s)$ involve elliptic integrals of the second kind.
The next natural question is: which geodesics are globally optimal? A geodesic may be locally length-minimising (no shorter path in a thin tube) while a completely different geodesic of the same length exists. The locus where this happens — where two distinct geodesics of equal length meet — is the Maxwell stratum.
In Part 3 we will show that the Maxwell strata are governed by the discrete reflection group of the pendulum — the $(\mathbb{Z}_2)^3$ of Moiseev–Sachkov (2010) — and compute the mirror-pair tie exactly on the elastica family: two mirror elastica first re-meet after one full curvature period,
\[s \;=\; 4K(k^{2}),\]the same elliptic integral that controls the oscillation. For the free SR problem the same symmetry machinery gives the sharper (and different!) answer — the cut time is $2K(k^2)$, half a pendulum period — which is Part 4’s story. The elliptic clock $K(k^2)$ runs both problems.
References
- I. Moiseev & Yu. L. Sachkov (2010). "Maxwell strata in sub-Riemannian problem on the group of motions of a plane." ESAIM: COCV 16(2): 380–399. arXiv:0807.4731
- Yu. L. Sachkov (2011). "Cut locus and optimal synthesis in the sub-Riemannian problem on the group of motions of a plane." ESAIM: COCV 17(2): 293–321. arXiv:0903.0727
- Yu. L. Sachkov (2003). "Exponential mapping in generalized Dido's problem." Mat. Sbornik 194(9): 63–90.
- L. Euler (1744). Methodus inveniendi lineas curvas maximi minimive proprietate gaudentes. Lausanne: Marcum-Michaelem Bousquet. Additamentum I (De curvis elasticis).
- M. Abramowitz & I. A. Stegun (1964). Handbook of Mathematical Functions. National Bureau of Standards. §16 (Jacobian Elliptic Functions), §17 (Elliptic Integrals).
- J. Petitot (2003). "The neurogeometry of pinwheels as a sub-Riemannian contact structure." Journal of Physiology–Paris 97(2–3): 265–309.
- L. S. Pontryagin et al. (1962). The Mathematical Theory of Optimal Processes. Wiley–Interscience.