dynax.derivative

Various functions for computing Lie derivatives.

Functions

lie_derivative(f, h[, n])

Return the Lie (or directional) derivative of h along f.

lie_derivative_jet(f, h[, n])

Compute the n-th order Lie derivative of h along f using Taylor-mode AD.

lie_derivatives_jet(f, h[, n])

Return all Lie derivatives up to order n using Taylor-mode differentiation.

dynax.derivative.lie_derivative(f, h, n=1)[source]

Return the Lie (or directional) derivative of h along f.

The Lie derivative of order n is recursively defined as

\[\begin{split}L_f^0 h(x) &= h(x) \\ L_f^n h(x) &= (\nabla_x L_f^{n-1} h)(x)^T f(x)\end{split}\]
Parameters:
  • f (Callable[[Array], Array]) – Function from \(\mathbb{R}^n\) to \(\mathbb{R}^n\).

  • h (Callable[[Array], Array]) – Function from \(\mathbb{R}^n\) to \(\mathbb{R}\).

  • n (int) – Order of the Lie derivative.

Returns:

Callable[[Array], Array] – The n-th order Lie derivative (a function from \(\mathbb{R}^n\) to \(\mathbb{R}\)).

dynax.derivative.lie_derivative_jet(f, h, n=1)[source]

Compute the n-th order Lie derivative of h along f using Taylor-mode AD.

Takes the same arguments as lie_derivative() and returns the same type, but uses Taylor-mode differentiation via lie_derivatives_jet() internally. Unlike lie_derivatives_jet(), only the n-th order derivative is returned.

Return type:

Callable[[Array], Array]

dynax.derivative.lie_derivatives_jet(f, h, n=1)[source]

Return all Lie derivatives up to order n using Taylor-mode differentiation.

Uses jax.experimental.jet.jet(), which currently does not compose with jax.grad().

See [Robenack05].

Return type:

Callable[[Array], Array]