# Series of a hypergeometric function

Let $n>2$ be odd, and let $x\in [0,1]$. I would like to calculate the Taylor expansion of $$x^{2-n} \, _2F_1\left(-\frac{n}{2}-1,-n;2-\frac{n}{2};x^2\right)$$ at $x=1$ leaving $n$ non specified. However, I get inconsistent results with Series. For instance, consider the minimal example in which the value of $\textrm{Hypergeometric2F1}[- 5/2, -3, -5, 1]$ is calculated

Hypergeometric2F1[-1 - n/2, -n, -n - 2, x] /. n -> 3 /. x -> 1


which gives $\frac{1}{32}$, while

Series[  Hypergeometric2F1[-1 - n/2, -n, -n - 2, (1 - z)], {z, 0,
0}] /. n -> 3


gives $\frac{3 \sqrt{z}}{16}$ which for $z=0$ vanishes.

Do you have any suggestion on how to correct this behavior and on how to solve my original problem?

• That's very strange. 2F1 with a negative integer in the first group is a polynomial. Your example is (32 - 48 x + 18 x^2 - x^3)/32, or (1 + 15 z + 15 z^2 + z^3)/32. – The Vee Jul 6 '16 at 9:31
• @The Vee, yes, in general, hypergeometric functions whose numerator parameters are nonpositive integers degenerate to a polynomial, since some of the associated Pochhammer symbols in the series expansion become zero. – J. M. will be back soon Jul 6 '16 at 10:45
• @J.M. Sorry for a misleading wording. I meant the behaviour of Series was strange because the reduction to a polynomial is so obvious. – The Vee Jul 6 '16 at 10:53
• Anyway: Sum[(n (n^2 - 4) (-1)^k Binomial[n, k] x^(2 k - n + 2))/(n (n^2 - 4) + 4 k^2 (3 n - 2 k) - k (6 n^2 - 8)), {k, 0, n}], is prolly the series you want, but I derived that without using Mathematica. – J. M. will be back soon Jul 6 '16 at 11:02
• @J.M., Thanks. It looks like a Laurent expansion at x=0. I was looking for the expansion at $x=1$. – Ettore Minguzzi Jul 6 '16 at 11:36

I realized I did not answer what the OP was asking in my earlier answer. That was the reason for the misbehaviour, here's the solution to the problem:

The solution can be obtained in a piecewise format: the coefficient at $(x-1)^l$ is $$\alpha_l = \begin{cases} a_l + b_l & l ≤ n+2\ \mbox{and even}, \\ a_l + c_l & l ≤ n+2\ \mbox{and odd}, \\ a_l & \mbox{otherwise}, \end{cases}$$ where \begin{aligned} a_l &= (-1)^l {n+l-3 \choose l} {_3F_2}\left(-1-\frac n2, -n, -\frac{n-3}2;\ -\frac{n-3+l}2, -\frac{n-4+l}2;\ 1\right), \\ b_l &= \frac{\left(-1-\frac n2\right)_{\tilde l} (-n)_{\tilde l} (l+1)}{(2-n)_{\tilde l} \tilde l!} {_3F_2}\left(-1-\frac n2+\tilde l, -n+\tilde l, -\frac{n-3}2+\tilde l;\ 1+\tilde l, \frac32;\ 1\right), \\ c_l &= \frac{\left(-1-\frac n2\right)_{\tilde l} (-n)_{\tilde l}}{(2-n)_{\tilde l} \tilde l!} {_3F_2}\left(-1-\frac n2+\tilde l, -n+\tilde l, -\frac{n-3}2+\tilde l;\ 1+\tilde l, \frac12;\ 1\right), \\ \tilde l &= \lfloor(l+n-1)/2\rfloor. \end{aligned} Note that the formulas for $b_l$ and $c_l$ differ in one of the denominator arguments and in a prefactor. All the $_3F_2$'s involved have a finite number of terms as both $-n$ and $-n+\tilde l$ are guaranteed to be nonpositive integers ($\tilde l \le n$).

This was obtained by an explicit expansion of the hypergeometric function $$x^{2-n} {_2F_1}\left(-1-\frac n2, -n;\ 2-\frac n2;\ x^2\right)$$ in $x = 1+z$, using the generalized binomial theorem on $(1+z)^{2-n+2m}$, and extracting the coefficient for $z^l$ by hand. I then separated the cases where the Pochhammer symbol resulting from the latter step was zero, where it was a product of negative numbers only and positive numbers only. (Equivalently, the cases of positive and negative powers of $(1+z)$.) Mathematica then helped simplify the resulting sum over $m$. Unfortunately this is one of the cases where I found doing most of the work easier than trying to convince MMA of using all the assumptions correctly and at a proper time. Even trying to simplify the above piecewise expression brings in new trouble (namely introducing Indeterminates from cases of 0*ComplexIninifty).

I can't guarantee there's no typo in the above. Here's MMA code that should do the same:

With[{n = 7}, Table[
(-1)^l*Binomial[n + l - 3, l]*
HypergeometricPFQ[
{-1 - n/2, -(n - 3)/2, -n},
{-(n - 3 + l)/2, -(n - 4 + l)/2},
1]
+ If[l > n + 2, 0,
Pochhammer[-1 - n/2, ll]*Pochhammer[-n, ll]*
If[EvenQ[l], l + 1, 1]/Pochhammer[2 - n/2, ll]/ll!*
HypergeometricPFQ[
{-1 - n/2 + ll, -n + ll, -(n - 3)/2 + ll},
{ll + 1, If[EvenQ[l], 3/2, 1/2]},
1] /. ll -> Floor[(l + n - 1)/2]
], {l, 0, 20}]]
CoefficientList[Series[
With[{n = 7}, (1 + x)^(2 - n)*
Hypergeometric2F1[-1 - n/2, -n, 2 - n/2, (x + 1)^2]],
{x, 0, 20}], x]
% == %%


{8192, 16384, 15360, 7168, 1792, 0, 0, 0, 0, 0, 56, -168, 350, -616, 981, -1461, 2073, -2835, 3766, -4886, 6216}

{8192, 16384, 15360, 7168, 1792, 0, 0, 0, 0, 0, 56, -168, 350, -616, 981, -1461, 2073, -2835, 3766, -4886, 6216}

True

• Nicely done. It probably should be noted that the hypergeometric functions that show up in the coefficients are in fact polynomial cases as well. – J. M. will be back soon Jul 7 '16 at 17:39

It's a problem of genericity. The output of the command Series[ Hypergeometric2F1[-1 - n/2, -n, -n - 2, (1 - z)], {z, 0, 0}] (prior to substituting for $n$) is valid for almost all real values of $n$ but fails for those which are integer. The reason is that the hypergeometric function changes behaviour in these:

hg = Hypergeometric2F1[-1 - n/2, -n, -n - 2, (1 - z)];
Plot[Evaluate@Table[hg, {n, 2.94, 3.06, 0.02}], {z, 0, 50}]


I'm looking for a reference explaining this behaviour, I'll put it here when I have one.

Edit: Not entirely sure but I think it's using this reduction which has its validity restricted to $c \not\in \mathbb{Z}$.

Somehow this question morphs from asking about Hypergeometric2F1[-1 - n/2, -n, 2-n/2, z] to Hypergeometric2F1[-1 - n/2, -n, -n-2, z]? I'd expect the former is correct and, if so, you can use one of the functional identities (easily turned into a replacement rule) to obtain the series you are after:

x^(2-n) Hypergeometric2F1[-n/2-1,-n,2-n/2,x^2]/.
Hypergeometric2F1[a_,b_,c_,z_]:> Gamma[c-a-b] Gamma[c]*
Hypergeometric2F1[a,b,a+b+1-c,1-z]/(Gamma[c-a] Gamma[c-b])+
Gamma[a+b-c] Gamma[c] (1-z)^(c-a-b)*
Hypergeometric2F1[c-a,c-b,c+1-a-b,1-z]/(Gamma[a] Gamma[b])//FullSimplify


followed by

Series[%, {x, 1, 3}]


The leading term in the expansion is $\frac{2^{n+1} \Gamma \left(2-\frac{n}{2}\right) \Gamma \left(\frac{n+3}{2}\right)}{\sqrt{\pi }}$. Amusingly, the value of the alternative hypergeometric at $x=1$ is the reciprocal of this expression!

BTW, the correct expansion coefficients for $n=7$ are as follows:

{8192, 16384, 15360, 7168, 1792, 0, 0, 0, 0, 0, 112, -336, 700,
-1232, 1962, -2922, 4146, -5670, 7532, -9772, 12432}