ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 07 Jan 2013 08:33:52 -0600hypergeometric function 2F1 with in Sagehttp://ask.sagemath.org/question/9689/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?Mon, 07 Jan 2013 06:38:25 -0600http://ask.sagemath.org/question/9689/hypergeometric-function-2f1-with-in-sage/Comment by DSM for <p>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?</p>
http://ask.sagemath.org/question/9689/hypergeometric-function-2f1-with-in-sage/?comment=18424#post-id-18424Are you looking for symbolic manipulations or just numerical evaluations? Mon, 07 Jan 2013 06:45:36 -0600http://ask.sagemath.org/question/9689/hypergeometric-function-2f1-with-in-sage/?comment=18424#post-id-18424Answer by kcrisman for <p>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?</p>
http://ask.sagemath.org/question/9689/hypergeometric-function-2f1-with-in-sage/?answer=14438#post-id-14438See [Trac 2516](http://trac.sagemath.org/sage_trac/ticket/2516) for the present status of "symbolic" hypergeometric functions. However, as DSM is alluding, we have a number of ways to get them.
[Mpmath](http://mpmath.googlecode.com/svn/trunk/doc/build/functions/hypergeometric.html):
sage: import mpmath
sage: mpmath.hyp2f1(2,3,4,5)
mpc(real='0.15654212933375475', imag='0.15079644737231007')
[Maxima](http://maxima.sourceforge.net/docs/manual/en/maxima_15.html#SEC85):
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.Mon, 07 Jan 2013 07:17:05 -0600http://ask.sagemath.org/question/9689/hypergeometric-function-2f1-with-in-sage/?answer=14438#post-id-14438Comment by TKGunter for <p>See <a href="http://trac.sagemath.org/sage_trac/ticket/2516">Trac 2516</a> for the present status of "symbolic" hypergeometric functions. However, as DSM is alluding, we have a number of ways to get them.</p>
<p><a href="http://mpmath.googlecode.com/svn/trunk/doc/build/functions/hypergeometric.html">Mpmath</a>:</p>
<pre><code>sage: import mpmath
sage: mpmath.hyp2f1(2,3,4,5)
mpc(real='0.15654212933375475', imag='0.15079644737231007')
</code></pre>
<p><a href="http://maxima.sourceforge.net/docs/manual/en/maxima_15.html#SEC85">Maxima</a>:</p>
<pre><code>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
</code></pre>
<p>Probably other parts of Sage as well.</p>
http://ask.sagemath.org/question/9689/hypergeometric-function-2f1-with-in-sage/?comment=18423#post-id-18423I'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.Mon, 07 Jan 2013 08:33:52 -0600http://ask.sagemath.org/question/9689/hypergeometric-function-2f1-with-in-sage/?comment=18423#post-id-18423Answer by achrzesz for <p>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?</p>
http://ask.sagemath.org/question/9689/hypergeometric-function-2f1-with-in-sage/?answer=14437#post-id-14437 sage: import mpmath
sage: mpmath.hyp2f1?
sage: maxima_console()
(%i1) ? hypergeometricMon, 07 Jan 2013 07:11:53 -0600http://ask.sagemath.org/question/9689/hypergeometric-function-2f1-with-in-sage/?answer=14437#post-id-14437