Integrate differential equation in reverse time (from t1 to t0, t1>t0)

I am trying to integrate an equation from time t1 to t0, where t1 > t0. But it seems like, none of the integrators (integrate_ode_rk45, integrate_ode_bdf) support this as of now. Do you know any way to get around this?

Context: I am trying to implement adjoint method to get the gradients wrt parameters of integrated differential equation (something similar to neural-ode paper).

Yeah I think the integration times need to be positive for those. I guess if you’re needing to integrate from t_0 to t_0 - T, integrate instead t_{new} from 0 to T.

So use the substitutions t = t_0 - t_{new} and dt_{new} = -dt.

1 Like