subroutine DERIVS(t)
use work
! Calculeaza membrii II ai ec. dif. de ordinul I
implicit real*8 (a-h,o-z)

! 2-Body:
! x''=-x/r**3; x(0)=1-e; x'(0)=0
! y''=-y/r**3; y(0) =0; y'(0) =sqrt((1+e)/(1-e))
! r=x**2+y**2

! 1st order:
! x' =u		; x(0)=1-e
! y' =v		; y(0)=0
! u' =-x/r3	; u(0)=0
! v' =-y/r3	; v(0)=sqrt((1+e)/(1-e))

r =dsqrt(xEnd(1)*xEnd(1)+xEnd(2)*xEnd(2))
r3 =r*r*r

f(1) =xEnd(3)
f(2) =xEnd(4)
f(3) =-xEnd(1)/r3
f(4) =-xEnd(2)/r3 

END subroutine DERIVS

