Message Boards Message Boards

0
|
2749 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Priority of undocumented DivergenceTest is too high and other issues

Posted 2 years ago

For example,

a[n_] := (1 - Log[n]/n)^(2 n);
SumConvergence[a[n], n, Method -> Automatic] (* False, bug: does not TRY Raabe *)
SumConvergence[a[n], n, Method -> "RaabeTest"] (* True, NICE. It is 2. *)
SumConvergence[a[n], n, Method -> "RatioTest"] (* Error *)
SumConvergence[a[n], n, Method -> "RootTest"] (* Error *)
SumConvergence[a[n], n, Method -> "DivergenceTest"] (* False, a bug! Should be True *)
SumConvergence[a[n], n, Method -> "IntegralTest"] (* Fails, infinite loop bug!! Should be True *)

I dunno what underlying code you use for DivergenceTest (P.S. this is the bug, SumConvergence uses pre V11.2 Limit) but

a[n_] := (1 - Log[n]/n)^(2 n);
Limit[a[n], n -> Infinity]

returns 0. So it passes the necessary condition for the convergence of a series (and that was the bug). Just like in textbook True for DivergenceTest means we know nothing. Source: https://mathematica.stackexchange.com/a/163389/82985

I will also point out that IntegralTest should have worked because

AsymptoticEqual[(1 - Log[n]/n)^(2 n), 1/n^2, n -> Infinity]

returns True. But see further comments on IntegralTest.

RaabeTest does work and you managed to check that all elements starting with some element are positive (since it is one of Kummer's tests' requirements). I do not understand why you do not have a normal continuation of tests of Kummer, i.e. Betrand test at least but extended Betrand too. For example,

b[n_] = (1 - Log[n]/n)^(2 n);

Limit[Log[n] (n (b[n]/b[n + 1] - 1) - 1), n -> Infinity] (* prints Infinity, so convergent *)

Remember every more complex Kummer test will print Infinity for not 1 in previous level test (source: Fichtenholz). >1 is +Infinity, <1 -Infinity. All higher level tests are nicely described here in the last chapter: http://www.dcs.fmph.uniba.sk/bakalarky/obhajene/getfile.php/new.pdf?id=90&fid=228&type=application%2Fpdf

Next, not only RaabeTest has less priority than DivergenceTest but it (checking for positive terms part) fails for other series:

a[n_] := 1 - Cos[Pi/n];
SumConvergence[a[n], n, Method -> Automatic] (* error *)
SumConvergence[a[n], n, Method -> "RaabeTest"] (* error *)
SumConvergence[a[n], n, Method -> "RatioTest"] (* error *)
SumConvergence[a[n], n, Method -> "RootTest"] (* error *)
SumConvergence[a[n], n, Method -> "DivergenceTest"] (* True, so useless *)
SumConvergence[a[n], n, Method -> "IntegralTest"] (* error *)

Raabe by hand again prints 2 while Betrand's prints Infinity. So converges (check for positive term is obvious, done in head).

b[n_] = 1 - Cos[Pi/n];

Limit[Log[n] (n (b[n]/b[n + 1] - 1) - 1), n -> Infinity] (* Infinity *)

Next. There is a further problem in IntegralTest, a strange limitation that was supposed to limit the use of Sin, Cos functions, but somehow first example fails too!! See https://mathematica.stackexchange.com/questions/140056/sumconvergence-difficulty/163329#163329

Indeed

myLCT[e_, k_] := SumConvergence[Normal@Series[e, {k, Infinity, 2}], k];

SumConvergence[(1 - Log[n]/n)^(2 n), n, Method -> myLCT]
(*  True  *)

Wow. Now, WHO knows whether it is a good idea in your code and whether it is even correct, but whatever.

Based on my post here: https://mathematica.stackexchange.com/a/258979/82985

POSTED BY: ZAQU zaqu
2 Replies
Posted 2 years ago

There are 462 views but no comments. Nice.

POSTED BY: ZAQU zaqu
Posted 2 years ago

And the bug is found! SumConvergence uses pre V11.2 Limit that is buggy and makes DivergenceTest buggy and since it has higher priority than RaabeTest, RaabeTest is never used. Haha.

POSTED BY: ZAQU zaqu
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract