I would like to solve two coupled ode systems. The first is integrated by any method as usual, while the second is integrated once every 10 steps and its solution is used to modify the parameters (also the rhs) in the first problem. They are coupled in the sense that the second ode should be integrated using the same method and time step size as the first one every 10 steps.

I found that callbacks may be used to achieve this. But I am not clear how to define the callback as another ode and interact these two ode systems. The step callback is not enough because the second ode needs to be solved simultaneously as the first one. I appreciate any inputs on this.