I am trying to determine the series

$\qquad \sum_{k=0}^\infty {\rm myCsc}(x,\,\epsilon)\,{\sin(k\,m_C + a_C+\frac\pi 4)}$


$\qquad myCsc(x,\epsilon))= \begin{cases}i\,\epsilon & 0 \leq x\mod\pi<\epsilon \vee \pi-\epsilon<x\mod\pi\leq\pi \\ \csc(x) & otherwise\end{cases}$


$\qquad x=\sin(k\,m_M + a_M + \frac\pi 4)$.

The Mathematica code is

ClearAll[mM, aM, mC, aC, k, eps];

x[k_] := k*mM + aM + Pi/4;
myCsc[k_] := 
  If[(0 <= Mod[x[k], Pi] < eps) || (Pi - eps < 
      Mod[x[k], Pi] <= Pi), I*eps, Csc[x[k]]];
myProduct[k_] := myCsc[k]* Sin[k*mC + aC + Pi/4];

Assuming[0 <= eps < Pi/2 && mM > 0 && aM > 0 && mC > 0 && 
  aC > 0, Sum[myProduct[k], {k, 0, Infinity}, 
  Regularization -> "Cesaro"]]

The code above yields the result


When I remove both $\frac{\pi}{4}$ from myCsc and the sinus, I get as result the last line of the code

Sum[If[0 <= Mod[aM + k mM, Pi] < eps || Pi - eps <
  Mod[aM + k mM, Pi] <= Pi, I eps, Csc[x[k]]] Sin[aC + k mC], 
  {k, 0,Infinity}, Regularization -> "Cesaro"]  

My question

Why does the result depend on the (mathematically) redundant summand $\frac{\pi}{4}$?

My concern

Since the parameters $a_M$ and $a_C$ can be chosen arbitrarily, they may well contain the "additional" summand $\frac{\pi}{4}$ and the summation result should be the same.

  • I am not sure of what it means when Mathematica simply rewrites the sum (the last line of the code above) into its output. It might be that the sum diverges, that Cesaro is not the correct regularization or simply that Mathematica does not find the result_.
  • In either case however the result with and without the summands $\frac{\pi}{4}$, should be the same._

Background information:

The overal sum is part of a thermal conductance along an array of cyclinders. I am trying to take the sum over a cosecant and am therefore defining that rather misbehaving myCsc function to avoid the singularities by splitting the cosecant into the two cases.

In the hope to be able to take the limit with $\epsilon\rightarrow$ 0 after the summation, the result eventually being zero is indeed promising. Although this being a bit cowboy mathematics, my question is about the Mathematica result being different with and without the summand $\frac{\pi}{4}$.

Add-on after 9 days after post (for the V12 to V11 difference):

I found a post on a different forum indicating a difference in syntax for Assuming between V11 and V12.

Since I do not have V12 on my machine I cannot verify if replacing the V11 code

Assuming[0 <= eps < Pi/2 && mM > 0 && aM > 0 && mC > 0 && aC > 
0,Sum[myProduct[k], {k, 0, Infinity}, Regularization -> "Cesaro"]]

into V12 by a different "Assume" statement

Sum[myProduct[k], {k, 0, Infinity}, Regularization -> "Cesaro",  
Assumptions->{0 <= eps < Pi/2, mM > 0, aM > 0, mC > 0, aC > 0}]]

to check if the latter yields the zero result with the summand $\frac{\pi}{4}$ or if the input is returned.
The difference between V11 and V12 might be simply that. If someone could verify on V12, it’d help me a lot.

  • 1
    $\begingroup$ Cannot reproduce it in version 12.0: the input is returned. $\endgroup$
    – user64494
    May 1, 2019 at 18:14
  • $\begingroup$ I am using version, home edition. Just tried again by creating a new .nb and copy pasting the code from this page. I am getting again Out[0]=0. $\endgroup$
    – araldh
    May 1, 2019 at 18:26
  • $\begingroup$ I did that. I repeat Sum[If[0 <= Mod[aM + k mM + [Pi]/4, [Pi]] < eps || -eps + [Pi] < Mod[aM + k mM + [Pi]/4, [Pi]] <= [Pi], I eps, Csc[x[k]]] Sin[ aC + k mC + [Pi]/4], {k, 0, [Infinity]}, Regularization -> "Cesaro"] is returned. $\endgroup$
    – user64494
    May 1, 2019 at 18:32
  • $\begingroup$ Does this mean that my version gives a false result? $\endgroup$
    – araldh
    May 1, 2019 at 18:37
  • $\begingroup$ I dislike Csc[x[k]] in the output obtained by me. Check your syntax. $\endgroup$
    – user64494
    May 1, 2019 at 19:54

1 Answer 1


Here is the answer from Wolfram support I received today:

When Mathematica returns the input as the output, it means that the calculation returned unevaluated. This often means that the function does not have the methods available to solve the problem symbolically, or it is mathematically impossible to obtain a symbolic solution (not all sums, integrals, or differential equations have symbolic solutions after all).
It appears that in earlier versions Mathematica was incorrectly returning 0.
The developers have since corrected that incorrect result. Now it more appropriately returns unevaluated since it is not able to find a symbolic solution for that sum.

The question is answered. The result being zero on Mathematica version 11 was false.
Thanks to user 64494 - your answer put me on the right track (asking Wolfram).


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.