Ask Your Question
0

hypergeometric function 2F1 with in Sage

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

TKGunter gravatar image

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

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

Comments

Are you looking for symbolic manipulations or just numerical evaluations?

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

2 Answers

Sort by ยป oldest newest most voted
2

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

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.

edit flag offensive delete link more

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 ( 2013-01-07 15:33:52 +0200 )edit
1

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

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

Stats

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

Seen: 992 times

Last updated: Jan 07 '13