I want to compare two equations for the arctangent function: $$\tag{1}\arctan\left(x\right)=\sum\limits_{n=0}^{\infty}{\frac{{2^{2n}}{\left(n! \right)}^{2}}{\left(2n+1\right)!}\frac{x^{2n+1}}{{\left(1+x^2\right)}^{n+1}}}$$ and $$\tag{2}\arctan\left(x\right)=i\sum\limits_{n=1}^{\infty}{\frac{1}{2n-1}}\left(\frac{1}{\left(1+2i/x\right)^{2n-1}}-\frac{1}{\left(1-2i/x\right)^{2n-1}}\right).$$

Which of them is faster in convergence?

  • $\begingroup$ Simple numerical experiments suggest that the second sum converges faster. $\endgroup$ – Michael Renardy Jun 6 '17 at 18:08
  • $\begingroup$ @ Michael Thank you! But how much faster? How to compare these equations for convergence or accuracy? $\endgroup$ – Freedom Math Jun 6 '17 at 18:17

If $x > 0$, let $r = 1/|1 + 2 i/x| = 1/\sqrt{1 + 4/x^2}$ and the $n$'th term on the right of the second sum is dominated by $2/((2n-1)r^{2n-1})$.
On the other hand, for large $n$ the $n$'th term in the first sum is approximately $\sqrt{\pi/(4n)} (x/(1+x^2)) (x^2/(1+x^2))^n$. Since $$ \frac{x^2}{1+x^2} > \frac{1}{1+4/x^2} = \frac{x^2}{4 + x^2}$$ for all $x > 0$ we find that the $n$'th term in the second sum will go to $0$ asymptotically faster.

Here is an animation showing the absolute values of the errors in the $N$'th partial sums for $N$ from $1$ to $50$ and $x$ from $0$ to $3$. The red curve is for the first series and the blue curve is for the second.

enter image description here

  • $\begingroup$ @ Robert Thank you! Your description and error graphs clearly show that the convergence of the second equation is more rapid, especially at $x<4$ as I understand. $\endgroup$ – Freedom Math Jun 9 '17 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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