% MMOMJACLOG  Generates the first 2N modified 
%    moments to dig decimal places of the 
%    weight function 
%    w(x)=(1-x)^a*x^b*log(1/x) on (0,1).
%    It requires Release 5.1 (R2008b) or later
%    releases of the Matlab Symbolic Math Toolbox.
%
function mom=mmomjaclog(dig,N,a,b)
digits(dig);
psi1=feval(symengine,'psi',a+b+2);
psi1=vpa(psi1);
psi2=feval(symengine,'psi',b+1);
psi2=vpa(psi2);
mom(1)=gamma(vpa(a+1))*gamma(vpa(b+1))* ...
  (psi1-psi2)/ ...
  gamma(vpa(a+b+2));
sgn=1;
for k=2:2*N
  sgn=-sgn;
  mom(k)=sgn*gamma(vpa(k-1))*gamma(vpa(k+a))* ...
    gamma(vpa(b+1))/((k+a+b)*gamma(vpa(2*k+a+b-1)));
end
