1
$\begingroup$

The Mathematica code

ComplexExpand[Sum[(Integrate[1/Gamma[s]*x^(s - 1)*Exp[-x]/(1 + Exp[-2  x]) /. 
   s -> 4  n + 1, {x, 0, Infinity}]) - 
Integrate[
 1/Gamma[s]*x^(s - 1)*Exp[-x]/(1 + Exp[-2  x]) /. 
  s -> 4  n + 3, {x, 0, Infinity}], {n, 0, Infinity}] //FullSimplify]

outputs (\[Pi] Cosh[\[Pi]/2])/(2 (1 + Cosh[\[Pi]])) in 14.0 on Windows 10. Its numeric value equals 0.31301. This is not in accordance with the value of the fifth partial sum

Sum[(Integrate[1/Gamma[s]*x^(s-1)*Exp[-x]/(1+Exp[-2  x])/. s->4  n+1,{x,0,Infinity}])-
Integrate[1/Gamma[s]*x^(s-1)*Exp[-x]/(1+Exp[-2  x])/. s->4  n+3,{x,0,Infinity}],{n,0,5}]//N

-0.18699

It should be noticed that the series under consideration converges very quickly. The result by hand can be found here.

$\endgroup$
3
  • $\begingroup$ Note that a much simpler way to get the same (wrong) result is to use Sum[(-1)^n DirichletBeta[2 n + 1], {n, 0, ∞}]. $\endgroup$
    – Domen
    Feb 9 at 17:49
  • $\begingroup$ It looks like something weird is going on for n = 1. For example: Sum[DirichletBeta[n], {n, 0, ∞}] stays unevaluated, while FullSimplify@Sum[DirichletBeta[n], {n, 1, ∞}] gives -(Log[2]/2) even though $\beta(x)$ is strictly increasing function. And if you want to do a simple finite sum: NSum[DirichletBeta[n], {n, 0, 2}], it complains ... $\endgroup$
    – Domen
    Feb 9 at 18:46
  • $\begingroup$ @Domen: I treat DirichletBeta as a label only. $\endgroup$
    – user64494
    Feb 9 at 18:55

1 Answer 1

1
$\begingroup$

Numerically I also get the negative result.

nIntegrate[ff_, aa_, nn_?NumberQ] := 
 NIntegrate[ff /. n -> nn, aa]

NSum[(nIntegrate[
    1/Gamma[s]*x^(s - 1)*Exp[-x]/(1 + Exp[-2   x]) /. 
     s -> 4   n + 1, {x, 0, 200}, n] - 
   nIntegrate[
    1/Gamma[s]*x^(s - 1)*Exp[-x]/(1 + Exp[-2   x]) /. 
     s -> 4   n + 3, {x, 0, 200}, n]), {n, 0, 20}]

(* Out[7]= -0.18699 *)

Switching the Sum and Integrate order gives the result that is 1/2 larger.

ss = 
 Sum[(1/Gamma[s]*x^(s - 1)*Exp[-x]/(1 + Exp[-2   x]) /. 
     s -> 4   n + 1) - (1/Gamma[s]*x^(s - 1)*
      Exp[-x]/(1 + Exp[-2   x]) /. s -> 4   n + 3), {n, 0, Infinity}]

(* Out[8]= (E^x Cos[x])/(1 + E^(2 x)) *)

ii = Integrate[ss, {x, 0, Infinity}]

(* Out[14]= 1/4 \[Pi] Sech[\[Pi]/2] *)

N[ii]

(* Out[15]= 0.31301 *)

This appears to be incorrect however, since it disagrees with a numeric approximation.

nSum[ff_, aa_, xx_?NumberQ] := NSum[ff /. x -> xx, aa]

NIntegrate[
 nSum[(1/Gamma[s]*x^(s - 1)*Exp[-x]/(1 + Exp[-2   x]) /. 
     s -> 4   n + 1) - (1/Gamma[s]*x^(s - 1)*
      Exp[-x]/(1 + Exp[-2   x]) /. s -> 4   n + 3), {n, 0, 20}, 
  x], {x, 0, 1000}]

(* Out[20]= -0.18699 *)
$\endgroup$
1
  • 3
    $\begingroup$ I realize this does not answer the question. My point was to show how the wrong answer could arise and to verify numerically that it's wrong and the claimed result is correct. $\endgroup$ Feb 9 at 17:52

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.