5
$\begingroup$

I've been trying to use the SumConvergence on the following series:

SumConvergence[1/(n Log[n] Log[n Log[n]]), n]

This returns False on Mathematica 11.3, but I suspect this is incorrect since:

$$\frac{1}{n \log(n) \log(n \log(n))} < \frac{1}{n \log(n) \log(n)} $$

attempting to check the convergence of the RHS

SumConvergence[1/(n Log[n] Log[n]), n]

returns True. So by direct comparison, the initial series should converge. I've also plotted the two functions to further justify the argument.

A comparison between the two series.

What can I do to help SumConvergence recognize that the initial series converges?

$\endgroup$
  • $\begingroup$ Mathematica seems to like the comparison tests less than calc. students: Reduce[n > 1 && 1/(n Log[n] Log[n Log[n]]) < 1/(n Log[n] Log[Log[n]]), n, Integers] and Limit[(n Log[n]^y)/(n Log[n] Log[n Log[n]]), n -> Infinity, Assumptions -> 1 < y < 1 + 1/10^6] show convergence, but I don't know how to teach SumConvergence the comparison methods. $\endgroup$ – Michael E2 Jul 30 at 14:15
3
$\begingroup$

The culprit is Sum`SumConvergenceDump`UnivariateLogarithm[], which mistakenly decides the sum is not convergent. It should be reported as a bug. (It would be acceptable if it couldn't decide, but to reach the wrong conclusion is wrong.)

Here's a modest implementation of the limit comparison test within the log-testing code. It uses the Villegas-Gayley trick to insert the code ahead of the built-in UnivariateLogarithm[] codes. We need to manually insert it as the first code in the DownValues, so that it is called before other definitions of UnivariateLogarithm[]. Since UnivariateLogarithm[] is buggy, it's a question whether I should call it (or SumConvergence[], which in turn would call it) after the comparison test to check convergence of the transformed series. I probably shouldn't unless I can prove I've avoided the bug, but just how much work should I do rooting around undocumented functions for free? Better to let WRI decide how to fix their software.

Internal`InheritedBlock[{Sum`SumConvergenceDump`UnivariateLogarithm},

 DownValues[Sum`SumConvergenceDump`UnivariateLogarithm] = Prepend[
   DownValues[Sum`SumConvergenceDump`UnivariateLogarithm],
   (* new def. for UnivariateLogarithm[] *)
   HoldPattern[
     Sum`SumConvergenceDump`UnivariateLogarithm[expr_, k_] /;
       ! TrueQ[$inLimitComparisionTestQ] && ! FreeQ[expr, _Log]
     ] :> Block[{$inLimitComparisionTestQ = True},
     Module[{factors, comparisons, log, nlogs, res},
      factors = Rest@FactorList[expr];
      nlogs = Max[Count[#, _Log, Infinity, Heads -> True] & /@ 
         factors[[All, 1]]];
      factors = Power @@@ factors;
      log = k; (* log is the iterated composition of Log[] 
                  with k up to nlogs number of times *)
      While[Depth[log] <= nlogs + 1 && ! TrueQ@res,
       comparisons = Abs@Limit[log*factors, n -> Infinity];
       res = Sum`SumConvergenceDump`UnivariateLogarithm[
         Times @@ ReplacePart[
           factors,
           Position[comparisons, L_ /; 0 < L < Infinity] -> 1/log],
         k];
       log = Log@log
       ];
      res /; TrueQ@res
      ]
     ]
   ];

 SumConvergence[1/(n Log[n] Log[n Log[n]]), n]
 ]

(*  True  *)
$\endgroup$
  • $\begingroup$ It would be useful if Method->"IntegralTest" uses the numeric integration in some cases. $\endgroup$ – user64494 Jul 30 at 16:25
  • 1
    $\begingroup$ @user64494 One can use NSum[1/(n Log[n] Log[n Log[n]]), {n, 2, Infinity}], if one wants an approximate verification of convergence via NIntegrate. One can try to substitute NIntegrate for Integrate for SumConvergence, but I think it will almost always return True since NIntegrate almost always returns a numeric result: Block[{Integrate = NIntegrate}, SumConvergence[1/n, n, Method -> "IntegralTest"]]. $\endgroup$ – Michael E2 Jul 30 at 18:05
  • $\begingroup$ Many thanks from me to you for your comprehensive analysis of my suggestion. There is a room to improve NIntegrate for divergent improper integrals. $\endgroup$ – user64494 Jul 30 at 18:34
  • 1
    $\begingroup$ Compare NIntegrate[1/x, {x, 1, Infinity}] which results 191612. with the command of Maple int(1/x, x = 1 .. infinity, numeric) which performs Float(infinity). $\endgroup$ – user64494 Jul 30 at 18:56
1
$\begingroup$

This can be done in two steps.

  1. ForAll[n, n >= 2, D[1/(n Log[n] Log[n Log[n]]), n] <= 0];Resolve[%, Reals] *True*

  2. NIntegrate[1/(n Log[n] Log[n Log[n]]), {n, 2, Infinity}] *1.42474*

$\endgroup$

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.