Let's say we have this-
$$\arctan(\frac{2x}{1-x^2})$$
Now this equals-
$$2\arctan x, x\in[-1,1]$$ $$-\pi+2\arctan x, x\in[1,\infty]$$ $$\pi+2\arctan x, x\in[-\infty,-1]$$
Is there an easy way to find out the definition of such inverse trig functions. I mean what is the way to find out for what values of $x$ which formula to use.(How should I derive the above ranges of $x$ for which I should add $\pi$ for eg in the above example). I could somehow manage to do it by some complicated method with lots of steps that seems too hectic. How to I do it in an easy way.
In general,how should I deal with any inverse trigonometric function such as this or $\arctan\frac{3x-x^3}{1-3x^2}$ etc. and easily find their definition for various values of $x$.
Thanks for any help!