# 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, ∞}]. Nov 2, 2017 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. Nov 2, 2017 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$$ Nov 2, 2017 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. Nov 2, 2017 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. Nov 2, 2017 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? 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.

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