Calculating Hypergeometric Function 2F1 for |z|>1

mudkip9001
Messages
19
Reaction score
0
I posted this in the Advanced Physics forum as well, but it occurred to me that this might be a more appropriate place. I'd delete it in Advanced Physics, but I can't see where to do that.

Homework Statement



I'm need to integrate the function

\frac{A}{(1+B^2x^2)^{\frac{C+1}{2}}}

which using wolfram alpha gives a function of the 'hypergeometric function' _2F_1(a,b;c;z)

Ax_2F_1(\frac{1}{2},\frac{C+1}{2};\frac{3}{2};-B^2x^2)

I'm writing a program to calculate the integral at diffent values of x. The problem is that for most of my data, x gives values of \left|B^2x^2\right|> 1 and it seems that calculating it at http://en.wikipedia.org/wiki/Gaussian_hypergeometric_series#The_hypergeometric_series" becomes much more complicated, beyond my mathematical capabilities.

The Attempt at a Solution



messing about with wolfram it seems that as long as z<0 the solution is a real number, so it should be possible to calculate it in my program. However the http://www.gnu.org/software/gsl/manual/html_node/Hypergeometric-Functions.html" library is only capable of calculating it for |z|<1.
 
Last edited by a moderator:
Physics news on Phys.org
Your question boils down to "How can I calculate the hypergeometric function 2F1(z) at values of z where this must be done by analytic continuation?".

In my encounter with hypergeometric functions, I received only a glancing blow and never had to think about this. I hesitate to report a result from a simple Google search. However, this PDF is very much on target. http://www.google.com/url?sa=t&sour...1azbCg&usg=AFQjCNGKqrt-yoMydrnxxp916Lh0p9mF8w It's a thesis about computing hypergeometric functions. Sections 4.6 and 4.7 deal with computing 2F1 by analytic continuation.

Perhaps you can contact the author of this thesis and get some code to do the job.
 
Stephen Tashi said:
Your question boils down to "How can I calculate the hypergeometric function 2F1(z) at values of z where this must be done by analytic continuation?".

In my encounter with hypergeometric functions, I received only a glancing blow and never had to think about this. I hesitate to report a result from a simple Google search. However, this PDF is very much on target. http://www.google.com/url?sa=t&sour...1azbCg&usg=AFQjCNGKqrt-yoMydrnxxp916Lh0p9mF8w It's a thesis about computing hypergeometric functions. Sections 4.6 and 4.7 deal with computing 2F1 by analytic continuation.

Perhaps you can contact the author of this thesis and get some code to do the job.

Thank you! I think I found the solution in the pdf. If I've understood correctly it's quite simple because I'm only dealing with real numbers. All I have to do is use the transformation equation 4.16:

_2F_1(a,b;c;z)=(1-z)^{-a}\frac{\Gamma(c)\Gamma(b-a)}{\Gamma(b)\Gamma(c-a)} {_2}F_1\left( a,c-b;a-b+1;\frac{1}{1-z}\right)
+(1-z)^{-b}\frac{\Gamma(c)\Gamma(a-b)}{\Gamma(a)\Gamma(c-b)} {_2}F_1\left( b,c-a;b-a+1;\frac{1}{1-z}\right)



EDIT: For future refernce in case anyone ever encouters the same problem, I'll put the C code I wrote here.. I checked it against wolframs results and it worked perfectly. Instead of using the gsl_sf_hyperg_2F1 function in Gnu Scientific Library, use this function:

Code:
double hyperg_z_GT1 (double a, double b, double c, double z) {	
	//calculates 2F1 for z < -1
	
	double coef1,coef2;
	
	coef1=gamma(c)*gamma(b-a)*pow(1-z,-a)/(gamma(b)*gamma(c-a));
	coef2=gamma(c)*gamma(a-b)*pow(1-z,-b)/(gamma(a)*gamma(c-b));
	
	return coef1*gsl_sf_hyperg_2F1(a,c-b,a-b+1,1/(1-z))+coef2*gsl_sf_hyperg_2F1(b,c-a,b-a+1,1/(1-z));

}
 
Last edited:
Prove $$\int\limits_0^{\sqrt2/4}\frac{1}{\sqrt{x-x^2}}\arcsin\sqrt{\frac{(x-1)\left(x-1+x\sqrt{9-16x}\right)}{1-2x}} \, \mathrm dx = \frac{\pi^2}{8}.$$ Let $$I = \int\limits_0^{\sqrt 2 / 4}\frac{1}{\sqrt{x-x^2}}\arcsin\sqrt{\frac{(x-1)\left(x-1+x\sqrt{9-16x}\right)}{1-2x}} \, \mathrm dx. \tag{1}$$ The representation integral of ##\arcsin## is $$\arcsin u = \int\limits_{0}^{1} \frac{\mathrm dt}{\sqrt{1-t^2}}, \qquad 0 \leqslant u \leqslant 1.$$ Plugging identity above into ##(1)## with ##u...
Back
Top