Skip to contents

liouville_transform(sys) appends the variable trJ with D(trJ) ~ -trJ * tr(J), where J is the Jacobian of the right-hand side. Started from the density of the initial condition, trJ follows the density along each trajectory, which propagates uncertainty in the initial conditions or parameters (Halder, Lee and Bhattacharya, 2013).

Usage

liouville_transform(sys, ...)

Arguments

sys

An ODE System whose equations are D(x) ~ f.

...

Passed to System().

Value

A System with the extra unknown trJ.

Examples

t <- t_nounits; D <- D_nounits
variables("x(t)", "y(t)"); parameters("a", "b", "c", "d")
sys <- System(list(D(x) ~ a * x - b * x * y, D(y) ~ -d * y + c * x * y), t, name = "lv")
equations(liouville_transform(sys))[[3]]
#> Derivative(trJ(t), t) ~ (-a + b*y(t) - c*x(t) + d)*trJ(t)