7
$\begingroup$

Given the function,

gg4[ q_, k_] := Sum[((-1)^(n + m)*Binomial[q, n]*Binomial[q, m]*Gamma[n + q]*
  Gamma[m + q])/((-1 - 2*k + n + m + 2*q)*Gamma[-k + n + q]*
  Gamma[-k + m + q]), {n, 0, q}, {m, 0, q}, 
  Assumptions -> q ∈ Integers && k ∈ Integers && q > k >= 0]

Mathematica 10.0.2.0 under Windows 8.1 (64 bit) takes about 20 minutes to evaluate

f = gg4[q, 1]

yielding

(* -(((-2 + q) (-1 + q) Gamma[-3 + 2 q] Pochhammer[1, q]^2)/
     (Gamma[1 + q] Gamma[-2 + 3 q])) *)

which is incorrect, as can be seen from comparing

Table[f /. q -> i, {i, 2, 6}]
(* {0, -(1/30), -(1/105), -(1/462), -(4/9009)} *)

with

Table[gg4[q, 1], {q, 2, 6}]
(* {2/15, 2/315, 2/5005, 4/153153, 5/2909907} *)

This issue is reproducible and also occurs for Mathematica 9.0.1.0. Suggestions?

Addendum - I also tried to compute the Sum above with GenerateConditions -> True but aborted the calculation after nine hours. No answer is better than a wrong answer, I suppose.

$\endgroup$
3
  • $\begingroup$ Confirmed in version 8 on Mac OS X. $\endgroup$
    – Jens
    Commented Apr 1, 2015 at 4:51
  • 1
    $\begingroup$ Nine hours?! You, my good sir, have the patience of a saint. $\endgroup$ Commented Apr 1, 2015 at 17:54
  • $\begingroup$ Problem persists with version 10.1 on Windows 8.1 (64 bit). $\endgroup$
    – bbgodfrey
    Commented Apr 3, 2015 at 22:17

1 Answer 1

10
$\begingroup$

I have had the same troubles. When Sum returns an expression containing Pochhammer, it's very often wrong. However, I never experienced this problem with FindSequenceFunction:

Table[gg4[q, 1], {q, 2, 6}]
(*{2/15, 2/315, 2/5005, 4/153153, 5/2909907}*)

gg4k1[q_] = FullSimplify[FindSequenceFunction[Table[gg4[q, 1], {q, 2, 11}], q - 1]]
(*(2^(5 - 4 q) Sqrt[\[Pi]] (-1 + q)^2 q Gamma[-3 + 2 q])/Gamma[-(1/2) + 2 q]*)

Table[gg4k1[q], {q, 2, 6}]
(*{2/15, 2/315, 2/5005, 4/153153, 5/2909907}*)

Using some more FindSequenceFunction the solution turns out to be:

gg4[q_, k_] = (2 k - 1)!! 2^(2 + 3 k - 4 q) Sqrt[\[Pi]] *
                Product[(q - i)^2, {i, k}] q Gamma[2 (q - k) - 1]/Gamma[1/2 - k + 2 q];

To obtain the expression above, I did the same for further k values:

gg4k2[q_] = FullSimplify[FindSequenceFunction[Table[gg4[q, 2], {q, 3, 12}], q - 2]]
gg4k3[q_] = FullSimplify[FindSequenceFunction[Table[gg4[q, 3], {q, 4, 13}], q - 3]]
...

Comparing the almost similar outputs for k from 1 to 6, you'll see only a few thing changes (some linear translations in the gamma/power argument wrt. k, the product and the constant factor). Only the constant factor wasn't immediately clear (1, 3, 15, 105, 945, 10395). However, using again FindSequenceFunction[{1, 3, 15, 105, 945, 10395}], youll have (2 # - 1)!!

$\endgroup$
4
  • $\begingroup$ I guess using FindSequenceFunction won't guarantee a correct solution outside of the range of inputs, right? $\endgroup$ Commented Apr 1, 2015 at 5:53
  • $\begingroup$ @SjoerdC.deVries The simplified function is actually wrong when k<0. For q<0 it should just be 0, so thats not hard to modify $\endgroup$
    – Coolwater
    Commented Apr 1, 2015 at 6:03
  • $\begingroup$ I mean, gg4k1[q] is defined using q from 2..11. For q larger than that it is not guaranteed to be the same as gg4[q,1], is it? $\endgroup$ Commented Apr 1, 2015 at 6:17
  • $\begingroup$ This looks to be the correct solution. Please elaborate on how you went from gg4k1 to your expression for gg4. Thanks. $\endgroup$
    – bbgodfrey
    Commented Apr 1, 2015 at 12:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.