Solver for Ordinary Differential Equations (ODE), Switching Automatically Between Stiff and Non-stiff Methods