6
$\begingroup$

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

$\endgroup$
9
  • $\begingroup$ Looks like a bug to me. NSum complains of convergence failure. I'd expect logarithmic divergence here, although I can't prove it. $\endgroup$
    – John Doty
    Commented Dec 6, 2019 at 18:59
  • $\begingroup$ @JohnDoty it seems to converge to around 0.313: try Table[Sin[k*(k-1)]/k, {k, 10^7}] // N // Total. Maybe ask at math.stackexchange.com if you need the exact limit. $\endgroup$
    – Roman
    Commented Dec 6, 2019 at 19:20
  • $\begingroup$ 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... $\endgroup$ Commented Dec 6, 2019 at 23:32
  • $\begingroup$ @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 ツ $\endgroup$
    – John Doty
    Commented Dec 6, 2019 at 23:42
  • 1
    $\begingroup$ That is a bug beyond any doubts. The sum seems to converge to $1/\pi$, but that is a separate question. $\endgroup$
    – yarchik
    Commented Dec 7, 2019 at 15:15

1 Answer 1

1
$\begingroup$

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

$\endgroup$
9
  • 3
    $\begingroup$ It's still a bug to yield nonsense. $\endgroup$
    – John Doty
    Commented Dec 6, 2019 at 23:38
  • $\begingroup$ @the down-voter: What is wrong in my answer? TIA. $\endgroup$
    – user64494
    Commented Dec 7, 2019 at 14:01
  • $\begingroup$ I have not down voted, but I cannot understand your answer. How does it answers the question. $\endgroup$
    – yarchik
    Commented Dec 7, 2019 at 15:20
  • $\begingroup$ @ 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. $\endgroup$ Commented Dec 7, 2019 at 15:33
  • 1
    $\begingroup$ @ John Doty thanks, bug report sent by email. Waiting for response from Wolfram. $\endgroup$ Commented Dec 8, 2019 at 8:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.