Engee documentation

Background


Introduction

TaylorSeries.jl is an implementation of high-order automatic differentiation, as presented in the book by W. Tucker [1]. The general idea is the following.

The Taylor series expansion of an analytical function with one independent variable around can be written as

where , and the Taylor coefficients are the -th normalized derivatives at :

Thus, computing the high-order derivatives of is equivalent to computing its Taylor expansion.

In the case of many independent variables the same statements hold, though things become more subtle. Following Alex Haro’s approach [2], the Taylor expansion is an infinite sum of homogeneous polynomials in the independent variables , which takes the form

Here, is a multi-index of the -th order homogeneous polynomial and are the independent variables.

In both cases, a Taylor series expansion can be represented by a vector containing its coefficients. The difference between the cases of one or more independent variables is that the coefficients are real or complex numbers in the former case, but homogeneous polynomials in the latter case. This motivates the construction of the Taylor1 and TaylorN types.

Arithmetic operations

Arithmetic operations involving Taylor series can be expressed as operations on the coefficients:

Elementary functions of polynomials

Consider a function that satisfies the ordinary differential equation , , where is the independent variable. Writing and as Taylor polynomials of , substituting these in the differential equation and equating equal powers of the independent variable leads to the recursion relation

The last equation and the corresponding initial condition define a recurrence relation for the Taylor coefficients of around .

The following are examples of such recurrence relations for some elementary functions:

The recursion relations for and depend on each other; this reflects the fact that they are solutions of a second-order differential equation.

All these relations hold for Taylor expansions in one and more independent variables; in the latter case, the Taylor coefficients are homogeneous polynomials of degree ; see [2].

References

[1] W. Tucker, Validated Numerics: A Short Introduction to Rigorous Computations, Princeton University Press (2011).

[2] A. Haro, Automatic differentiation methods in computational dynamical systems: Invariant manifolds and normal forms of vector fields at fixed points, preprint.