# Sum convergence

I would expect the following sum to converge:

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

Indeed I get:

Sum[n,{n,-10^7,10^7}]
(*0*)


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?

Edit:

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?

• 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, ∞}]. – J. M. will be back soon Nov 2 '17 at 10:54
• 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. – J. M. will be back soon Nov 2 '17 at 11:17
• 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$$ – J. M. will be back soon Nov 2 '17 at 11:30
• 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. – mgamer Nov 2 '17 at 13:02
• 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. – 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.

• 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? – Yair M Nov 3 '17 at 21:09