subroutine fcn(t, y, f_bdf)
use work
! Calculeaza functia din BDF
implicit real(8) (a-h,o-z)
real(8) y(n), f_bdf(n), ff(n)

! y =xa(1,:)
! Membrii 2:
ff(1) =y(2)
ff(2) =-100*y(1) -101*y(2)

f_bdf(:) = 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(:)

END subroutine fcn

