Concept:
- Identity: \(\tan^{-1}\dfrac{2x}{1-x^2}=2\tan^{-1}x\) for \(|x|\lt 1\).
- A function is onto \(B\) exactly when its range equals the codomain \(B\).
- A strictly increasing function is one-one.
Step 1: Simplify the function
Let \(x=\tan\theta\). Since \(-1\lt x\lt 1\), we have \(\theta\in\left(-\tfrac{\pi}{4},\tfrac{\pi}{4}\right)\). Then \[ f(x)=\tan^{-1}\frac{2\tan\theta}{1-\tan^2\theta}=\tan^{-1}(\tan 2\theta). \] Because \(2\theta\in\left(-\tfrac{\pi}{2},\tfrac{\pi}{2}\right)\), which is the principal range of \(\tan^{-1}\), \[ f(x)=2\theta=2\tan^{-1}x . \]
Step 2: Check that the function is one-one
Differentiating, \[ f'(x)=\frac{2}{1+x^2}\gt 0 \quad\text{for all }x\in(-1,1). \] So \(f\) is strictly increasing and therefore one-one.
Step 3: Find the range
As \(x\to -1^{+}\), \(f(x)\to 2\left(-\tfrac{\pi}{4}\right)=-\tfrac{\pi}{2}\), and as \(x\to 1^{-}\), \(f(x)\to \tfrac{\pi}{2}\). The end values are never attained because \(x=\pm1\) are excluded. By continuity the range is the open interval \(\left(-\tfrac{\pi}{2},\tfrac{\pi}{2}\right)\).
For \(f\) to be onto, \(B\) must equal this range. The intervals \(\left(0,\tfrac{\pi}{2}\right)\) and \(\left[0,\tfrac{\pi}{2}\right)\) miss the negative values taken for \(x\lt 0\), while the closed interval \(\left[-\tfrac{\pi}{2},\tfrac{\pi}{2}\right]\) contains the two end points that are never reached.
Step 4: Conclusion
\(f\) is one-one and onto when \(B=\left(-\tfrac{\pi}{2},\tfrac{\pi}{2}\right)\). Hence, the correct option is (D), \(\left(-\tfrac{\pi}{2},\tfrac{\pi}{2}\right)\).