About a hypergeometric functions (2F1).

  • #1
60
0
Today, I use two softwares to calculate the value of a hypergeometric functions (2F1). One is Mathematica and another is Matlab. But they give me different results.
For examples:
(1) 2F1(0.5, 1., 1.5, 5) (Pay an attention to the sign of the image part.)

Mathematica's result: 0.21520 - 0.70248 i
Matlab's result: 0.2152 + 0.7025 i


(2) 2F1(2,3,4,5)

Mathematica's result: 0.156542+ 0.150796 i
Matlab's result: 0.1565 + 0.1508 i

Now, I am confused.
 
  • #2
First you need to answer a question. When you evaluate a power series outside its radius of convergence, what is it you want to do? Once you answer that, you can investigate what the two softwares have chosen to do.

Maple says
[tex]
{{}_2{\rm F}_1(1/2,1;\,3/2;\,z)}={\frac {{\rm arctanh} \left( \sqrt {z}
\right) }{\sqrt {z}}}
[/tex]
The function tanh(z) has values between -1 and 1 for real z, so you need complex numbers to evaluate arctanh at [itex]z=\sqrt{5}[/itex]. And arctanh is multi-valued as a complex function, so you need some convention of whch branch to choose. Maple agrees with Mathematica on this.
But Matlab's value is also "a value" of this multi-valued function.
 
  • #3
I'm wondering how you are doing this in matlab. Are you using the symbolic math toolbox or some third-party code, or am I just not aware of another option?

I am running MATLAB 2009b, and with the symbolic math toolbox I get:

>> z=hypergeom([.5, 1], 3/2, 5)

z =

0.215204470482002 - 0.702481473104073i


which agrees with mathematica and maple.

Of course, g_edgar is right, that the function is multivalued and thus without specifying a branch there are multiple values that are correct. The fact that the series representation only converges for arguments with magnitude less than one doesn't bother me - there are integral representations that provide an analytic continuation outside the unit circle, with the caveat that you have to chose a branch and cut ...

jason

EDIT: I just realized that it is only the series about 0 that only converges for |z|<1. series about other points can also provide analytic continuation outside the unit circle.
 
Last edited:
  • #4
I'm wondering how you are doing this in matlab. Are you using the symbolic math toolbox or some third-party code, or am I just not aware of another option?

I am running MATLAB 2009b, and with the symbolic math toolbox I get:

>> z=hypergeom([.5, 1], 3/2, 5)

z =

0.215204470482002 - 0.702481473104073i


which agrees with mathematica and maple.

Of course, g_edgar is right, that the function is multivalued and thus without specifying a branch there are multiple values that are correct. The fact that the series representation only converges for arguments with magnitude less than one doesn't bother me - there are integral representations that provide an analytic continuation outside the unit circle, with the caveat that you have to chose a branch and cut ...

jason

EDIT: I just realized that it is only the series about 0 that only converges for |z|<1. series about other points can also provide analytic continuation outside the unit circle.

Yes, you're right that hypergeometric function is multivalued. I think the result of Mathematica is more serious.


Just now, I ran MATLAB R2007a:
>> z=hypergeom([.5, 1], 3/2, 5)

z =

0.2152 + 0.7025i
 

Suggested for: About a hypergeometric functions (2F1).

Replies
3
Views
867
Replies
5
Views
998
Replies
1
Views
792
Replies
4
Views
611
Replies
4
Views
631
Replies
2
Views
463
Replies
9
Views
1K
Replies
2
Views
508
Back
Top