2
$\begingroup$

Good morning, I computed the following integral using Integrate in version 12.2 and it gives the wrong result. Can you help me understand what I am doing wrong? Here is the integral:

Integrate[(
 n (1 + n) (1 + 2 n) (3 + 
    2 n) (-HypergeometricPFQ[{1, 1, 1 - 2 n, 4 + 2 n}, {2, 3, 3}, 1] +
     t HypergeometricPFQ[{1, 1, 1 - 2 n, 4 + 2 n}, {2, 3, 3}, t]) Log[
   t])/(-1 + t), {t, 0, 1}, {u, 0, 1}, 
 Assumptions -> n \[Element] Integers && n > 0]

the result is

-(1/6) n (1 + n) (1 + 2 n) (3 + 2 n) \[Pi]^2 HypergeometricPFQ[{1, 1, 
   1 - 2 n, 4 + 2 n}, {2, 3, 3}, 1]

For instance, this result is $-\frac{10 \pi ^2}{3} $ for $n=1$. However if I set $n=1$ inside Integrate or use NIntegrate i get $-17.5$, which is the correct result. Why is there such a difference? Here is the code

NIntegrate[((
   n (1 + n) (1 + 2 n) (3 + 
      2 n) (-HypergeometricPFQ[{1, 1, 1 - 2 n, 4 + 2 n}, {2, 3, 3}, 
        1] + t HypergeometricPFQ[{1, 1, 1 - 2 n, 4 + 2 n}, {2, 3, 3}, 
        t]) Log[t])/(-1 + t)) /. n -> 1, {t, 0, 1}, {u, 0, 1}]

and

Integrate[(
  n (1 + n) (1 + 2 n) (3 + 
     2 n) (-HypergeometricPFQ[{1, 1, 1 - 2 n, 4 + 2 n}, {2, 3, 3}, 
       1] + t HypergeometricPFQ[{1, 1, 1 - 2 n, 4 + 2 n}, {2, 3, 3}, 
       t]) Log[t])/(-1 + t) /. n -> 1, {t, 0, 1}, {u, 0, 1}, 
 Assumptions -> n \[Element] Integers && n > 0]

Thank you for your help.

$\endgroup$
4
  • $\begingroup$ A possible bug. In my version (12.0.0 for Mac OS X x86 (64-bit) (April 7, 2019)), the first integral returns unevaluated, and the second two return -17.5 and -35/2. What version are you using? $\endgroup$
    – march
    Sep 23 '21 at 15:45
  • 1
    $\begingroup$ This returns unevaluated in 12.3.1 on windows 10. May be there was a bug and WRI fixed it? screen shot !Mathematica graphics it is always best to use latest version of software. $\endgroup$
    – Nasser
    Sep 23 '21 at 15:45
  • $\begingroup$ This also returns -35/2 in MM 12.3.1 for Mac OS (ARM). $\endgroup$ Sep 23 '21 at 21:02
  • $\begingroup$ Remains unevaluated for me in "12.2.0 for Mac OS X x86 (64-bit) (December 12, 2020)" as well as in V12.3.1. $\endgroup$
    – Michael E2
    Sep 25 '21 at 13:36
2
$\begingroup$

As n is integer you can try

Table[Integrate[(n (1 + n) (1 + 2 n) (3 + 2 n) 
(-HypergeometricPFQ[{1, 1, 1 - 2 n, 4 + 2 n}, {2, 3, 3}, 1] + 
t HypergeometricPFQ[{1, 1, 1 - 2 n, 4 + 2 n}, {2, 3, 3}, t]) 
Log[t])/(-1 + t), {t, 0, 1}], {n, 1, 10}]

for n up to 10 or higher.

The result -10Pi^2/3 for n=1 is just the integral over the term with the first Hypergeometric.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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