Stable adaptive step integrator