Problem Solving an "Inverse" ODE w DifferentialEquations.jl

You compute the flow of f as u(x). I assume everything is scalar. To compute the inverse function of u, the vector field f must not vanish. In case it does, g = 1/f will change sign through a singularity and you need to chose a solver that does not step after the singularity. Theoretically, the solution blows up at this singularity but the numerical time steps need to be adapted to not cross it.You can enforce the sign of g being constant on a trajectory using a simple implicit solver (I bet).

1 Like