I am new to Sage; trying to explore open source alternatives to 
Mathematica. 

However, I seem to be having trouble with the incomplete gamma function. 
Here are two difficulties. First, in trying to evaluate the incomplete 
gamma function at a point where the result should be very small, I just get 
zero even if I increase the precision arbitrarily. In particular consider 

numerical_approx(gamma(9, 10^(-3))-gamma(9), digits=40)

the value of this number is approximate -1.1 \times 10^(-28), but I just 
get 0.00000 ...0 for the input above.

Second, I was trying to do a series expansion of the incomplete gamma 
function. (In fact this series expansion is the simplest way of seeing the 
correct value above.)

So, I wanted to consider

taylor((gamma(p,z)-gamma(p))/z^p, z, 0, 1)

and Sage gives me 0.

Actually, the right answer is: -1/p + z/(1 + p)

I can get this answer by putting a specific value of p above in Sage i.e.:

taylor((gamma(4,z)-gamma(4))/z^p, z, 0, 1)

but not otherwise. In fact, for symbolic p everything I tried failed:

for example,
taylor(gamma(p,z), z, 0, 1)

gives me gamma(p) and refuses to give any further terms.

Could you please help? What is the right way to series expand the 
incomplete gamma function, and evaluate it numerically at points where it 
gives a small value?

Suvrat



-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to