% MOMJACLOG  Generates the first 2N 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=momjaclog(dig,N,a,b)
digits(dig);
for k=1:2*N
  psi1=feval(symengine,'psi',k+a+b+1);
  psi1=vpa(psi1);
  psi2=feval(symengine,'psi',k+b);
  psi2=vpa(psi2);
  mom(k)=gamma(vpa(a+1))*gamma(vpa(k+b))* ...
    (psi1-psi2)/ ...
    gamma(vpa(k+a+b+1));
end
