subroutine jfcn(t, y, jf)
use work
! Calculeaza jacobianul lui f_BDF
implicit real(8) (a-h,o-z)
real(8) y(n), jf(n,n)

! Ecuatia de test:
! x' = u
! u' = -101x' -100x

! ff(1) =y(2)
! ff(2) =-100*y(1) -101*y(2)

! fcn = c(0)*y(:) +c(1)*xa(0,:) +c(2)*xa(-1,:) +c(3)*xa(-2,:) +c(4)*xa(-3,:) +c(5)*xa(-4,:) -h*ff(:)

! fcn(1) = c(0)*y(1) -h*y(2)                   +c(1)*xa(0,1) +c(2)*xa(-1,1) +c(3)*xa(-2,1) +c(4)*xa(-3,1) +c(5)*xa(-4,1)
!
! fcn(2) = c(0)*y(2)  -h*(-100*y(1) -101*y(2)) +c(1)*xa(0,2) +c(2)*xa(-1,2) +c(3)*xa(-2,2) +c(4)*xa(-3,2) +c(5)*xa(-4,2)


jf(1,1) =c(k,0);	jf(1,2) =-h;
jf(2,1) =h*100;	jf(2,2) =c(k,0) +h*101

END subroutine jfcn

