verry.integrate.seriessol#

verry.integrate.seriessol(fun, t0, y0, deg)#

Return the Taylor polynomial of the ODE solution.

Parameters:
  • fun (Callable) – Right-hand side of the system.

  • t0 (Interval) – Initial time.

  • y0 (IntervalMatrix | Sequence[Interval]) – Initial state.

  • deg (int) – Degree of Taylor polynomial.

Return type:

tuple[IntervalSeries, …]

Warning

fun must neither be a constant nor contain conditional branches (cf. Common pitfalls).

Examples

>>> from verry import FloatInterval as FI
>>> series = seriessolution(lambda t, y: (y,), FI(0), [FI(1)], 4)
>>> print([format(coeff.mid(), ".3f") for coeff in series[0].coeffs])
['1.000', '1.000', '0.500', '0.167', '0.042']