Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I would like to know if there is reasonably fast converging method for computing large arguments of arctan.

Until now I've came across Taylor series that converges only on interval $(-1,1)$ and for increasing $|x|$ the rate decreases. Also I've found about continued fractions for arctan, which seems to converge more rapidly and can be used for any real number, but again with increasing $|x|$ I need to perform way too much iterations until I get at least 3 digits precision.

I'm therefore looking for a method that would allow me to compute arctan for large arguments with good precision and in reasonable amount of iterations.

share|improve this question
    
$$\operatorname{atan}x=\int_0^x \frac{1}{1+t^2}d\,t$$ may be a starting point. –  Daryl Oct 6 '12 at 12:31
    
I wonder if this works: expand sine and cosine in Taylor series at $\pi/2$; divide to get an expansion for tangent; invert to get an expansion for arctangent. –  Gerry Myerson Oct 6 '12 at 12:31
add comment

1 Answer

up vote 18 down vote accepted

Why don't you consider that $$ \arctan x + \arctan \frac{1}{x}=\frac{\pi}{2}, $$ so that, for large values of $x>0$, $$ \arctan x = \frac{\pi}{2}-\arctan {1 \over x} = \frac{\pi}{2}-\frac{1}{x}+\frac{1}{3x^3}-\frac{1}{5x^5} +\ldots ? $$ See also this discussion.

share|improve this answer
    
Thanks! I forgot about this law.. elegant and easy –  Raven Oct 6 '12 at 13:00
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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