---
name: explicit-midpoint
description: "A simple second-order time step for a smooth, non-stiff ordinary differential equation y' = f(t, y). Two evaluations of f per step; much more accurate than Euler for little extra work over short runs. A two-stage explicit Runge-Kutta method, also called modified Euler or the RK2 midpoint method. Not structure-preserving, so energy drifts in long conservative simulations."
---

# Explicit 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

Takes a half step with Euler to estimate the midpoint, then uses the slope there for the full step: $k = y_n + \tfrac{h}{2} f(t_n, y_n)$, $y_{n+1} = y_n + h\, f(t_n + \tfrac{h}{2}, k)$. Second order, two evaluations of $f$ per step. Note that "RK2" also refers to other two-stage methods such as Heun's method; this entry is the midpoint variant.

## When to use

- Smooth, non-stiff problems over short to moderate times where a simple fixed-step second-order method is enough.

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

| Situation | Use instead |
| --- | --- |
| Long runs of a conservative mechanical system: energy grows | `stormer-verlet` (same order, one force evaluation per step, bounded energy error) |
| Higher accuracy | `rk4`, or `dormand-prince-rk45` with error control |
| Stiff problem | `backward-euler` or `implicit-midpoint` |

## Key facts

Order 2, explicit, not symplectic, not time-reversible, conditionally stable, two evaluations per step.

## Sources

- E. Hairer, S. P. Nørsett, G. Wanner. *Solving Ordinary Differential Equations I*, 2nd rev. ed. Springer, 1993. https://doi.org/10.1007/978-3-540-78862-1
