Prove that:
$\;$ $\tan^{-1} \left[\dfrac{\sqrt{1 + x^2} + \sqrt{1 - x^2}}{\sqrt{1 + x^2} - \sqrt{1 - x^2}}\right] = \dfrac{\pi}{4} + \dfrac{1}{2} \cos^{-1} \left(x^2\right)$, $\;$ $- 1 < x < 1$, $\;$ $x \neq 0$
$\tan^{-1} \left[\dfrac{\sqrt{1 + x^2} + \sqrt{1 - x^2}}{\sqrt{1 + x^2} - \sqrt{1 - x^2}}\right]$
$= \tan^{-1} \left[\dfrac{\left(\sqrt{1 + x^2} + \sqrt{1 - x^2}\right) \left(\sqrt{1 + x^2} - \sqrt{1 - x^2}\right)}{\left(\sqrt{1 + x^2} - \sqrt{1 - x^2}\right)^2}\right]$
$= \tan^{-1} \left[\dfrac{1 + x^2 - 1 + x^2}{1 + x^2 + 1 - x^2 - 2 \sqrt{\left(1 + x^2\right) \left(1 - x^2\right)}}\right]$
$= \tan^{-1} \left[\dfrac{2 x^2}{2 - 2 \sqrt{1 - x^4}}\right]$
$= \tan^{-1} \left[\dfrac{x^2}{1 - \sqrt{1 - x^4}}\right]$ $\;\;\; \cdots \; (1)$
Let $\;$ $x^2 = \cos \theta \implies \theta = \cos^{-1} \left(x^2\right), \hspace{1cm} \theta \in \left[0, \pi\right]$ $\;\;\; \cdots \; (2)$
$\therefore \;$ In view of equation $(2)$, equation $(1)$ becomes,
$\tan^{-1} \left[\dfrac{\sqrt{1 + x^2} + \sqrt{1 - x^2}}{\sqrt{1 + x^2} - \sqrt{1 - x^2}}\right]$
$= \tan^{-1} \left[\dfrac{\cos \theta}{1 - \sqrt{1 - \cos^2 \theta}}\right]$
$= \tan^{-1} \left[\dfrac{\cos \theta}{1 - \sin \theta}\right]$
$= \tan^{-1} \left[\dfrac{\cos^2 \left(\dfrac{\theta}{2}\right) - \sin^2 \left(\dfrac{\theta}{2}\right)}{\cos^2 \left(\dfrac{\theta}{2}\right) + \sin^2 \left(\dfrac{\theta}{2}\right) - 2 \sin \left(\dfrac{\theta}{2}\right) \cos \left(\dfrac{\theta}{2}\right)}\right]$
$= \tan^{-1} \left[\dfrac{\left\{\cos \left(\dfrac{\theta}{2}\right) + \sin \left(\dfrac{\theta}{2}\right) \right\} \left\{\cos \left(\dfrac{\theta}{2}\right) - \sin \left(\dfrac{\theta}{2}\right) \right\}}{\left\{\cos\left(\dfrac{\theta}{2}\right) - \sin \left(\dfrac{\theta}{2}\right) \right\}^2}\right]$
$= \tan^{-1} \left[\dfrac{\cos \left(\dfrac{\theta}{2}\right) + \sin \left(\dfrac{\theta}{2}\right)}{\cos \left(\dfrac{\theta}{2}\right) - \sin \left(\dfrac{\theta}{2}\right)}\right]$
$= \tan^{-1} \left[\dfrac{1 + \tan \left(\dfrac{\theta}{2}\right)}{1 - \tan \left(\dfrac{\theta}{2}\right)}\right]$
$= \tan^{-1} \left[\tan \left(\dfrac{\pi}{4} + \dfrac{\theta}{2}\right)\right]$
$= \dfrac{\pi}{4} + \dfrac{\theta}{2}$
$= \dfrac{\pi}{2} + \dfrac{1}{2} \cos^{-1} \left(x^2\right)$
Hence proved.