0
$\begingroup$

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?

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

1 Answer 1

2
$\begingroup$

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

$\endgroup$
1
  • $\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$ Jun 9, 2017 at 15:19

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.