% SR_JACOBILOG1 This computes the first N recurrence % coefficients alpha_k, beta_k, k=0,1,\ldots,N-1, to an % accuracy of nofdig digits for the system of polynomials % orthogonal with respect to the weight function % w(x)=(1-x)^a*x^b*log(1/x), % using modified moments relative to the monic shifted % Jacobi polynomials. The output variable ab is the Nx2 % array of the nofdig-digit recurrence coefficients, and % dig is the number of digits required to achieve the % target precision of nofdig decimal places using calculations % with precisions incremented in steps of dd digits. The % number dd in the first statement of the routine, as well % as dig0, can be changed by the user as seen apprpriate. % function [ab,dig]=sr_jacobilog1(N,a,b,nofdig) syms mom ab ab0 ab1 abn dd=10; dig0=nofdig; ii=dig0-dd; maxerr=1; while maxerr>.5*10^(-nofdig) ii=ii+dd; dig=ii mom=mmomjaclog(dig,N,a,b); abm=sr_jacobi(dig,2*N-1,a,b); abm(:,1)=(abm(:,1)+1)/2; abm(:,2)=abm(:,2)/4; if ii==dig0 ab0=schebyshev(dig,N,mom,abm); else ab1=schebyshev(dig,N,mom,abm); serr=vpa(abs(ab1-ab0),dig); err=subs(serr); maxerr=max(max(err)); ab0=ab1; end end ab=vpa(ab1,nofdig);