Ask Your Question
0

numerical value of hypergeometric function

asked 2016-01-31 09:31:56 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

I want to compute the value of hypergeometric 2F1 like this

a=1/3; b=2/3; c=5/6; x=27/32
print n(hypergeometric([2,1],[a,b,c],x)

Sagemath answered 16.9608452387059. But this should be 8/5=1.60000000. All the other numerical values are also unreliable.

I hope this will be fixed in the next version.

edit retag flag offensive close merge delete

Comments

Where does your supposed "right answer" come from ?

FrédéricC gravatar imageFrédéricC ( 2016-02-01 19:54:15 +0100 )edit

The special value of the hypergeometric 2F1 can be found in http://mathworld.wolfram.com/HypergeometricFunction.html (this page) or maybe its reference. By the way, 8/6 in my posting is typo. Correctly, this is 8/5.

cxrjdd gravatar imagecxrjdd ( 2016-02-13 09:01:57 +0100 )edit

2 Answers

Sort by » oldest newest most voted
2

answered 2016-02-16 21:32:41 +0100

FrédéricC gravatar image

Just a matter of syntax (read the doc). You do not need to give [2,1] as parameters, only the actual parameters of the 2F1.

sage: a=1/3; b=2/3; c=5/6; x=27/32
sage: v=hypergeometric([a,b],[c],x)
sage: v.hypergeometric_simplify()
1/5*5^(11/12)*3^(1/4)*assoc_legendre_p(-2/3, 1/6, -11/16)*gamma(5/6)
sage: v.n()
1.60000000000000

So the simplification is not perfect.

edit flag offensive delete link more

Comments

Indeed

sage: QQ(v)
Traceback (most recent call last):
...
TypeError: unable to convert hypergeometric((1/3, 2/3), (5/6,), 27/32) to a rational
vdelecroix gravatar imagevdelecroix ( 2016-02-17 15:13:45 +0100 )edit
0

answered 2016-02-18 20:19:38 +0100

cxrjdd gravatar image

Thank you for telling me the correct usage.

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: 2016-01-31 09:31:56 +0100

Seen: 618 times

Last updated: Feb 18 '16