# Value of the hypergeometric function

Let $n$, $m$ and $k$ be some (positive) integers such that $(k+3/2)-(n+m/2)<0$. Can the hypergeometric function $$F\left (n+\frac{m}{2},n+\frac{m+1}{2};k+\frac{3}{2};-\tan^2{\phi}\right) \tag{1}$$ be expressed through an expression which is convenient for numerical computation of its value? For example, when $k=0$ we have $$F\left (n+\frac{m}{2},n+\frac{m+1}{2};\frac{3}{2};-\tan^2{\phi}\right)=(\cos{\phi})^{2n+m}\frac{\sin{[(2n+m-1)\phi]}}{(2n+m-1)\sin{\phi}}.$$

P.S. Using the first two transformation formulas indicated by @Johannes Trost, we can get $$F\left (n+\frac{m}{2},n+\frac{m+1}{2};k+\frac{3}{2};-\tan^2{\phi}\right)=[\cos{\phi}]^{2(n+M)}\frac{P_{n+M-k-1}^{(k+1/2,-1/2)}(\cos{(2\phi)}}{P_{n+M-k-1}^{(k+1/2,-1/2)}(1)}$$ if $m=2M$, and $$F\left (n+\frac{m}{2},n+\frac{m+1}{2};k+\frac{3}{2};-\tan^2{\phi}\right)=[\cos{\phi}]^{2(n+M+1)}\frac{P_{n+M-k-1}^{(k+1/2,1/2)}(\cos{(2\phi)}}{P_{n+M-k-1}^{(k+1/2,1/2)}(1)}$$ if $m=2M+1$. Here $P_n^{(\alpha,\beta)}$ are Jacobi polynomials.

These can be considered as a generalization of the above given formula for $k=0$ because $$P_n^{(1/2,1/2)}(\cos{2\phi})=2\frac{(2n+1)!!}{(2n+2)!!}\frac{\sin{[2(n+1)\phi]}}{\sin{2\phi}},$$ and $$P_n^{(1/2,-1/2)}(\cos{2\phi})=\frac{(2n-1)!!}{(2n)!!}\frac{\sin{[(2n+1)\phi]}}{\sin{\phi}}.$$

• By using one of the formulas in dlmf.nist.gov/15.8.E1 one can transform one of first two parameters to a negative integer. The resulting hypergeometric function is then a polynomial of a simple expression of the argument, which can be calculated very efficiently. – Johannes Trost Feb 16 '18 at 20:27

First of all, modern CASes have no problem with evaluating this function so your request is unclear for me. Second, your wishes came true with Maple 2017.3:

convert(hypergeom([a, a+1/2], [5/2], -tan(phi)^2), elementary)
assuming 5/(2)-a<0,(2*a)::posint:simplify(%, symbolic);


$$12\left( \cos \left( \phi \right) \right) ^{2\,a} \left( - \left( \left( a-1/2 \right) \left( \cos \left( \phi \right) \right) ^{2}-a /2+1/2 \right) \sin \left( \phi \right) \cos \left( 2\,a\phi \right) + \sin \left( 2\,a\phi \right) \left( \left( a-1/2 \right) \left( \cos \left( \phi \right) \right) ^{2}-a+3/4 \right) \cos \left( \phi \right) \right)\cdot$$ $${\frac {1}{ \left( 8\,{a}^{3}-24\,{a}^{2}+22\,a-6 \right) \left( \sin \left( \phi \right) \right) ^{3}}}.$$ Maple also performs that conversion for $k=2,\,\dots,11$. The results are too big to be cited here. I think there is a general complicated formula to this end.

• Such expressions can be obtained by using 15.5.6 from dlmf.nist.gov/15.5 but this is not what I want. (1) have to be evaluated in Fortran program many times for different $n$, $m$, $k$ and I wanted an expression which facilitates such a calculation. – Zurab Silagadze Feb 16 '18 at 10:12
• Then look in google.com.ua/… . – user64494 Feb 16 '18 at 11:48
• I think it will be better to express (1) through Jacobi polynomials and then use the recurrent relations for numerical calculations. – Zurab Silagadze Feb 16 '18 at 12:00
• @Zurab Silagadze: Why do you think so? – user64494 Feb 16 '18 at 18:00
• From past experience this gives better numerical stability and accuracy. – Zurab Silagadze Feb 19 '18 at 6:39