function C = jacint(x,mue)
%
% input:
% 	x(N,4)		pseudo orbit
% 	mue		parameter for mass ratio of the primaries
%
% output:
% 	C(N)		C(n) contains value of the Jacobi integral
% 			at x(n)
%
  mu2=mue;
  mu1=1-mue;
  R1=(x(:,1)+mu2).^2+x(:,2).^2;
  R2=(x(:,1)-mu1).^2+x(:,2).^2;
  r1=sqrt(R1); r2=sqrt(R2);
  C=-x(:,3).^2-x(:,4).^2+mu1.*R1+mu2.*R2+2*mu1./r1+2*mu2./r2 ;

return

%
% written   Sept/10/02   D.Stoffer
%

