3
$\begingroup$
η = 0.05211184484645051`;
Sum[η/(r + 1) + ArcTan[η/(r + 1)]

$r$ start from $0$.

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

$\endgroup$
2
  • $\begingroup$ Do you mean η/(r + 1) + ArcTan[η/(r + 1) less than 10^-5? $\endgroup$
    – user64494
    Commented Dec 28, 2020 at 17:39
  • $\begingroup$ "... 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.) $\endgroup$ Commented Dec 29, 2020 at 7:07

2 Answers 2

6
$\begingroup$

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 *)
$\endgroup$
4
  • $\begingroup$ 10*^-5 not 1^-5 as you write $\endgroup$
    – Mfafa
    Commented Dec 28, 2020 at 19:37
  • $\begingroup$ even that the answer is 1.02436 not less than 0.00001 $\endgroup$
    – Mfafa
    Commented Dec 28, 2020 at 19:38
  • 1
    $\begingroup$ @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. $\endgroup$
    – MarcoB
    Commented Dec 28, 2020 at 23:02
  • $\begingroup$ @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. $\endgroup$
    – MarcoB
    Commented Dec 28, 2020 at 23:09
4
$\begingroup$
 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

$\endgroup$
6
  • $\begingroup$ +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. $\endgroup$
    – user64494
    Commented Dec 28, 2020 at 20:09
  • $\begingroup$ it is bigger than the harmonic series multiplied by eta, so should still diverge... $\endgroup$
    – Andreas
    Commented Dec 28, 2020 at 20:20
  • $\begingroup$ I see. I noticed the wrong answer of NSum for the developers. $\endgroup$
    – user64494
    Commented Dec 28, 2020 at 20:24
  • $\begingroup$ I try to complete my work with this answer, but still wrong $\endgroup$
    – Mfafa
    Commented Dec 29, 2020 at 3:04
  • $\begingroup$ [Phi] = -2*[Eta] (0.57721 + Log[q/2 K1]) + (2* Sum[[Eta]/(r + 1) + ArcTan[[Eta]/(r + 1)] the value of K1=1.16 $\endgroup$
    – Mfafa
    Commented Dec 29, 2020 at 3:04

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.