I would expect the following sum to converge:

$$ \sum_{n=-\infty}^\infty n=0 $$

Indeed I get:


But running Sum[n, {n, -\[Infinity], \[Infinity]}] I get a warning that it does not converge. Thus my questions are:

  • Mathematically speaking, is MMA correct? Am I mistaken to expect convergence. Clearly this is a delicate sum as breaking it into two sums for positive an negative values of n would indeed make a difference.
  • Asumming that I'm correct to expect convergence, can I make MMA comply?


Following the debate in comments, I asked the question also on Math S.E. to answer the mathematical point of my question. See link here.

Perhaps rephrasing my question the correct question to ask here would be:

Can I force MMA to calculate convergence in the Cauchy P.V. sense for discrete sums similar to the option in Integrate?

| improve this question | | | | |
  • $\begingroup$ After adding an extra x^k factor, you can split: Sum[k x^k, {k, -∞, -1}] + Sum[k x^k, {k, 0, ∞}] or unsymmetrize: Sum[k x^k + (-k x^-k), {k, 0, ∞}]. $\endgroup$ – J. M.'s technical difficulties Nov 2 '17 at 10:54
  • 3
    $\begingroup$ That's a math question, not a Mathematica question. It's akin to the question of what $\int_{-\infty}^\infty x\,\mathrm dx$ is, where you can interpret it in the Cauchy principal-value sense to get a finite result. $\endgroup$ – J. M.'s technical difficulties Nov 2 '17 at 11:17
  • 1
    $\begingroup$ Consider the following grouping of the summands: $$0 + 1 + 2 + (3 - 2 - 1) + 4 + 5 + 6 + (7 - 3 - 4) +8+9+10+(11-5-6)+\cdots$$ $\endgroup$ – J. M.'s technical difficulties Nov 2 '17 at 11:30
  • 3
    $\begingroup$ For such sequences that are (clearly) not absolutely convergent the "value" of the series depends on ordering. E.g. you can get every arbitrary value when reordering the alternating harmonic sequence. $\endgroup$ – mgamer Nov 2 '17 at 13:02
  • 1
    $\begingroup$ I see a mathematics question (or ambiguity) re: whether that notation denotes lim n->Inf, Sum[..{-n,n}] or should we expect convergence as the limits are approached independently. $\endgroup$ – george2079 Nov 2 '17 at 14:20

Because what you are really asking is

 Limit[Sum[n, {n, -mm, mm}], mm -> Infinity]
 (* 0 *)

That is probably how you should code it in your work. Even something like

 Limit[Sum[n, {n, -mm, mm+1}], mm -> Infinity]
 (* ∞ *)

Has an upper and lower bound for the summation limits of infinity, but now (properly) gives you a result of Infinity.

| improve this answer | | | | |
  • $\begingroup$ I wonder however if this could generalized in a robust manner to a more general case with a note complex expression within the sum. Will the runtime be reasonable? $\endgroup$ – Yair M Nov 3 '17 at 21:09

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.