6

In this sum over $k$

Sum[Sin[k (k - 1)]/k, {k, 1, ∞}]

the result still containes the summation index $k$.

 (* Out 1/2 I (Log[E^-I (E^I - E^(I k))] - Log[E^(-I k) (-E^I + E^(I k))]) *)

What is happening here?

If the sum were divergent, Mathematica would normally return the input.

Sum[1/k, {k, 1, ∞}]

(* Out[148]= $\sum _{k=1}^{\infty } \frac{1}{k}$ *)

Nevertheless plotting the r.h.s. (designated by $f$) as a function of $k$

Plot[2/π f, {k, -2 π + 1, 1.1 + 6 π}, 
 PlotLabel -> "Result of a 'strange sum'", AxesLabel -> {"k", "f(k)"},
  PlotRange -> {{-2 π + 1, 4 π + 1}, All}]

enter image description here

we see that it is discontinuous and in the range from $-\frac{\pi}{2}$ to $\frac{\pi}{2}$.

This could be an indication the the sum is divergent delivering values in this range. I have not studied the convergence, but confined myself to the Mathematica question.

Cross reference to the convergence question: https://math.stackexchange.com/q/3466339/198592

Dr. Wolfgang Hintze
  • 13,039
  • 17
  • 47
  • Looks like a bug to me. NSum complains of convergence failure. I'd expect logarithmic divergence here, although I can't prove it. – John Doty Dec 06 '19 at 18:59
  • @JohnDoty it seems to converge to around 0.313: try Table[Sin[k*(k-1)]/k, {k, 10^7}] // N // Total. Maybe ask at https://math.stackexchange.com if you need the exact limit. – Roman Dec 06 '19 at 19:20
  • Isn't this one of those cases where it is not known whether the sum converges? i.e., where we would need a good understanding of the convergents of $\pi$ to decide (which we don't have)? I seem to remember a similar sum on overflow... – AccidentalFourierTransform Dec 06 '19 at 23:32
  • @Roman I think you're right. The numerator seems sufficiently oscillatory that its mean converges (slowly) toward zero, and that should be sufficient to get the series to converge. Mathematicians, don't shoot me, I'm just a physicist ツ – John Doty Dec 06 '19 at 23:42
  • @ Doty Even if it doesn't tell us much about the sum at least the corresponding integral converges nicely. – Dr. Wolfgang Hintze Dec 07 '19 at 02:11
  • 1
    That is a bug beyond any doubts. The sum seems to converge to $1/\pi$, but that is a separate question. – yarchik Dec 07 '19 at 15:15
  • @yarchik I'm pretty sure it's less than 1/π. Assuming some randomness properties of π, I estimate the limit to be 0.3128±0.0001. – Roman Dec 07 '19 at 21:47
  • @ yarchik @ Roman I would greatly appreciate if you would present your solutions with respect to convergence as an answer to my question at https://math.stackexchange.com/q/3466339/198592 – Dr. Wolfgang Hintze Dec 07 '19 at 22:23
  • Fixed. In version 13 on Windows 10 Sum[Sin[k (k - 1)]/k, {k, 1, \[Infinity]}] returns the input. – user64494 Jun 08 '22 at 10:23

1 Answers1

1

This is not a serious bug because of

Sum[Sin[k^2 - k]/k, {k, 1, Infinity}]

$$\sum _{k=1}^{\infty } -\frac{\sin \left(k-k^2\right)}{k} $$

I have strong doubts concerning the existence of a closed-form expression for the sum of the series under consideration.

Addition. Following the documentation to Sum and NSum, I obtain a confirmation of the convergence of the series under consideration:

NSum[Sin[k^2 - k]/k,{k,2,Infinity},AccuracyGoal->1,PrecisionGoal->1, WorkingPrecision -> 20]

0.2

user64494
  • 26,149
  • 4
  • 27
  • 56
  • 3
    It's still a bug to yield nonsense. – John Doty Dec 06 '19 at 23:38
  • @the down-voter: What is wrong in my answer? TIA. – user64494 Dec 07 '19 at 14:01
  • I have not down voted, but I cannot understand your answer. How does it answers the question. – yarchik Dec 07 '19 at 15:20
  • @ user64494 +1 I understand your solution as stating that the sum is returned unevaluated, and I consider this a valuable contribution. Mathematic obviously could not find out if the sum is convergent or not, and did the right thing. BTW I have observed in several occasions that Mathematica "appreciates" cooperation from the user when it comes to rearranging expressions. – Dr. Wolfgang Hintze Dec 07 '19 at 15:33
  • @yarchik: See the Dr. Wolfgang Hintze's comment. All that is described in the documentation to the Sum command. – user64494 Dec 07 '19 at 17:40
  • @Dr. Wolfgang Hintze: the original question was about a sum that yielded a nonsense expression. That's a bug. That Mathematica does a proper thing for an equivalent problem is not an excuse. – John Doty Dec 07 '19 at 17:43
  • @ John Doty I am very cautious with bugs, but I could file a bug report - if I only knew how to do it. May somebody help me please? – Dr. Wolfgang Hintze Dec 07 '19 at 22:26
  • @Dr. Wolfgang Hintze: https://mathematica.stackexchange.com/questions/106227/how-to-report-a-bug-in-mathematica – John Doty Dec 08 '19 at 00:58
  • 1
    @ John Doty thanks, bug report sent by email. Waiting for response from Wolfram. – Dr. Wolfgang Hintze Dec 08 '19 at 08:56