0

I need to numerically compute the hypergeometric function

$$ _2F_1(k,1,c,z) $$

where $k$ is an integer, $c>2$ is a real number and $|z|<1$, using the integral representation

$$ {}_2F_1[a,b;c;z] = {i \, \Gamma(c) \, e^{i\pi (b-c)} \over \Gamma(b) \Gamma(c-b) 2 \sin (\pi(c-b))} \int^{(1+)}_{0} t^{b-1} (1-t)^{c-b-1}(1-t z)^{-a} dt\,, $$

where the contour goes from $t=0$ close to $t=1$ (call it C1), circles $t=1$ counter-clockwise with radius $\rho$ (call it C2) and goes back to $t=0$ (call it C3). We have then

$$ {}_2F_1[k,1;c;z] = {(1-c) e^{-i\pi c} \over 2 i \sin (\pi c)} \int^{(1+)}_{0} (1-t)^{c-2}(1-t z)^{-k} dt\,. $$

The integral in C3 can be shown to be 0, so what's left is C1 and C2. We have $t_- = t-i \delta$ and $t_+ +i \delta$ in C1 and C2, respectively, so the result should be

$$ {}_2F_1[k,1;c;z] = {(1-c) e^{-i\pi c} \over 2 i \sin (\pi c)} \int^{1-\rho}_{0} \left[(1-t_-)^{c-2}(1-t_- z)^{-k} - (1-t_+)^{c-2}(1-t_+ z)^{-k}\right] dt\,. $$

An NIntegrate with small $\delta$ and $\rho$ should do the trick, but it only gives something very close to 0 as $\delta$ gets smaller, and I can check using Hypergeometric2F1 that the result is quite finite. What is wrong in my logic?

ABarr
  • 161
  • I am sorry but, is not your definition of the Hypergeometric function that corresponding to its integral representation on the real axis? If so, there is no contour integral, and you should revise your definition. Please, take a look at this – José Antonio Díaz Navas Nov 16 '17 at 17:32
  • Thank you for your answer. I know that there is a definition on the real axis, but my goal would be to be able to compute the hypergeometric in the same way for values of $c$ for which the real representation is not valid, like $c=-0.33$ for example. The real representation is only valid for $\Re(c) > \Re(b)$, while this one is valid as long as $\Re(b)>0$. – ABarr Nov 17 '17 at 02:37

0 Answers0