Indefinite Integration

Evaluate $\displaystyle \int \tan^{-1} \left(\dfrac{2 x}{1 - x^2}\right) \; dx$ $\;\;\;$ $0 < x < 1$


Let $I = \displaystyle \int \tan^{-1} \left(\dfrac{2 x}{1 - x^2}\right) \; dx$ $\;\;\; \cdots$ (1)

Let $x = \tan \theta$ $\;\;\; \cdots$ (2)

Differentiating equation (2) gives

$dx = \sec^2 \theta \; d\theta$ $\;\;\; \cdots$ (2a)

Also, from equation (2), $\theta = \tan^{-1} \left(x\right)$ $\;\;\; \cdots$ (2b)

$\begin{aligned} \text{Further, } \tan^{-1} \left(\dfrac{2 x}{1 - x^2}\right) & = \tan^{-1} \left(\dfrac{2 \tan \theta}{1 - \tan^2 \theta}\right) \;\;\; \left[\text{In view of equation (2)}\right] \\\\ & = \tan^{-1} \left(\tan 2 \theta\right) \\\\ & = 2 \theta \;\;\; \cdots (2c) \end{aligned}$

In view of equations (2a) and (2c), equation (1) becomes

$I = 2 \int \theta \cdot \sec^2 \theta \; d\theta$ $\;\;\; \cdots$ (3)

$\left[\text{Note: } \displaystyle \int u \cdot v \; dx = u \int v \; dx - \int \left\{\int v \; dx \times \dfrac{d}{dx} \left(u\right) \right\} \; dx \right]$

Here $u = \theta$ and $v = \sec^2 \theta$

$\begin{aligned} \therefore \; I & = 2 \left[\theta \int \sec^2 \theta \; d\theta - \int \left\{\int \sec^2 \theta \; d\theta \times \dfrac{d}{d \theta} \left(\theta\right) \right\} d \theta\right] \\\\ & = 2 \left[\theta \cdot \tan \theta - \int \tan \theta \; d\theta\right] \\\\ & = 2 \; \theta \; \tan \theta - 2 \; \log \left|\sec \theta\right| + c \\\\ & = 2 \; \theta \; \tan \theta - 2 \log \left|\sqrt{1 + \tan^2 \theta}\right| + c \\\\ & = 2 \; \tan^{-1} \left(x\right) \; x - 2 \log \left|\sqrt{1 + x^2}\right| + c \;\;\; \left[\text{In view of equations (2) and (2b)}\right] \\\\ & = 2 \; x \; \tan^{-1} \left(x\right) - \log \left|1 + x^2\right| + c \end{aligned}$