Skip to main content

Module ode

Module ode 

Source
Expand description

Validated integration of a polynomial differential equation x' = f(x).

Every enclosure this module returns contains the exact solution: nothing in it is an approximation that is merely believed accurate.

One step of length h from an interval box X₀ of start points runs in two halves:

  • An a priori box. A box B with X₀ + [0, h]·f(B) ⊆ B holds every solution from X₀ over the whole step (Picard–Lindelöf through Schauder’s fixed point theorem). It is found by iterating B ← X₀ + [0, h]·f(B) from X₀, inflating each round.
  • A Taylor model. The solution’s Taylor coefficients satisfy (j + 1)·x_[j+1] = f(x)_[j]. Each coefficient of a monomial of f is a Cauchy product of the coefficients already known, so K orders cost O(K²) products per factor. Lagrange’s remainder gives x(h) ∈ Σ_{j<K} x_[j](X₀)·h^j + x_[K](B)·[0, h^K]. The coefficient at B encloses x^{(K)}(ξ)/K! for every ξ in the step, because the solution stays in B there.

The driver walks the steps at a working precision q. It halves the step when no a priori box closes. A solution that leaves every bound, and a step pushed below 2^-cap, ends the walk with FlowError::Escapes.

A scalar field that blows up is decided apart from the walk. When x' = p(x) with p > 0 on [x₀, ∞) and deg p ≥ 2, the solution is increasing and leaves every bound at T* = ∫_{x₀}^∞ dx/p(x). escape_time_bound bounds T* from above by a rational number: a positive interval lower bound of p on each piece of a grid over [x₀, b], and past b ≥ 1, where every lower term is at most S·x^{d−1} for S the sum of their magnitudes, p(x) ≥ (lc − S/b)·x^d.

Structs§

Field
A polynomial vector field: component i of f(x) is the sum of components[i].
Monomial
c·∏ xᵢ^{eᵢ}.

Enums§

FlowError
Why a walk stopped before its time.

Functions§

escape_time_bound
For x' = p(x) with p > 0 on [x₀, ∞) and deg p ≥ 2, a rational number at least the time the solution takes to leave every bound; None when p has a root there, grows too slowly to leave every bound in finite time, or no grid finer than 2^cap pieces bounds it.
flow
An enclosure of the solution at time t ≥ 0 from every start in start, at working precision q; cap bounds how small a step may become.