1. What this solves
Advance a stiff ODE while resolving the evolution you care about, even when other modes decay much faster. Radau IIA uses three coupled implicit stages. Its endpoint has order five for smooth problems, and a collocation cubic provides values inside the step.
2. When to use
Use this for a stiff explicit ODE that needs tighter accuracy, adaptive steps, or output at irregular times. Provide a Jacobian or an equivalent way of solving the stage equations. Scale tolerances for the components that matter. The reference is for small dense systems.
3. When not to use (and what to use instead)
| Situation | Use instead |
|---|---|
| Smooth nonstiff ODE with an adaptive tolerance | dormand-prince-rk45. |
| Fixed-grid stiff decay at modest accuracy | bdf2, or backward-euler for rougher results and startup damping. |
| Long-time symplectic integration | gauss-legendre-4 or implicit-midpoint for canonical nonseparable systems. |
| Algebraic equations or singular mass matrix | Use a DAE solver appropriate to the index and constraints. The reference solves explicit ODEs. |
4. Algorithm
Put , and use the rows of below. The weights equal the last row of .
[(88-7s)/360, (296-169s)/1800, (-2+3s)/225]
[(296+169s)/1800, (88+7s)/360, (-2-3s)/225]
[(16-s)/36, (16+s)/36, 1/9]
Solve the stage-state equations . Start all stage states at . For the residual , the Newton block is . Solve for the stage corrections and subtract them. The standalone step bounds each stage correction component by max(tol * scale, 4 * ulp(scale)). For each component, scale is its largest absolute value in the step input, the old stage, and the updated stage. Here ulp is floating-point spacing and the default is tol=2e-14. The reference permits 12 updates and reports failure for a singular block matrix, nonfinite arithmetic or an exhausted iteration limit. Return directly. Its equality with the Runge–Kutta output follows from and the last row of being .
For dense output at fractional time , use the cubic Lagrange interpolant through the pairs and . Interior interpolation has its own error, which can exceed the endpoint error. For on the scalar linear equation, the amplification factor is
It is bounded by one on the closed left half-plane and tends to zero far into that half-plane, giving L-stability.
5. Adaptive steps and parameters
For the full step and each half step, require every Newton correction component to fit within 1% of its error weight. Use atol + rtol * magnitude, where magnitude is the largest absolute value of that component in the substep input, the old stage and the updated stage. The correction limit has a roundoff floor of four floating-point spacings at that magnitude.
The reference tests a full step against two half steps. At the endpoint, use to estimate the error of the refined result in the smooth asymptotic regime. Scale each component by atol + rtol * max(abs(y), abs(Y_r)) and let be the largest ratio.
Also compare the full-step cubic with the refined cubics at the midpoint and at one-third and two-thirds of each half step. At each of these five times, divide the absolute difference by atol + rtol * max(abs(full), abs(refined)) and let be the largest ratio. Use the full difference for this check because the two dense outputs interpolate different segments. Reject if either ratio exceeds one. For the next trial, use clipped to , with 4 when both errors are zero. The exponents reflect the smooth local endpoint and interior error orders. Keep the two half-step cubics on acceptance. Retry a failed Newton solve at half size, leave the accepted state intact on rejection, and clip the last trial to the end time.
Choose the first trial size with the fastest transient you intend to measure in mind. Set absolute tolerance to an error scale near zero and relative tolerance to the useful fractional accuracy. The interior check catches unresolved initial layers that give small differences at the endpoint alone. It samples the two interpolants, so verify the requested output times with tighter tolerances or smaller steps when accuracy matters there. The fifth-order endpoint and the local estimate can degrade in stiff nonautonomous or nonsmooth regimes.
7. Verification
Create port_adapter.py with step(fun, jac, t, y, h) -> (endpoint, dense). A signed is supported, and the callable dense(theta) takes a fraction from zero to one. You can also export solve(fun, jac, t0, y0, t_end, *, h0, rtol, atol) -> (endpoint, evaluate, accepted, rejected). That optional checker expects evaluate(time) to use physical time and counts trials, with each accepted trial containing two half steps. It checks a stiff initial layer and a nonlinear component in two unit scales. Run python <skill>/checks/check_port.py from the adapter directory and show the output. Other languages can use the formulas in checks/cases.json. The standalone step checker compares endpoints and dense output for a nonlinear problem in two state scales.
On your model, compare tighter tolerances at identical output times and check the resolved slow component and any transient you need. Inspect rejected steps and compare the endpoint and interior errors separately.
8. Failure signatures
| Symptom | Likely cause |
|---|---|
| Accurate endpoints, inaccurate interior values | The interpolation is lower order or the output lies in an unresolved initial layer. Check the interpolation nodes and refine the steps through that layer. |
| Fast mode rings or persists across large steps | Check that the last stage is used as the endpoint and that the couplings are in the displayed order. |
| Repeated rejection or Newton failure | Check Jacobian orientation, scales, stiffness and whether the RHS is smooth through the trial interval. |
9. Files and commands
reference/radau_iia_5.py provides a step and a forward adaptive solver. uv run examples/stiff_output.py shows irregular sampling. uv run verify/check_cases.py tests endpoints, dense output, damping, rejection, state scaling and three incorrect ports. uv run checks/make_cases.py prints the fixture JSON.
10. Sources
- Hairer and Wanner give the tableau (Table IV.5.6), the stability function and its A- and L-stability (Table IV.3.1 and Sect. IV.3), and discuss implementation (Sect. IV.8). Solving Ordinary Differential Equations II (1996)