Let $f:(-1,1) \rightarrow B$, be a function defined by $f(x)=\tan ^{-1} \frac{2 x}{1-x^2}$, then $f$ is both one-one and onto when $B$ is the interval :
(1) $\left(-\frac{\pi}{2}, \frac{\pi}{2}\right)$
(2) $\left[-\frac{\pi}{2}, \frac{\pi}{2}\right]$
(3) $\left[0, \frac{\pi}{2}\right)$
(4) $\left(0, \frac{\pi}{2}\right)$.