Maxima is using the A&S 15.2.6 to derive the value from F(-1/2, a+1; a+1; x). But that's equal to sqrt(1-x) and 15.2.6 is not valid in that case. Perhaps 15.2.16 should have been used instead?
(%i1) hgfred([-1/2,a+1],[a+2],x);
expt: undefined: 0 to a negative exponent.
Maxima is using the A&S 15.2.6 to derive the value from F(-1/2, a+1; a+1; x). But that's equal to sqrt(1-x) and 15.2.6 is not valid in that case. Perhaps 15.2.16 should have been used instead?
A&S 15.2.16 doesn't help, but A&S 15.2.14 gives an answer because hgfred([a+1,b],[c],z) and hgfred([a,b+1],[c],z) can be expressed in terms of associated Legendre function and an elementary function.
Assuming I did things correctly,
hgfred([-1/2,a+1],[a+2],x) =
(2^(a+1)*assoc_legendre_p(a,-a-1,sqrt(1-z))*gamma(a+2)*z^(-a/2-1/2)
+(2*a+2)*sqrt(1-z))
/(2*a+3)
I don't have any algorithm to determine that unfortunately.
Perhaps it's best that maxima just returns the 2F1 function itself instead of generating an error.
Fixed in git. The formula is not applied if a+1/2 or b+1/2 is zero which would cause a division by zero.
Log in to post a comment.