9
$\begingroup$

Bug persisting through 10.4.1


I claim that the series $\sum_{n=2}^{\infty}\frac{(-1)^n}{\sqrt{n}+(-1)^n}$ diverges. To see this, rewrite the $n^{th}$ term as follows: \begin{equation*} \frac{(-1)^n}{\sqrt{n}+(-1)^n} = \frac{(-1)^n}{\sqrt{n}+(-1)^n} \times \frac{\sqrt{n}+(-1)^{n+1}}{\sqrt{n}+(-1)^{n+1}} \end{equation*} \begin{equation*} = \frac{(-1)^n\sqrt{n}+(-1)^{2n+1}}{n+(-1)^{2n+1}} = \frac{(-1)^n\sqrt{n}}{n-1} + \frac{-1}{n-1} \end{equation*} Thus, \begin{equation*} \sum_{n=2}^{\infty}\frac{(-1)^n}{\sqrt{n}+(-1)^n} = \sum_{n=2}^{\infty}\frac{(-1)^n\sqrt{n}}{n-1} - \sum_{n=1}^{\infty}\frac{1}{n} \end{equation*} Now, we have the difference of two series. The first series, by the Alternating Series Test, is convergent, and the second is the well known divergent harmonic series.

However,

    SumConvergence[((-1)^n)/(Sqrt[n] + (-1)^n), n]

returns True, and

    N[Sum[((-1)^n)/(Sqrt[n] + (-1)^n), {n, 2, Infinity}]]

returns -2.70244.

To add some evidence for the divergence of the series, the code

    pow10 = 10;
    expo = 1;
    While[ expo <= 6,
      Print [N[Sum[((-1)^n)/(Sqrt[n] + (-1)^n), {n, 2, pow10}]]];
      expo++;
      pow10 *= 10;
    ]

returns

    -1.74377
    -4.21214
    -6.55378
    -8.86764
    -11.1737
    -13.4774

I see in another post that there was an issue with SumConvergence in version 10.0.0.0, but I am using Version 10.2. Any insights here?

$\endgroup$
  • 1
    $\begingroup$ I believe you are right. I note that NSum using the AlternatingSigns method yields a slightly different result as the one above for Sum: NSum[((-1)^n)/(Sqrt[n] + (-1)^n), {n, 2, Infinity}, Method -> "AlternatingSigns"] ==> -2.67892. Sum with a finite limit yields the same set of results as your loop does. $\endgroup$ – Sjoerd C. de Vries Mar 17 '16 at 20:20
  • 1
    $\begingroup$ But if a sum is conditionally convergent (which if that sum converges, it will be conditionally convergent), if you rearrange the sum, you can get a different value for the limit (and you can rearrange it to get infinity), so rearranging it and getting infinity is not evidence for that sum not converging. $\endgroup$ – march Mar 17 '16 at 20:39
  • $\begingroup$ In fact, maybe I'm thinking about this wrong, but doesn't this sum also converge by the Alternating Series Test? Maybe it's the decreasing monotonically part that's missing... $\endgroup$ – march Mar 18 '16 at 6:49
  • 1
    $\begingroup$ @march It is missing that. Without rearranging, but just grouping the elements of the series pairwise we find a[2n]+a[2n+1] to be negative for all natural n, the partial sums very quickly get below -2.67892, and the positive element of the pair of two neighboring elements is never sufficient to bring it even close to the supposed limit. $\endgroup$ – LLlAMnYP Mar 18 '16 at 9:16
  • $\begingroup$ By the way, OP did not rearrange the sum either. He did put it in a more convenient form. I'm not sure if splitting a series Sum[a[n] + b[n]] into Sum[a[n]] and Sum[b[n]] qualifies as rearrangement. $\endgroup$ – LLlAMnYP Mar 18 '16 at 9:18
2
$\begingroup$

another way to rewrite the series:

Sum[((-1)^n)/(Sqrt[n] + (-1)^n), {n, 2, 1001}] ==
 Sum[1/(Sqrt[2 n] + 1) - 1/(Sqrt[2 n + 1] - 1), {n, 1, 500}]

True

SumConvergence[((-1)^n)/(Sqrt[n] + (-1)^n), n]

True

SumConvergence[1/(Sqrt[2 n] + 1) - 1/(Sqrt[2 n + 1] - 1), n]

False

( v 10.1 )

This is not rearranging terms, but grouping in pairs, the series are the same:

enter image description here

$\endgroup$
  • $\begingroup$ So, I assume you conclude that we see a bug here? $\endgroup$ – Sjoerd C. de Vries Mar 17 '16 at 20:56
  • 1
    $\begingroup$ Rearranging terms is a big no-no for infinite sums though. Like @march said, the series might be conditionally convergent, although the OP is rather convincing. $\endgroup$ – LLlAMnYP Mar 17 '16 at 21:04
  • $\begingroup$ beyond my expertise to prove or disprove (at least in a few minutes). I concur the OP's argument looks convincing. $\endgroup$ – george2079 Mar 17 '16 at 21:20
  • 1
    $\begingroup$ @Sjoerd C. de Vries I would conclude that there is a bug here. By the way, this is a problem from Tom Apostol's excellent, but nowadays out of favor (due to it's rigor) "Calculus, 2e". The answer for the problem is "divergent." $\endgroup$ – clburchard Mar 18 '16 at 13:17
  • $\begingroup$ @clburchard When there is agreement about this we can add the "bugs" tag to your question. Done now. $\endgroup$ – Sjoerd C. de Vries Mar 18 '16 at 13:20

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.