fhat. GitHub Workspace

Symplectic Euler

First-order structure-preserving step for conservative mechanical systems.

errorO(h)cost1 f / stepsymplectic · explicit

Also known as semi-implicit Euler, Euler-Cromer

Placeholderv0.1.3Example

Use with your agent

Use the fhat method "symplectic-euler" (https://fhat.dev/methods/symplectic-euler/SKILL.md) for this problem. Check first whether it applies.

Placeholder (demo). Description only: there is no reference implementation or verification for this entry yet. It belongs to a demonstration set of textbook methods.

What it does

Updates momentum and position one after the other, using the newest value of each: pn+1=pn+hF(qn)p_{n+1} = p_n + h F(q_n), then qn+1=qn+hM−1pn+1q_{n+1} = q_n + h M^{-1} p_{n+1} (or the adjoint order: position first, then momentum). For a separable Hamiltonian both updates are explicit. The method is symplectic, so the energy error stays bounded instead of drifting, but the error in the trajectory is first order.

When to use

  • Separable Hamiltonian systems (force depends on position only, constant masses) when a first-order structure-preserving step is enough, for example to show symplectic behaviour in teaching or as a component of a splitting scheme. For the simplest scheme of all, see explicit-euler.

When not to use (and what to use instead)

Situation Use instead
Almost always, at the same cost stormer-verlet: second order and time-reversible, still one force evaluation per step
Higher accuracy over long runs yoshida4
Force depends on velocity, or the system is not Hamiltonian dormand-prince-rk45
Stiff problem implicit-midpoint or backward-euler

Key facts

Order 1, explicit (for separable HH), symplectic, not time-reversible (its two variants are adjoint to each other; composing a half step of each gives Störmer-Verlet), conditionally stable, one force evaluation per step.

Sources

The methods shown are examples. More research methods are coming.