Calculating Hypergeometric Function 2F1 for |z|>1

In summary, the individual is seeking help with integrating a function involving the hypergeometric function 2F1. They are writing a program to calculate the integral at different values of x, but are facing difficulties when x gives values outside the range of |z|<1, which is the limit of the library they are using. They found a solution in a PDF that involves using a transformation equation and provided a C code for future reference.
  • #1
mudkip9001
20
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

[tex]\frac{A}{(1+B^2x^2)^{\frac{C+1}{2}}}[/tex]

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

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

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 [tex]\left|B^2x^2\right|> 1[/tex] 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
  • #2
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.
 
  • #3
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:

[tex]_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)[/tex]
[tex]+(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)[/tex]



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:

FAQ: Calculating Hypergeometric Function 2F1 for |z|>1

1. What is the purpose of calculating the Hypergeometric Function 2F1 for |z|>1?

The Hypergeometric Function 2F1 is a special function in mathematics that is used to solve various problems in fields such as physics, engineering, and statistics. It is particularly useful for solving problems involving probability and statistics, making it an important tool in scientific research and analysis.

2. How is the Hypergeometric Function 2F1 calculated for |z|>1?

The Hypergeometric Function 2F1 is calculated using a series expansion formula, known as the Gauss hypergeometric series. This involves summing an infinite series of terms, each of which involves the hypergeometric function and its parameters. While the series can be difficult to compute manually, it can be efficiently calculated using specialized software or programming languages.

3. What are the applications of the Hypergeometric Function 2F1?

The Hypergeometric Function 2F1 has a wide range of applications in various fields, including physics, engineering, statistics, and computer science. It is used to solve problems involving probability distributions, statistical analysis, special functions, and many other mathematical concepts. It is also used in the development of algorithms and software for scientific and engineering calculations.

4. What are some important properties of the Hypergeometric Function 2F1?

One important property of the Hypergeometric Function 2F1 is that it is a special case of the more general hypergeometric function. It is also related to other special functions, such as the gamma function and the beta function. Additionally, the Hypergeometric Function 2F1 has many useful properties, such as symmetry, recurrence relations, and integral representations, which make it a powerful tool for solving mathematical problems.

5. How is the Hypergeometric Function 2F1 used in real-world scenarios?

The Hypergeometric Function 2F1 is used in many real-world scenarios, including statistical analysis, data analysis, and scientific research. For example, it can be used to calculate probabilities in various statistical models, such as the hypergeometric distribution and the binomial distribution. It is also used in the analysis of data from experiments and surveys, as well as in the development of mathematical models for physical systems.

Similar threads

Replies
5
Views
1K
Replies
1
Views
3K
Replies
17
Views
2K
Replies
11
Views
679
Replies
1
Views
2K
Replies
4
Views
2K
Back
Top