# How to calculate this summation

η = 0.05211184484645051;
Sum[η/(r + 1) + ArcTan[η/(r + 1)]


$$r$$ start from $$0$$.

How to calculate this summation until it becomes less than 10^-5?

• Do you mean η/(r + 1) + ArcTan[η/(r + 1) less than 10^-5? Commented Dec 28, 2020 at 17:39
• "... until it becomes ..." Which "it". There are three plausible "it"s here: the partial sum, the summand, and the difference between the partial sum and the sum to $r = \infty$. (Of course, one has to interpolate that you mean the sum from $r = 0$ to $r = \infty$, since you do not explicitly say so.) Commented Dec 29, 2020 at 7:07

First determine for what value of $$r$$ the argument is less than $$10^{-5}$$:

η = 0.05211184484645051;
sol = Solve[{η/(r + 1) + ArcTan[η/(r + 1)] == 1*^-5, r > 0}, r]

(* Out: {{r -> 10421.4}} *)


Then use that value as the upper limit in your summation:

Sum[η/(r + 1) + ArcTan[η/(r + 1)], {r, 0, Ceiling[r /. First@sol]}]

(* Out: 1.02436 *)

• 10*^-5 not 1^-5 as you write Commented Dec 28, 2020 at 19:37
• even that the answer is 1.02436 not less than 0.00001 Commented Dec 28, 2020 at 19:38
• @Mfafa The expression a*^b indicates a * 10^b, so $10^{-5}$ is written 1*^-5. Instead 10*^-5 = $10^{-4}$. See Input Syntax - Numbers. Commented Dec 28, 2020 at 23:02
• @Mfafa Finally, even for $r=0$ the first element of the sum is already much more than $10^{-5}$. So maybe you should explain what you mean. Commented Dec 28, 2020 at 23:09
 Sum[\[Eta]/(1 + r) + ArcTan[\[Eta]/(1 + r)], {r, 0, n}]


is given by

\[Eta]*EulerGamma - (1/2)*I*LogGamma[1 - I*\[Eta]] + (1/2)*I*LogGamma[1 + I*\[Eta]] +
(1/2)*I*LogGamma[2 - I*\[Eta] + n] - (1/2)*I*LogGamma[2 + I*\[Eta] + n] +
\[Eta]*PolyGamma[0, 2 + n]


The sum and the analytic expression diverge for n->Infinity.

For n > 10421 each additional summand is less than 10^-5. The value of the sum at this point is 1.02436

• +1.It should be noticed that \[Eta] = 0.05211184484645051; NSum[\[Eta]/(r + 1) + ArcTan[\[Eta]/(r + 1)], {r, 0, Infinity}, Method -> "WynnEpsilon"] results in 0.904259 and no error commnication. Commented Dec 28, 2020 at 20:09
• it is bigger than the harmonic series multiplied by eta, so should still diverge... Commented Dec 28, 2020 at 20:20
• I see. I noticed the wrong answer of NSum for the developers. Commented Dec 28, 2020 at 20:24
• I try to complete my work with this answer, but still wrong Commented Dec 29, 2020 at 3:04
• [Phi] = -2*[Eta] (0.57721 + Log[q/2 K1]) + (2* Sum[[Eta]/(r + 1) + ArcTan[[Eta]/(r + 1)] the value of K1=1.16 Commented Dec 29, 2020 at 3:04