Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
|
|
SumConvergence still imperfect
Posted:
Jan 22, 2012 7:19 AM
|
|
The function SumConvergence in Mathematica 8 performs much better than in 7 (where it first appeared) but it is still not perfect. Consider this example:
SumConvergence[(-1)^((1/2)*n*(n + 1))/Log[n], n]
False
Well, the sum is actually convergent by the Dirichlet test (the sequence 1/Log[n] is monotonic with limit 0 and the sequence {1,1,-1,-1,1,1,...} has bounded partial sums.
Wolfram Alpha also gives the wrong answer.
However, in the next case, where exactly the same argument can be used, SumConvergence gets it right:
SumConvergence[(-1)^(1/2 n (n + 1))/n, n]
True
However Wolfram Alpha still can't do this. Asked to evaluate
Sum[(-1)^(n (n + 1)/2)/n, {n, 1, Infinity}]
it first given an inconclusive answer (claiming to have run out of time). Given more time it returns an approximate answer, which is the same as the one given by NSum
NSum[(-1)^(n (n + 1)/2)/n, {n, 1, Infinity}]
During evaluation of In[105]:= NSum::emcon: Euler-Maclaurin sum failed to converge to requested error tolerance. >>
-1.10245 - 0.268775 I
which is obviously wrong. Unfortunately Wolfram Alpha does not issue the warning that the answer is essentially meaningless so some poor soul might really believe that the limit of a series of real numbers could be imaginary.
One can get a much better approximate answer using Sum with a large number of terms, e.g.
N[Sum[(-1)^(n (n + 1)/2)/n, {n, 1, 10^5}], 5]
-1.1320
Andrzej Kozlowski
|
|
|
|