Hypergeometric function representation in other forms for faster computation

142 Views Asked by At

I am using two hypergeomtric functions with MATLAB:

$_2F_1(a, b, a+1, d)$ and $_2F_1(a+1, b, a+2, d)$, where $d$ is from the open interval $(0,1)$ and $a > 0$, $b < 0$, all real numbers

However, evaluation in Matlab is extremely slow. Are there ways I can formulate this into another function that is much faster. Or, if there is any relationship between the 1st and 2nd hypergeometric functions? I would like to be able to reduce computation time by half possibly.

1

There are 1 best solutions below

5
On

Since the time of computation depends on an algorithm unknown to the user, one cannot give a definitive answer.

I suggest to compare the times of computation for the hypergeometric function and the incomplete Beta function : $$_2F_1(a,b,a+1,x)=a\:x^{-a}B_x(a,1-b)$$ $$_2F_1(a+1,b,a+2,x)=a\:x^{-(a+1)}B_x(a+1,1-b)$$ Also, compare with the direct numerical integration method. See equation (1) in : http://mathworld.wolfram.com/IncompleteBetaFunction.html $$_2F_1(a,b,a+1,x)=a\:x^{-a}\int_0^x \frac{t^{a-1}}{(1-t)^b}dt$$ $$_2F_1(a+1,b,a+2,x)=(a+1)\:x^{-(a+1)}\int_0^x \frac{t^{a}}{(1-t)^b}dt$$

Note : For $x=\epsilon$ close to $0$ the integral reduces to $\int_0^\epsilon \frac{t^{a-1}}{(1-t)^b}dt\simeq a^{-1}\epsilon^a$.