I want to integrate a control problem, i.e. an ODE of the form dx/dt = A.f(t), where
x(t) is a function in R^3, f(t) is a function in R^4 and A is a matrix 3x4. In my special case, f(t) = F'(t), i.e. a time derivative of a function F. Furthermore, F is 1-periodic. Hence, integrating the ODE over the interval [0, 1] should yield the starting position again. However, methods like solve_ivp
from scipy.integrate
do not respect this periodicity at all (I have tried all the possible methods like RK45, Radau, DOP853, LSODA
).
Is there a special ODE solver that respects such periodicity to a high degree of precision?
question from:https://stackoverflow.com/questions/65848198/ode-solver-for-python-respecting-periodicity