Evaluate $\displaystyle \int \limits_{0}^{1} \tan^{-1}x \; dx$
Let $I = \displaystyle \int \limits_{0}^{1} \tan^{-1}x \; dx$ $\;\;\; \cdots \; (1)$
Put $\tan^{-1}x = \theta$ $\;\;\; \cdots \; (2)$
Differentiating equation $(2)$ gives
$dx = \sec^2 \theta \; d\theta$ $\;\;\; \cdots \; (2a)$
From equation $(2)$, $x = \tan \theta$
When $x = 0$, $\theta = \tan^{-1}\left(0\right) = 0$ $\;\;\; \cdots \; (2b)$
When $x = 1$, $\theta = \tan^{-1} \left(1\right) = \dfrac{\pi}{4}$ $\;\;\; \cdots \; (2c)$
$\therefore$ $\;$ In view of equations $(2)$, $(2a)$, $(2b)$ and $(2c)$, equation $(1)$ can be written as
$\begin{aligned}
I & = \int \limits_{0}^{\frac{\pi}{4}} \theta \; \sec^2 \theta \; d\theta \\\\
& \left[\begin{aligned}
\text{Note: }& \int \limits_{a}^{b} u\; v \; dx = \left[u \int v \; dx\right]_{a}^{b} - \int \limits_{a}^{b} \left\{\int v \; dx \times \dfrac{d}{dx} \left(du\right) \right\} \; dx \\\\
& \text{Here } u = \theta; \; v = \sec^2 \theta
\end{aligned}\right] \\\\
& = \left[\theta \int \sec^2 \; d\theta\right]_{0}^{\frac{\pi}{4}} - \int \limits_{0}^{\frac{\pi}{4}} \left[\int \sec^2 \theta \; d \theta \times \dfrac{d}{d \theta} \left(\theta\right)\right] d \theta \\\\
& = \left[\theta \; \tan \theta\right]_{0}^{\pi / 4} - \int \limits_{0}^{\frac{\pi}{4}} \tan \theta \; d \theta \\\\
& = \dfrac{\pi}{4} \tan \left(\dfrac{\pi}{4}\right) - 0 - \left[\log \left|\sec \theta\right|\right]_{0}^{\pi / 4} \\\\
& = \dfrac{\pi}{4} - \left[\log \left|\sec \left(\dfrac{\pi}{4}\right)\right| - \log \left|\sec \left(0\right)\right|\right] \\\\
& = \dfrac{\pi}{4} - \left[\log \sqrt{2} - \log 1\right] \\\\
& = \dfrac{\pi}{4} - \log \sqrt{2} = \dfrac{\pi}{4} - \dfrac{1}{2} \log 2
\end{aligned}$