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?

  • $\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$ Commented Nov 2, 2017 at 10:54
  • 4
    $\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$ Commented Nov 2, 2017 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$ Commented Nov 2, 2017 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
    Commented Nov 2, 2017 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
    Commented Nov 2, 2017 at 14:20

2 Answers 2


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.

  • $\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
    Commented Nov 3, 2017 at 21:09

One cannot, in general add $-\infty$ (the left-half of the sum) and $+\infty$ (the right-half of the sum) and expect a unique answer because $-\infty+\infty=$ indeterminate. The problem as stated is a variant of a conditionally convergent sum. That is, the sum is indeterminate depending on how the addition is performed; in what order the terms are summed. Edit: In general, if $\Sigma_{n=0}^\infty x_n$ converges but $\Sigma_{n=0}^\infty |x_n|$ is divergent, then convergence is conditional and not absolute. Although this is most often applied to alternating sign series, the order of signs is either irrelevant or the series is conditionally convergent. As such, there is no unique answer, see Mathworld commentary.

  • $\begingroup$ For the last sentence, if $x_n=1/n^2$, you're saying $\sum 1/n^2$ does not converge absolutely? $\endgroup$
    – Michael E2
    Commented Jun 18, 2022 at 2:04
  • $\begingroup$ @MichaelE2 Right, will change. $\endgroup$
    – Carl
    Commented Jun 18, 2022 at 3:37

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.