Newsgroups: sci.math From: mcohen@[deleted] (Martin Cohen) Subject: Psi function at rational values Date: Thu, 27 Apr 1995 22:18:33 GMT A short while post I posted a query about computing the psi function (Gamma'(x)/Gamma(x)) at rational values. I have since found these sources: "An Atlas of Functions" by Jerome Spanier and Keith Oldham, section 44:4. Higher Transcendental Functions, Vol I, Erdelyi and others, p. 18, sec 1.7.3. This givies enough info so you can derive it for yourself. Here is Gauss' formula for psi(m/n) for 0 < m < n from "An Atlas of Functions" by Jerome Spanier and Keith Oldham, section 44:4. "g" is Euler's constant (gamma), FLOOR(a, b) is integer part of a/b. This is my input to Derive. P(m,n):=-g-pi/2*COT(m*pi/n)+2*SUM(COS(2*j*m*pi/n)*LN(2*SIN(j*pi/n)), j,1,FLOOR(n-1,2))-LN(n)-LN(n-2*FLOOR(n-1,2)) Here is some sample output from Derive. P(1,2) -2*LN(2)-g P(1,3) -3*LN(3)/2-g-SQRT(3)*pi/6 P(1,6) -3*LN(3)/2-2*LN(2)-g-SQRT(3)*pi/2 P(5,6) -3*LN(3)/2-2*LN(2)-g+SQRT(3)*pi/2 P(1,8) SQRT(2)*LN(3-2*SQRT(2))/2-4*LN(2)-g-SQRT(2)*pi/2-pi/2 P(1,9) -2*COS(pi/9)*LN(COS(pi/18))+2*SIN(pi/18)*LN(SIN(2*pi/9))+2*COS(2*pi/9)*LN(SIN(~ pi/9))-5*LN(3)/2-pi*COT(pi/9)/2-g P(1,10) 3*SQRT(5)*LN(3/2-SQRT(5)/2)/4-5*LN(5)/4+LN(4)/4-5*LN(2)/2-g-pi*SQRT(SQRT(5)/2+~ 5/4) P(1,11) -2*LN(2*COS(5*pi/22))*SIN(pi/22)-2*LN(2*COS(3*pi/22))*SIN(5*pi/22)-2*LN(2*COS(~ pi/22))*COS(pi/11)+2*LN(2*SIN(2*pi/11))*SIN(3*pi/22)+2*LN(2*SIN(pi/11))*COS(2*~ pi/11)-LN(11)-pi*COT(pi/11)/2-g Then I noticed this: P(1,5)-P(2,10) 2*LN(2) P(1,2)-P(2,4) 2*LN(2) P(1,2) -2*LN(2)-g P(2,4) -4*LN(2)-g I realized that the book said that at least one of m and n in P(n, m) had to be odd, so, to be safe, I defined this: Q(m,n):=P(m/GCD(m,n),n/GCD(m,n)) Q(2,10) SQRT(5)*LN(3/2-SQRT(5)/2)/4-5*LN(5)/4-LN(4)/4+LN(2)/2-g-pi*SQRT(SQRT(5)/10+1/4) P(2,10) SQRT(5)*LN(3/2-SQRT(5)/2)/4-5*LN(5)/4-3*LN(4)/4-LN(2)/2-g-pi*SQRT(SQRT(5)/10+1~ /4) Q(2,10)-Q(1,5) 0 So that's ok. Just for fun: P(1,1) "+-"inf As it should be. Q(1,12) SQRT(3)*LN(2-SQRT(3))-3*LN(3)/2-3*LN(2)-g-pi*(SQRT(3)/2+1) Q(1,15) -2*SIN(pi/30)*LN(COS(7*pi/30))-2*COS(pi/15)*LN(COS(pi/30))+2*SIN(7*pi/30)*LN(S~ IN(2*pi/15))+2*LN(2*SIN(pi/15))*COS(2*pi/15)+SQRT(5)*LN(3/2-SQRT(5)/2)/4-5*LN(~ 5)/4-LN(4)/4-3*LN(3)/2-SQRT(5)*LN(2)*SIN(7*pi/30)+LN(2)*SIN(7*pi/30)+LN(2)/2-p~ i*COT(pi/15)/2-g Q(1,16) -SQRT(2-SQRT(2))*LN(SQRT(SQRT(2)/4+1/2)/(1-SQRT(1/2-SQRT(2)/4)))-SQRT(SQRT(2)+~ 2)*LN(SQRT(1/2-SQRT(2)/4)/(1-SQRT(SQRT(2)/4+1/2)))+SQRT(2)*LN(3-2*SQRT(2))/2-5~ *LN(2)-g-pi*SQRT(SQRT(2)/2+1)-SQRT(2)*pi/2-pi/2 Q(1,17) -2*LN(2*COS(7*pi/34))*SIN(3*pi/34)-2*LN(2*COS(5*pi/34))*SIN(7*pi/34)-2*LN(2*CO~ S(3*pi/34))*COS(3*pi/17)-2*LN(2*COS(pi/34))*COS(pi/17)+2*LN(2*SIN(4*pi/17))*SI~ N(pi/34)+2*LN(2*SIN(3*pi/17))*SIN(5*pi/34)+2*LN(2*SIN(2*pi/17))*COS(4*pi/17)+2~ *LN(2*SIN(pi/17))*COS(2*pi/17)-LN(17)-pi*COT(pi/17)/2-g P(1,18) -2*SIN(pi/18)*LN(COT(2*pi/9))-2*COS(2*pi/9)*LN(COT(pi/9))-2*COS(pi/9)*LN(COT(p~ i/18))-5*LN(3)/2-2*LN(2)-pi*COT(pi/18)/2-g P(1,20) -SQRT(5/2-SQRT(5)/2)*LN((SQRT(5)+1)/(4*(1-SQRT(5/8-SQRT(5)/8))))-SQRT(SQRT(5)/~ 2+5/2)*LN((1-SQRT(5))/(4*(SQRT(SQRT(5)/8+5/8)-1)))+3*SQRT(5)*LN(3/2-SQRT(5)/2)~ /4-5*LN(5)/4+LN(4)/4-7*LN(2)/2-g-pi*SQRT(SQRT(5)/2+5/4)-SQRT(5)*pi/2-pi/2 -- Marty Cohen (mcohen@[deleted]) - Not the guy in Philly This is my opinion [deletia] Use this material of your own free will [Affiliation deleted at author's request -- djr]