---
name: implicit-midpoint
description: "Structure-preserving time stepping for any Hamiltonian system, including non-separable ones (position-dependent mass, rigid bodies, coupled field models), and for problems with quadratic invariants such as angular momentum or norm. Second order, symplectic, time-reversible and A-stable, so it also handles stiff oscillatory problems without blowing up. Requires solving a nonlinear equation each step."
---

# Implicit midpoint

> **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

Uses the slope at the midpoint between the old and new state: $y_{n+1} = y_n + h\, f\big(t_n + \tfrac{h}{2}, \tfrac{1}{2}(y_n + y_{n+1})\big)$. Because $y_{n+1}$ appears on both sides, each step solves a nonlinear equation (fixed-point iteration for non-stiff problems, Newton's method for stiff ones). The method is symplectic for every Hamiltonian, conserves all quadratic invariants exactly, and is A-stable.

## When to use

- Hamiltonian systems that are not separable, so explicit splitting methods such as Störmer-Verlet do not apply.
- Problems where a quadratic invariant (angular momentum, a norm, a charge) must be conserved exactly.
- Stiff oscillatory problems where an explicit method would need a tiny step but energy behaviour still matters.

## When not to use (and what to use instead)

| Situation | Use instead |
| --- | --- |
| Separable Hamiltonian that is not stiff (you resolve the fastest motion) | `stormer-verlet` (explicit, one force evaluation per step, no nonlinear solve) |
| Expensive forces | `stormer-verlet` if the problem is not stiff; each implicit step needs several force evaluations |
| Stiff dissipative problem where fast modes should be damped | `backward-euler` (L-stable); implicit midpoint does not damp them |
| General non-stiff ODE where accuracy matters more than structure | `dormand-prince-rk45` |

## Key facts

Order 2, implicit, symplectic, time-reversible, A-stable but not L-stable. The cost per step depends on the nonlinear solver.

## Sources

- E. Hairer, C. Lubich, G. Wanner. *Geometric Numerical Integration*, 2nd ed. Springer, 2006. https://doi.org/10.1007/3-540-30666-8
