Added a more general euler integration routine that can handle forward
or backward numerical integration of the provided ode.