Ask Your Question

hypergeometric function 2F1 with in Sage

asked 2013-01-07 13:38:25 +0100

TKGunter gravatar image

updated 2013-01-07 13:46:57 +0100

DSM gravatar image

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 flag offensive close merge delete


Are you looking for symbolic manipulations or just numerical evaluations?

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

2 Answers

Sort by ยป oldest newest most voted

answered 2013-01-07 14:17:05 +0100

kcrisman gravatar image

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)
sage: maxima.hgfred([2,3],[4],5).n()
0.156542129333755 + 0.150796447372310*I

Probably other parts of Sage as well.

edit flag offensive delete link 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.

TKGunter gravatar imageTKGunter ( 2013-01-07 15:33:52 +0100 )edit

answered 2013-01-07 14:11:53 +0100

achrzesz gravatar image
sage: import mpmath 
sage: mpmath.hyp2f1? 

sage: maxima_console() 
(%i1) ? hypergeometric
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-01-07 13:38:25 +0100

Seen: 975 times

Last updated: Jan 07 '13