5
$\begingroup$

I am trying to confirm that the series $$\sum_{n=1}^{\infty}\frac{\cos^2(n)}{\sqrt{n}}$$ diverges.

However, when I try to use SumConvergence or Sum I get an unevaluated expression. Why so?

I tried

 SumConvergence[Cos[n]^2/Sqrt[n], n]
 SumConvergence[(1 + Cos[2*n])/(2*Sqrt[n]), n] 
 Sum[ Cos[n]^2/Sqrt[n], {n, 1, Infinity}]
 Sum[(1 + Cos[n])/(2 Sqrt[n]), {n, 1, Infinity}]

However, it does not have any problems with just: $$\sum_{n=1}^{\infty}\frac{\cos(n)}{\sqrt{n}}$$ which correctly states that it converges.

Also, is there a way to make Mathematica display the test that was successful? And if the Ratio Test is used, is there a way to display the sequence that was chosen to compare it to?

I should add that I am using Mathematica 11.2.0 on Windows 10 x64

$\endgroup$
  • 1
    $\begingroup$ While it is expected that MA should work in these simple examples, I would like to point out that even for very simple series it is not trivial or even impossible to verify the convergence. See this extended discussion mathoverflow.net/questions/65858/… and on two very interesting solutions for $\sum\frac{|\sin(n)|}{n}$, mathoverflow.net/questions/282259/… and math.stackexchange.com/questions/823816/… $\endgroup$ – yarchik Feb 4 '18 at 11:04
  • $\begingroup$ Why do you want to confirm? The harmonic series diverges and so does this one. Or is it just sporting Mathematica ;-) $\endgroup$ – mgamer Feb 4 '18 at 11:41
  • $\begingroup$ @yarchik thanks for the links. I will take a look! $\endgroup$ – DMH16 Feb 4 '18 at 20:32
3
$\begingroup$
FullSimplify[ForAll[x, x \[Element] Reals, Cos[x]^2 + Cos[x + 1]^2 > 1/4]]
FullSimplify[Cos[x]^2/Sqrt[x] >= Cos[x]^2/Sqrt[x + 1], x >= 1]

Taking these two facts and assuming $x\geq1$, then we can also say that: $\frac{cos(x)^2+cos(x+1)^2}{\sqrt{x+1}}\geq\frac{1/4}{\sqrt{x+1}}$.

Thus, every two terms of the Sum must be greater than or equal to $\frac{1/4}{\sqrt{x+1}}$, which obviously diverges. That said, this is more of an outline than a formal proof, so please double check it.

It does not seem as though any particular combination of options will make Mathematica directly yield this result. Even if there were, Mathematica is only rarely capable of explaining the reasons for its results, and it does not appear that there is any mechanism for extracting such information from SumConvergence.

$\endgroup$
  • 1
    $\begingroup$ What is interesting is that Mathematica can determine the convergence of $$\sum\frac1{2\sqrt{n}}$$ and the divergence of $$\sum\frac{\cos(2n)}{\sqrt{n}}$$ but cannot determine the divergence of $$\sum\frac{1+\cos(2n)}{\sqrt{n}}$$ which is just a simple step... $\endgroup$ – DMH16 Feb 4 '18 at 9:22
  • $\begingroup$ It's worth noting that it's probably possible to represent the sum of the Cos to an odd power as a sort of alternating series, so it doesn't surprise me that it can handle it directly. Sum[1/n] is a pretty classic result at this point, so I'm also not surprised it can handle it. I am somewhat surprised that it doesn't the form in your question at all though. Also, the first sum there diverges as well. $\endgroup$ – eyorble Feb 4 '18 at 9:26
  • $\begingroup$ It seems M does not have a robust implementation of the comparison test. E.g. SumConvergence fails on Cos[n]^2/(n^5 Sqrt[n]) but not on Cos[n]^2/n^5. $\endgroup$ – Michael E2 Feb 4 '18 at 14:04
  • $\begingroup$ @DMH16 One cannot conclude that if a sum can be decomposed into divergent plus an unknown sum, then the original sum is divergent. Further reasoning is needed, so it's not a simple step, though in the case of (2 + Cos[n])/n, it is a first-year calc. step, which SumConvergence fails to take. $\endgroup$ – Michael E2 Feb 4 '18 at 14:10
  • 1
    $\begingroup$ @DMH16 Ok that's a simple step, but my M (V11.2) says it doesn't know the conv/div of Cos[2n]/Sqrt[n]. (I'm ignoring what is known mathematically and just considering what M says it knows. Since Cos[2n]/Sqrt[n] is unknown to M, it's not an simple step. It was unclear to me what you meant about its divergence in your first comment, since M fails for me.) $\endgroup$ – Michael E2 Feb 4 '18 at 20:52
2
$\begingroup$

This is an extended comment rather than an answer.

Since the sums only evaluate using Regularization and "Regularization affects only results for divergent sums and products", the implication is that the sums diverge.

Sum[Cos[n]^2/Sqrt[n], {n, 1, Infinity}]

enter image description here

sum1 = Sum[Cos[n]^2/Sqrt[n], {n, 1, Infinity},
  Regularization -> "Dirichlet"]

enter image description here

sum1 // N // Chop

(* -0.990145 *)

Sum[(1 + Cos[n])/(2 Sqrt[n]), {n, 1, Infinity}]

enter image description here

sum2 = Sum[(1 + Cos[n])/(2 Sqrt[n]), {n, 1, Infinity},
  Regularization -> "Dirichlet"]

enter image description here

sum2 // N // Chop

(* -0.827232 *)
$\endgroup$
  • $\begingroup$ My take on the implication is that when you get results for the sum from the two methods and they are different, then the sum is divergent (or there is a bug). But in each case, in sum1 and sum2, one of the default-method sum does not evaluate to a result. It seems impossible to decide whether the unevaluated sum is equal to the the one that yielded a result. $\endgroup$ – Michael E2 Feb 4 '18 at 18:16
  • $\begingroup$ @MichaelE2 - if in fact the sums are divergent then they are NOT equal. The regularized sum is then the regularization of a divergent sum. $\endgroup$ – Bob Hanlon Feb 4 '18 at 18:31
  • $\begingroup$ Yes, but my point is about the case in which the normal sum does not evaluate (with no divergence message) and the regularized sum yields a result. Then there are two possibilities. (1) The sum is convergent but the value of the sum cannot be computed by Sum; however, its true value is equal to the result of regularization, and we can't tell that. (2) The sum is divergent and its divergence cannot be computed by Sum. A non-result like Sum[Cos[n]^2/Sqrt[n], {n, 1, Infinity}] is no evidence. One cannot conclude the sum is divergent based on it. $\endgroup$ – Michael E2 Feb 4 '18 at 19:01
  • $\begingroup$ @Michael E2: If the series with nonnegative terms were convergent, then its sum (=regularized sum)) is nonnegative. However, the values are -0.990145 and -0.827232. $\endgroup$ – user64494 Feb 4 '18 at 20:35
  • $\begingroup$ @user64494 Yes, of course. I noticed that even before Bob posted. That does not appear to be Bob's argument, though. $\endgroup$ – Michael E2 Feb 5 '18 at 0:53

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.