This site is version 0.0.1. Most of the code on this site is drafted by an agent and needs review. I apologize for the AI-speak, we are working on rewriting it!
viv-lang.org

Notebooks · lib/ode/radau

Radau IIA of order 5, after Hairer and Wanner's RADAU5

The three-stage Radau IIA method is collocation at the right Radau points c = ((4 - sqrt 6)/10, (4 + sqrt 6)/10, 1): the step solves for the stage increments Z_i = y(t + c_i h) - y(t) from

Z = h (A (x) I) F(Z),        F_i = f(t + c_i h, y + Z_i)

by simplified Newton iterations, all with the Jacobian J at the start of the step. The trick that makes it affordable is to diagonalize A^-1 = T Lambda T^-1: in W = (T^-1 (x) I) Z the 3n-by-3n Newton matrix splits into one real system (mu_1/h - J) and one complex system ((alpha + i beta)/h - J), so a step costs one real and one complex LU (here the complex one is written as its real 2n-by-2n form). The new point is y + Z_3; the method is order 5, L-stable, and stiffly accurate.

The error estimate is the embedded formula of Hairer and Wanner (Solving ODEs II, IV.8, eq. 8.20): (mu_1/h - J)^-1 (f(t, y) + sum_i e_i Z_i / h), filtered once more through the real system after a rejection. The step size follows Gustafsson's predictive controller; the Newton iteration stops on Hairer's convergence-rate test, and a failed iteration halves the step after first refreshing a stale Jacobian. The constants are SciPy's (scipy/integrate/_ivp/radau.py), which carries Hairer's RADAU5 logic.

E. Hairer and G. Wanner, Solving Ordinary Differential Equations II: Stiff and Differential-Algebraic Problems, 2nd ed., Springer (1996), doi:10.1007/978-3-642-05221-7.

Look inside this program

  • Atlas

    The program’s map: every function and which calls which.

  • There’s no recorded run of this program yet.

Shift+Enter in a cell runs it and moves to the next. Running a cell runs every cell above it too, as one program.

[1]lines 32–358