Consider the following function:
fun = HypergeometricPFQ[{1, x1-y1, 1-x1-y1-2u}, {x2-y1, 3-x2-y1-2u}, 1];
Let us try and evaluate this function on the following specific values of the arguments:
sub = {x1 -> 3, x2 -> 2, y1 -> 7, y2 -> 4, u -> 51/10};
fun/.sub
43/11
Alternatively, we can functionally expand fun
first to obtain
funEx = FunctionExpand[fun, Element[x1 | y1 | x2 | y2, Integers] && Element[u, Rationals] && y1 >= x1 && y1 >= x2 && y2 >= x2 && y1 >= y2 && x1 >= x2]
-((2 (-1 + x2 - y1))/((-1 - x1 + x2) (-2 + 2 u + x1 + x2))) + ( 2 u (-1 + x2 - y1))/((-1 - x1 + x2) (-2 + 2 u + x1 + x2)) + ( x2 (-1 + x2 - y1))/((-1 - x1 + x2) (-2 + 2 u + x1 + x2)) + ((-1 + x2 - y1) y1)/((-1 - x1 + x2) (-2 + 2 u + x1 + x2)) - ( Gamma[3 - 2 u - x2 - y1] Gamma[ x2 - y1])/((1 + x1 - x2) (-2 + 2 u + x1 + x2) Gamma[ 1 - 2 u - x1 - y1] Gamma[x1 - y1])
First of all we see that even though FunctionExpand
was explicitly told that y1>=x1
and y1>=x2
and x1,x2,y1
are integers, it still produced the ill behaved ratio Gamma[x2 - y1]/Gamma[x1 - y1]
, such that trying to evaluate funEx/.sub
leads to the error:
Indeterminate
What is worse, even if we try to regularize by setting y1->7+e
and expanding around small e
, we find a discrepancy with the original evaluation above:
Series[funEx /. y1 -> 7 + e /. sub, {e, 0, 0}] // FullSimplify// Normal
-(5203/125)
Which is clearly different from 43/11
. Why does this function behave this way? I need to simplify the function analytically and I am only evaluating it to check if the functional expansion was correct. Clearly it is not correct and I am at a loss on how to proceed. Any suggestions on how to obtain the correct simplification?
EDIT:
J. M. suggested to use the Thomae transformation. In the above case this leads to
subv={a -> 1, b -> x1 - y1, c -> 1 - x1 - y1 - 2 u, e -> x2 - y1, f -> 3 - x2 - y1 - 2 u};
s = e + f - a - b - c;
fun2=(Gamma[e] Gamma[f] Gamma[s])/(Gamma[a] Gamma[s + b] Gamma[s + c])HypergeometricPFQ[{s, e - a, f - a}, {s + b, s + c}, 1]/.subv
Now, trying to functionally expand this as before, gives
funEx2=FunctionExpand[fun2, Element[x1 | y1 | x2 | y2, Integers] && Element[u, Rationals] && y1 >= x1 && y1 >= x2 && y2 >= x2 && y1 >= y2 && x1 >= x2] //FullSimplify
-(((-1 + x2 - y1) (-2 + 2 u + x2 + y1) + (Gamma[3 - 2 u - x2 - y1] Gamma[x2 - y1])/(Gamma[1 - 2 u - x1 - y1] Gamma[x1 - y1]))/((1 + x1 - x2) (-2 + 2 u + x1 + x2)))
which still produces the same ill behaved ratio of gamma functions.
Resolution:
Just trying to evaluate the function fun
a few times on some different y1
and x1
values like
fun/. y1 -> 3 /. x1 -> 2 // Simplify
((-4 + x2) (1 + 2 u + x2))/((-3 + x2) (2 u + x2))
One can infer that the whole hypergeometric function actually in general reduces to just
((-1 + x2 - y1) (-2 + 2 u + x2 + y1))/((-1 + x2 - x1) (-2 + 2 u + x1 + x2))
This is basically what both the functional expansions above produced, but with all the gamma functions dropped. Even though I am almost certain now that this is the correct expansion, this way to do things is highly unsatisfying. Mathematica should do better than this.