hypergeometric function 2F1 with in Sage

Hello all I've recently began using sage as an alternative to Mathematica, how ever I have not found the sage equivalent to the hypergeometric 2F1 equation. I have looked through the documentation and have found the hypergeometric_U which is used for the 1F1 equation yet this equation is not useful to me. Is there a 2F1 function already implemented within Sage?

edit retag close merge delete

Are you looking for symbolic manipulations or just numerical evaluations?

( 2013-01-07 13:45:36 +0100 )edit

Sort by ยป oldest newest most voted

See Trac 2516 for the present status of "symbolic" hypergeometric functions. However, as DSM is alluding, we have a number of ways to get them.

sage: import mpmath
sage: mpmath.hyp2f1(2,3,4,5)
mpc(real='0.15654212933375475', imag='0.15079644737231007')

sage: maxima.hgfred([2,3],[4],5)
3*(8*(log(-4)/25-1/20)+16*(13/400-2*log(-4)/125))/4
sage: maxima.hgfred([2,3],[4],5).n()
0.156542129333755 + 0.150796447372310*I


Probably other parts of Sage as well.

more

I'm using the hypergeometric function for numerical analysis, but it's good to know the status of the symbolic manipulations as well. Any who the answers worked like a charm. Thanks all.

( 2013-01-07 15:33:52 +0100 )edit
sage: import mpmath
sage: mpmath.hyp2f1?

sage: maxima_console()
(%i1) ? hypergeometric

more