15
$\begingroup$

Bug introduced in 10.0 and fixed in 11.1
(reported as CASE:3790525)


Here's a simple series:

Sum[t^k DiscreteDelta[k]/k!,{k,0,Infinity}]

Mathematica says that it doesn't converge. But replacing Infinity by any positive integer I get 1. The same is for the case when I remove k! or t^k from the expression.

What's going on? Shouldn't k! improve convergence rather than lead to divergence?

Note also that Mathematica can solve this easily:

Sum[f[k] DiscreteDelta[k], {k, 0, Infinity}]
(* f[0] *)
$\endgroup$
3
  • $\begingroup$ Without the Delta this should converge to Exp[t]. $\endgroup$
    – Feyre
    Commented Dec 7, 2016 at 14:54
  • 2
    $\begingroup$ Smells like a bug. I would report it. $\endgroup$
    – Szabolcs
    Commented Dec 7, 2016 at 14:59
  • $\begingroup$ Assuming [{Element[m, Integers]}, Sum[t^k DiscreteDelta[k]/k!, {k, 0, m}]] evaluates to 1 The k! doesn't make a difference since the DiscreteDelta is zero unless its argument is zero. $\endgroup$
    – Bob Hanlon
    Commented Dec 7, 2016 at 15:07

1 Answer 1

14
$\begingroup$

I think that the following might be the underlying problem of this strange behaviour:

SumConvergence[ t^k/k! DiscreteDelta[k], k]
(* Out: False *) 

However, things seem a bit more subtle: the output of SumConvergence for your summand depends quite strongly on the Method specified. In fact, the four available methods mentioned in the documentation give quite different results. Both

SumConvergence[ t^k/k! DiscreteDelta[k], k, Method->"RaabeTest"]
SumConvergence[ t^k/k! DiscreteDelta[k], k, Method->"RatioTest"]

just return the un-evaluated input - so I guess that those methods are indecisive. More interestingly, however,

SumConvergence[ t^k/k! DiscreteDelta[k], k, Method->"IntegralTest"]
SumConvergence[ t^k/k! DiscreteDelta[k], k, Method->"RootTest"]

both yield

(* Out: True *) 

!

I have no idea why, when not specifying any method, the result is False even though, loosely speaking, we get a "mildly positive answer on average" for the four methods listed in the documentation.

(I don't know how to find the list of all possible methods available to SumConvergence; it would be interesting to see if there are only indecisive and positive results, or if there's another specific method that yield False.)

In fact there must be more to it: let's replace t by 2, say. Then the sum is correctly evaluated, and SumConvergence now returns True, even though the output with the Method specified gives just the same results as before.

Another thing we can try is to replace the $k!$ in the numerator by $(k!)!$, for which the sum takes quite long (about 15s on my computer) but does correctly return 1. Here SumConvergence does not evaluate when no method is specified, again gives True for "IntegralTest" and "RootTest", does not evaluate for "RaabeTest", and takes very long for "RatioTest", in the end again returning the un-evaluated input.

Finally, in the documentation of SumConvergence I read

SumConvergence is automatically called by Sum

Let's disable it. Now we nicely get

Sum[ t^k/k! DiscreteDelta[k], {k,0, Infinity}, VerifyConvergence->False]
(* Out: 1 *)

In conclusion, then, I'd be inclined to say that the real bug lies with SumConvergence.


Edit: J.M. noticed that there is (at least) one more method available to SumConvergence, which is not documented: "DivergenceTest". Let's try that one as well:

SumConvergence[ t^k/k! DiscreteDelta[k], k, Method->"DivergenceTest"]
(* Out: True *) 

The output is the same when we replace $t$ by $2$ or $k!$ by $(k!)!$, so that does not give more insight into the results we get.

The answer might be hidden in the output of J.M.'s suggestion in the preceding link, to be evaluated after using SumConvergence:

?? Sum`SumConvergenceDump`SumConvergenceTestMethod
$\endgroup$

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.