How to solve $y=\tan(θ)$ for $θ$? If $\arctan(\tan(\theta))$ is not necessarily equal to $\theta$, how come if we are given $y=\tan(θ)$ the solution in terms of $\theta$ is $\theta=\arctan(y)$?
I'm trying to intergrate $1/(1+y^2)$ using trig substitution and I am trying to get my solution, $\theta$, in terms of $y$, $y=\tan(\theta)$

Hint: If $\theta \in (-\frac{\pi}{2},\frac{\pi}{2})$, then $\arctan (\tan \theta) = \theta $.
So when you use trigonometric substitution $y = \tan \theta$, also add the condition on $\theta$ namely $\theta \in (-\frac{\pi}{2},\frac{\pi}{2}) $.
