        Subroutine euler2d(d1x,d2x,ti,xi,vi,tf,xf,vf)
c==========================================================
c euler2d.f: Solution of the second-order 1D ODE
c method:    simple Euler method
c written by: Alex Godunov (October 2006)
c-------------------------------------------------
c input ...
c d1x(t,x,v)- function dx/dt   (supplied by a user)
c d2x(t,x,v)- function d2x/dt2 (supplied by a user)
c ti 	- initial time
c xi  - initial position
c vi  - initial velocity (first order derivative)
c tf  - time for a solution
c
c output ...
c xf  - solution at point tf
c vf  - velocity at point tf
c=================================================
	Real*8 d1x,d2x,ti,xi,vi,tf,xf,vf
	xf = xi + d1x(t,xi,vi)*(tf-ti)
	vf = vi + d2x(t,xi,vi)*(tf-ti)
	Return
	End

