Dec 8 – 10, 2025
CERN
Europe/Zurich timezone

ADTAYL: Taylor Series, ODEs, and Lie Derivatives in MATLAB

Dec 9, 2025, 2:00 PM
20m
31/3-004 - IT Amphitheatre (CERN)

31/3-004 - IT Amphitheatre

CERN

105
Show room on map
Contributed Talk Contributed Talks

Speaker

Dr Ned Nedialkov (McMaster University)

Description

We describe ADTAYL, a Matlab package in two parts. The first, adtayl, is a class whose objects are arrays that behave like native Matlab arrays, except that each array element is a one-variable Taylor series (TS) instead of a number.

A TS is really a polynomial, but we call it TS because arithmetic operations don't quite follow the rules for algebra of polynomials. There is a maximum order p, fixed for each object, and if an operation generates terms of order >p they are simply dropped.
E.g. if x = x(t) holds 1+t and has order p=2, then x.x holds 1+2t+t², but x.x.*x holds 1+3t+3t² because the t³ term has been discarded.

Operations are numeric, so this is AD arithmetic, not symbolic algebra. As on native arrays, they are elementwise on arrays. E.g. if x holds [1+t, 1-t] then exp(x) holds [1+t+t²/2+t³/6+..., 1-t+t²/2-t³/6+...] to the given order p and within roundoff error.
There is a comprehensive list of elementwise standard functions. There is limited linear algebra: TS matrix multiplication, solution of linear equations, and matrix inversion. Array indexing, slicing, concatenating, etc. behave as for native arrays.

The second part is odets, an ODE solver whose interface as far as possible matches Matlab's ODE suite, but which solves initial value problems by a Taylor series method. Subject to some restrictions you can code a problem y'=f(t,y), y(0)=y₀ for, say, ode45; and then switch to using odets just by changing the name of the solver.

Taylor methods are especially good at high accuracy. You can switch to solving in arbitrary precision, simply by giving the initial values in Matlab's variable precision format vpa. It is slow, but mainly owing to the slowness of vpa arithmetic, particularly array handling.

The algorithms used in the two parts, adtayl and odets, are largely distinct. But they collaborate, surprisingly elegantly, in the computation of high-order Lie derivatives of scalar and vector fields - which have important applications for instance in control theory.

Authors

Dr John Pryce (Cardiff University) Dr Ned Nedialkov (McMaster University)

Presentation materials