The problem is that the Sin
in the term triggers a heuristic check that prevents the integral test from being performed. The assumption is that if the function contains Sin
, then it is not monotonic, I suppose.
I don't know a good way around it, especially since I know you're usually interested in natural-looking methods that your students can understand without a bunch of complicated explanations. Here's a proof of concept workaround, I suppose:
term /: Integrate[term[n_], args___] := (foo = Stack[]; Integrate[Sin[50/n^2], args]);
term[n_Integer] := Sin[50/n^2];
SumConvergence[term[n], n, Method -> "IntegralTest"]
(* True *)
foo
(*
{SumConvergence, Block, CompoundExpression, CompoundExpression, Set,
Sum`SumConvergenceDump`iSumConvergence, Block, CompoundExpression,
Set, Quiet, Sum`SumConvergenceDump`SumConvergenceTestMethod, Block,
CompoundExpression, Set, Catch, CompoundExpression,
CompoundExpression, Set, Sum`SumConvergenceDump`SumIntegralTest,
Block, CompoundExpression, Set, Quiet, Check, CompoundExpression, Set}
*)
The foo = Stack[]
may be omitted. It was only to prove SumConvergence
made the journey to the integral test of term
.
Update: Less hacky -- user-defined test.
myIntegralTest[e_, k_] := (* one could also check the hypotheses *)
FreeQ[Quiet@Integrate[e, {k, 10^10, Infinity}], Integrate];
SumConvergence[Sin[50/n^2], n, Method -> myIntegralTest]
(* True *)
SumConvergence[1/n, n, Method -> myIntegralTest]
(* False *)
Alternatively (again, inadequate checking of hypotheses):
myLCT[e_, k_] := SumConvergence[Normal@Series[e, {k, Infinity, 2}], k];
SumConvergence[Sin[50/n^2], n, Method -> myLCT]
(* True *)
It's odd that there's a hook for user-defined methods in Sum
and SumConvergence
, but they're not documented.
Another hack, with term
as above:
Internal`InheritedBlock[{Sum`SumConvergenceDump`SumIntegralTest},
Sum`SumConvergenceDump`SumIntegralTest[Sin[50/n^2], args___] :=
Sum`SumConvergenceDump`SumIntegralTest[term[n], args];
SumConvergence[Sin[50/n^2], n]
]
(* True *)