|
From: Rainer S. <rai...@gm...> - 2015-10-16 07:23:18
|
Hello,
the failure of the taylor package to expand gamma and psi comes from interaction
with rules for psi and polygamma. When I remove these rules, the expansion
works.
In particular, these rules need to be removed:
psi(~z) => infinity
when repart z = floor repart z and impart z = 0 and z < 1,
polygamma(~n,~x) => infinity
when numberp x and impart x = 0 and x = floor x and x < 1,
psi(~x+~n) => psi(x+n-1) + 1/(x+n-1) when numberp n and n >= 1,
polygamma(~m,~x+~n) => polygamma(m,x+n-1)+(-1)^m*factorial(m)
/(x+n-1)^(m+1) when numberp n and fixp m and n >= 1,
The first two I will remove from the system: the symbol infinity isn't special,
hence introduing it at random points in a computation leads to nonsense.
The third and fourth rule are part of the ruleset psi_rules, so they can easily
be removed and added later:
Reduce (Free PSL version), 10-Oct-2015 ...
1: clearrules psi_rules;
2: taylor(psi(1+x),x,0,5);
2 4
pi 2 pi 3 4 6
psi(1) + -----*x - zeta(3)*x + -----*x - zeta(5)*x + (1 term) + O(x )
6 90
3: taylor(gamma(1+x),x,0,5);
2 2 3 2
6*psi(1) + pi 2 2*psi(1) + psi(1)*pi - 4*zeta(3) 3
1 + psi(1)*x + -----------------*x + ------------------------------------*x
12 12
4 2 2 4
20*psi(1) + 20*psi(1) *pi - 160*psi(1)*zeta(3) + 3*pi 4
+ ----------------------------------------------------------*x + (1 term)
480
6
+ O(x )
I'll check how removing and adding back of rules can be done automatically in
the taylor code.
Note that gamma and friends still need to be treated specially for expansion
around nonnegative integers. I'm looking at it as well.
Rainer
|