subroutine jfcn(n, w, jf)
! Cu ecuatia-1
real(4) w(n), jf(n,n)
common B1, B2, B3, C1, C2, c0, r21
common ieq

!f(1)=B3 +r21*x2*(phi(x2) +C2) -x1*(phi(x1) +C1)

!f(2)=x1 +x2 - c

jf =0.
x1 =w(1); x2 =w(2)


! Jacobian:
jf(1,1) =-(phi(x1) +C1 +x1*dphi(x1))
jf(1,2) =r21*(phi(x2) +C2 +x2*dphi(x2))

jf(2,1) =1.
jf(2,2) =1.

END
