The Euler–Lagrange equations in one paragraph
A Lagrangian $L(q, \dot q, t)$ on configuration space defines the action
\[S[\gamma] \;:=\; \int_{t_0}^{t_1} L(q(t), \dot q(t), t)\,dt.\]Stationary paths under fixed-endpoint variations $\delta q(t_0) = \delta q(t_1) = 0$ satisfy
\[\boxed{\;\frac{d}{dt}\frac{\partial L}{\partial \dot q^i} \;=\; \frac{\partial L}{\partial q^i}\;}\qquad (i = 1, \ldots, n).\]Derivation in three lines:
\[\delta S = \int_{t_0}^{t_1} \Bigl(\frac{\partial L}{\partial q^i}\delta q^i + \frac{\partial L}{\partial \dot q^i}\delta \dot q^i\Bigr) dt = \int_{t_0}^{t_1}\Bigl(\frac{\partial L}{\partial q^i} - \frac{d}{dt}\frac{\partial L}{\partial \dot q^i}\Bigr)\delta q^i \,dt + \Bigl[\frac{\partial L}{\partial \dot q^i}\delta q^i\Bigr]_{t_0}^{t_1}.\]The boundary term vanishes; for $\delta S = 0$ to hold for all $\delta q$, the integrand has to vanish, giving the Euler–Lagrange (E-L) equations.
Legendre transform → Hamiltonian
Define the conjugate momentum $p_i := \partial L / \partial \dot q^i$ and the Hamiltonian by Legendre transform
\[H(q, p, t) \;:=\; p_i \dot q^i - L(q, \dot q, t).\](Eliminating $\dot q$ in favour of $p$.) The E-L equations become Hamilton’s equations
\[\dot q^i \;=\; \frac{\partial H}{\partial p_i}, \qquad \dot p_i \;=\; -\frac{\partial H}{\partial q^i}.\]A direct consequence: $H$ is conserved on solutions when it has no explicit $t$-dependence ($\dot H = \partial H / \partial t$ along solutions). This is what makes “energy is conserved” a theorem and not just a slogan.
Optimal control on a manifold
We now generalise. The state is a point $g \in M$ on a smooth manifold; the control is $u(t) \in U \subseteq \mathbb R^k$; the dynamics are
\[\dot g \;=\; f(g, u),\]and we minimise
\[J \;=\; \int_0^T L(g, u)\,dt, \qquad g(0), g(T) \text{ fixed}.\]In our setting $M = \mathrm{SE}(2)$, $u = (u_1, u_2)$, $f(g, u) = u_1 X_1(g) + u_2 X_2(g)$, $L = \sqrt{u_1^2 + u_2^2}$, and $T$ is free (we minimise total length, so $T$ itself is the cost when $u_1^2 + u_2^2 = 1$).
The Pontryagin Maximum Principle
The key new object is the costate $\lambda \in T^{\ast}M$. Heuristically, it is the Lagrange multiplier enforcing the dynamic constraint $\dot g = f$. In a coordinate chart $\lambda = \lambda_i \,dq^i$ and Hamilton’s equations read $\dot q^i = \partial \mathcal H / \partial \lambda_i$, $\dot \lambda_i = -\partial \mathcal H / \partial q^i$.
Maximising over $u$ for the SR problem
The sub-Riemannian (SR) length functional has $L = \sqrt{u_1^2 + u_2^2}$. A standard trick: parametrise by arc length, so $u_1^2 + u_2^2 = 1$ throughout. The controls live on the unit circle, and the cost becomes simply $T$ (the total time = total arc length).
The Pontryagin Hamiltonian on $T^{\ast}\mathrm{SE}(2)$ with controls $u_1 X_1 + u_2 X_2$ is
\[\mathcal H = u_1 \langle \lambda, X_1\rangle + u_2 \langle \lambda, X_2\rangle - \nu.\]Define $h_i := \langle \lambda, X_i\rangle$ (this is the contraction of the covector $\lambda$ with the left-invariant vector field $X_i$). Then $\mathcal H = u_1 h_1 + u_2 h_2 - \nu$ (the last term is constant in $u$).
Maximising $u_1 h_1 + u_2 h_2$ over $u_1^2 + u_2^2 \leq 1$:
\[\max_{u \in S^1} (u_1 h_1 + u_2 h_2) \;=\; \sqrt{h_1^2 + h_2^2},\]attained at $u^{\ast} = (h_1, h_2) / \sqrt{h_1^2 + h_2^2}$.
Substituting back, the maximised Hamiltonian is
\[\mathcal H^{\ast}(g, \lambda) \;=\; \sqrt{h_1^2 + h_2^2} - \nu \;=\; \sqrt{h_1^2 + h_2^2} - 1.\]Standard rescaling: the trajectories of the maximised SR Hamiltonian are the same as those of $\tfrac12(h_1^2 + h_2^2)$ (squaring is allowed because the Hamiltonian is conserved, so $h_1^2 + h_2^2 = $ const along solutions). We use the squared form:
\[\boxed{\;\mathcal H_n \;=\; \tfrac12 (h_1^2 + h_2^2).\;}\]This is the “normal Hamiltonian” of Part 2 §1.
Lie–Poisson reduction on $\mathfrak{se}(2)^{\ast}$
Hamilton’s equations for $\mathcal H_n$ on $T^{\ast}\mathrm{SE}(2)$ are coupled equations in $(g, \lambda)$. But the left-invariant vector fields make $T^{\ast}\mathrm{SE}(2)$ trivialise:
\[T^{\ast}\mathrm{SE}(2) \;\xrightarrow{\sim}\; \mathrm{SE}(2) \times \mathfrak{se}(2)^{\ast}, \qquad \lambda \mapsto (g, \mu)\]where $\mu = (h_1, h_2, h_3) := (\langle\lambda, X_1\rangle, \langle\lambda, X_2\rangle, \langle\lambda, X_3\rangle)$ in the basis dual to the left-invariant frame ${X_1, X_2, X_3}$. In this trivialisation the Hamiltonian flow on $T^{\ast}G$ for a left-invariant Hamiltonian (depending only on $\mu$) decouples:
- the $\mu$-component evolves on $\mathfrak g^{\ast}$ alone, by the Lie–Poisson equation $\dot\mu = \mathrm{ad}^{\ast}_{dH(\mu)}\,\mu$;
- the $g$-component is then recovered by a reconstruction $\dot g = g \cdot dH(\mu)$.
For matrix Lie groups the Lie–Poisson equation in the $h_i$ coordinates reads
\[\dot h_i \;=\; -\sum_{j, k} c^k_{ij}\,h_k\,\frac{\partial H}{\partial h_j},\]where \(c^k_{ij}\) are the structure constants \([X_i, X_j] = c^k_{ij} X_k\). For $\mathfrak{se}(2)$ in the body-frame basis ${X_1, X_2, X_3}$ used in Part 1 (forward / rotation / sideways), the brackets are $[X_1, X_2] = -X_3$, $[X_2, X_3] = -X_1$, $[X_1, X_3] = 0$, giving the non-zero coordinate brackets ${h_1, h_2} = h_3$ and ${h_2, h_3} = h_1$. With $H_n = \tfrac12(h_1^2 + h_2^2)$ this yields
\[\dot h_1 \;=\; h_2\,h_3, \qquad \dot h_2 \;=\; -h_1\,h_3, \qquad \dot h_3 \;=\; -h_1\,h_2.\]These are the equations Part 2 §1 uses. The conserved quantities are the Hamiltonian $\mathcal H_n = \tfrac12(h_1^2 + h_2^2)$ and the Casimir of $\mathfrak{se}(2)^{*}$,
\[C \;=\; h_1^{2} + h_3^{2}\]— the squared translation momentum, which Poisson-commutes with every coordinate function and so is preserved by any Hamiltonian flow on the dual algebra (not just our particular $\mathcal H_n$). $h_3$ alone is not conserved: by the third equation above it drifts wherever $h_1 h_2 \neq 0$ — generically along the geodesic ($\dot h_3$ pauses exactly where $h_1 = 0$, i.e. at the cusps, or where $h_2 = 0$).
Reduction to the pendulum
The two integrals $\mathcal H_n = \tfrac12$ (unit-speed normalisation) and $C = h_1^2 + h_3^2$ cut the 3D dynamics down to a 1D motion. Set $h_1 = \sin\alpha$, $h_2 = \cos\alpha$, so that $\mathcal H_n = 1/2$ is automatic. From $\dot h_1 = h_2 h_3$ we read off $\dot\alpha = h_3$, and the Casimir gives $h_3^2 = C - \sin^2\alpha$. With $\varphi = 2\alpha$:
\[\dot\varphi^{2} \;=\; 4 h_3^{2} \;=\; (4C - 2) \,+\, 2\cos\varphi.\]Differentiating once in $t$:
\[\boxed{\;\ddot\varphi + \sin\varphi \;=\; 0, \qquad E \;=\; \tfrac12\dot\varphi^{2} - \cos\varphi \;=\; 2C - 1.\;}\]That is the pendulum equation — derived, not postulated, from the Lie–Poisson flow on $\mathfrak{se}(2)^{*}$. The pendulum angle $\varphi = 2\alpha$ is twice the phase of $(h_1, h_2)$ on the unit circle; the pendulum energy $E$ is fixed by the Casimir on the coadjoint orbit.
The reconstruction equation ties the planar curve’s heading $\theta$ back to the costate. With $u_1^{\ast} = h_1 = \sin(\varphi/2)$ and $u_2^{\ast} = h_2 = \cos(\varphi/2)$, the SE(2) ODE $(\dot x, \dot y, \dot\theta) = (u_1^{\ast}\cos\theta, u_1^{\ast}\sin\theta, u_2^{\ast})$ reparametrised by Euclidean arc length $s$ (with $ds = |u_1^{\ast}|\,dt$) gives the projected curve the curvature
\[\kappa_{\mathrm{SR}}(s) = \frac{u_2^{\ast}}{u_1^{\ast}} = \cot(\varphi/2).\]This blows up wherever $u_1^{\ast} = 0$: the sub-Riemannian projections are allowed to have cusps — the reversal points of the parallel-parking trajectories of Appendix A2.
The smooth elastica that Part 2 plots — $\kappa = 2k\,\mathrm{cn}$, $2\,\mathrm{sech}$, $2\,\mathrm{dn}$ — are the Euler elastic problem: the sister problem in which the curve carries unit forward speed and the heading $\theta$ itself is the pendulum variable, so $\kappa = \dot\theta$ stays bounded. Both problems are driven by the same pendulum equation $\ddot\varphi + \sin\varphi = 0$ — that shared vertical subsystem is the real content of the reduction — but their projected curves differ, and it is the elastic representatives the figures draw. Appendix A4 §3 carries the elliptic substitution through; the elastica curvature ODE $\kappa’‘(s) + \tfrac12\kappa^3 - \mu\kappa = 0$ is the Duffing form equivalent to the pendulum.
The reconstruction equation
Once $\mu(t) = (h_1(t), h_2(t), h_3)$ is known, the SE(2) trajectory itself is obtained from
\[\dot g(t) \;=\; g(t)\,\xi(t), \qquad \xi(t) := u_1^{\ast}(t) E_1 + u_2^{\ast}(t) E_3,\]with $u^{\ast}(t) = (h_1(t), h_2(t)) / \sqrt c$ from the maximisation, where $c := h_1^2 + h_2^2 = 2\mathcal H_n$ is constant along the flow. In the $(x, y, \theta)$ chart this is exactly Part 1’s Frenet–Serret integration:
\[\dot x = u_1^{\ast} \cos\theta, \qquad \dot y = u_1^{\ast} \sin\theta, \qquad \dot \theta = u_2^{\ast}.\]In the Euler elastic problem one instead fixes $u_1^{\ast} = 1$ (unit forward speed); then $s = t$, and $u_2^{\ast} = \dot\theta = \kappa$ is the curvature of the projected plane curve. Here the heading $\theta$ is itself the pendulum, so its curvature is the pendulum velocity — a Jacobi cn (libration), sech (separatrix), or dn (rotation), i.e. the $\kappa = 2k\,\mathrm{cn}(s\mid k^2)$ family of Part 2 §2.
Connection to the elliptic project
The phase portrait of Figure A3.2 is computationally identical to the one in elliptic project’s physical-pendulum example — both compute level sets of $E = \tfrac12\dot\varphi^2 - \cos\varphi$ and trace closed orbits with period $4K(k^2)$. The SE(2) elastica problem is, structurally, the same ordinary differential equation (ODE) as a nonlinear pendulum: this appendix’s job has been to make that equivalence inevitable, by deriving the pendulum equation from the PMP on $\mathrm{SE}(2)$ rather than postulating it.
Once you have the pendulum, the period-and-amplitude analysis is the business of Appendix A4 (Jacobi elliptic functions) and the closed-form geodesic endpoints are the business of Appendix A5 (the SR exponential map).
Code
# Verify the Lie–Poisson equations on se(2)* numerically.
# Conserved quantities: H = ½(h1²+h2²) and Casimir C = h1²+h3².
# Note: h3 is NOT conserved — the third equation is dh3/dt = -h1·h2.
import numpy as np
from scipy.integrate import solve_ivp
def lie_poisson_se2(t, h):
h1, h2, h3 = h
return [h2*h3, -h1*h3, -h1*h2]
h0 = [0.6, 0.4, 0.7]
sol = solve_ivp(lie_poisson_se2, [0, 8], h0, rtol=1e-10, atol=1e-12,
t_eval=np.linspace(0, 8, 400))
h1, h2, h3 = sol.y
H = 0.5 * (h1**2 + h2**2) # Hamiltonian
C = h1**2 + h3**2 # Casimir
print(f"max |H - H0| / H0 = {np.max(np.abs(H - H[0]))/H[0]:.2e}") # ~ 1e-10
print(f"max |C - C0| / C0 = {np.max(np.abs(C - C[0]))/C[0]:.2e}") # ~ 1e-10
# h3 itself drifts — confirm it is genuinely not conserved
print(f"h3 range = [{h3.min():.3f}, {h3.max():.3f}] h3(0) = {h0[2]}")
# Reconstruct the SE(2) trajectory from the costate solution
# (same algorithm used by elliptic-core.js's integrateElastica routine)
def reconstruct_se2(h_t, t_arr):
"""Given h(t) sampled at t_arr, return (x, y, theta)."""
c = h_t[0,0]**2 + h_t[1,0]**2
sqrt_c = np.sqrt(c)
u1 = h_t[0] / sqrt_c
u2 = h_t[1] / sqrt_c
x, y, th = 0.0, 0.0, 0.0
out = [(0,0,0)]
for i in range(len(t_arr) - 1):
dt = t_arr[i+1] - t_arr[i]
thmid = th + 0.5 * u2[i] * dt
x += u1[i] * np.cos(thmid) * dt
y += u1[i] * np.sin(thmid) * dt
th += u2[i] * dt
out.append((x, y, th))
return np.array(out)
What we covered, and what comes next
The Pontryagin Maximum Principle takes an optimal-control problem and produces a Hamiltonian system on $T^{\ast}M$. For the SE(2) sub-Riemannian length problem, maximisation over $u_1, u_2$ on the unit circle gives the normal Hamiltonian $\mathcal H_n = \tfrac12(h_1^2 + h_2^2)$. Lie–Poisson reduction on $\mathfrak{se}(2)^{\ast}$ collapses the $T^{\ast}\mathrm{SE}(2)$ flow to the costate equations $\dot h_1 = h_2 h_3, \dot h_2 = -h_1 h_3, \dot h_3 = -h_1 h_2$ — exactly the equations Part 2 §1 wrote down. Writing $h_1 = \sin\alpha$, $h_2 = \cos\alpha$ on the unit Hamiltonian level and differentiating $\varphi = 2\alpha$ once more gives the nonlinear pendulum equation $\ddot\varphi + \sin\varphi = 0$.
Appendix A4 will solve the pendulum equation in closed form using Jacobi elliptic functions and the arithmetic–geometric mean (AGM), recovering the period $4K(k^2)$ and the explicit $\kappa(s) = 2k\,\mathrm{cn}(s\mid k^2)$ formula of Part 2.
References
- L. S. Pontryagin, V. G. Boltyanskii, R. V. Gamkrelidze, E. F. Mishchenko (1962). The Mathematical Theory of Optimal Processes. Wiley–Interscience. The original PMP source.
- A. A. Agrachev, Yu. L. Sachkov (2004). Control Theory from the Geometric Viewpoint. Springer. Chapter 12 derives the SR geodesic equations on Lie groups by exactly this route.
- J. E. Marsden, T. S. Ratiu (1999). Introduction to Mechanics and Symmetry. Springer. Chapters 13–14 for Lie–Poisson reduction.
- V. I. Arnold (1989). Mathematical Methods of Classical Mechanics. Springer GTM 60. Appendix 2 has Lie–Poisson dynamics.
- Yu. L. Sachkov (2010). "Conjugate and cut time in the sub-Riemannian problem on the group of motions of a plane." ESAIM: COCV 16: 1018–1039. Uses the costate ODE derived here.
- Elliptic project — Physical Pendulum. Phase-portrait diagram identical to Figure A3.2; same $K(k^2)$ period.