Ask Your Question
0

hypergeometric function 2F1 with in Sage

asked 12 years ago

TKGunter gravatar image

updated 12 years ago

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?

Preview: (hide)

Comments

Are you looking for symbolic manipulations or just numerical evaluations?

DSM gravatar imageDSM ( 12 years ago )

2 Answers

Sort by » oldest newest most voted
2

answered 12 years ago

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.

Mpmath:

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

Maxima:

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.

Preview: (hide)
link

Comments

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 ( 12 years ago )
1

answered 12 years ago

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

sage: maxima_console() 
(%i1) ? hypergeometric
Preview: (hide)
link

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 12 years ago

Seen: 1,160 times

Last updated: Jan 07 '13