Evaluate $\displaystyle \int \limits_{0}^{\pi} \dfrac{x \sin x \; dx}{1 + \cos^2 x}$
$\begin{aligned}
\text{Let } I & = \displaystyle \int \limits_{0}^{\pi} \dfrac{x \sin x \; dx}{1 + \cos^2 x} \\\\
& = \displaystyle \int \limits_{0}^{\pi} \dfrac{\left(\pi - x\right) \sin \left(\pi - x\right) \; dx}{1 + \cos^2 \left(\pi - x\right)} \hspace{3em} \left[\text{Note: } \int \limits_{0}^{a} f\left(x\right) \; dx = \int \limits_{0}^{a} f\left(x - a\right) \; dx\right] \\\\
& = \displaystyle \int \limits_{0}^{\pi} \dfrac{\left(\pi - x\right) \sin x \; dx}{1 + \left(- \cos x\right)^2} \\\\
& = \pi \displaystyle \int \limits_{0}^{\pi} \dfrac{\sin x \; dx}{1 + \cos^2 x} - \displaystyle \int \limits_{0}^{\pi} \dfrac{x \sin x \; dx}{1 + \cos^2 x} \\\\
& = \pi \displaystyle \int \limits_{0}^{\pi} \dfrac{\sin x \; dx}{1 + \cos^2 x} - I \\\\
\text{i.e. } 2 I & = \pi \displaystyle \int \limits_{0}^{\pi} \dfrac{\sin x \; dx}{1 + \cos^2 x} \\\\
& = \pi I_1 \;\;\; \cdots \; (1)
\end{aligned}$
Consider $I_1 = \displaystyle \int \limits_{0}^{\pi} \dfrac{\sin x \; dx}{1 + \cos^2 x}$ $\;\;\; \cdots \; (2)$
Let $\cos x = u$ $\;\;\; \cdots \; (3)$
Differentiating equation $(3)$ gives
$- \sin x \; dx = du$ $\;\;\; \cdots \; (3a)$
$\text{When } \begin{cases}
x = 0, & u = \cos 0 = 1 \\
x = \pi, & u = \cos \pi = - 1
\end{cases}$ $\;\;\; \cdots \; (3b)$
$\therefore$ $\;$ In view of equations $(3)$, $(3a)$ and $(3b)$, equation $(2)$ becomes
$\begin{aligned}
I_1 & = \int \limits_{1}^{-1} \dfrac{- du}{1 + u^2} \\\\
& = \int \limits_{-1}^{1} \dfrac{du}{1 + u^2} \hspace{3em} \left[\text{Note: } - \int \limits_{b}^{a} f \left(x\right) \; dx = + \int \limits_{a}^{b} f \left(x\right) \; dx\right] \\\\
& = \left[\tan^{-1} u\right]_{-1}^{1} \\\\
& = \tan^{-1} \left(1\right) - \tan^{-1} \left(- 1\right) \\\\
& = \dfrac{\pi}{4} - \left(\dfrac{- \pi}{4}\right) = \dfrac{\pi}{2} \;\;\; \cdots \; (4)
\end{aligned}$
Substituting equation $(4)$ in equation $(1)$ gives
$2 I = \pi \times \dfrac{\pi}{2}$
$\implies$ $I = \dfrac{\pi^2}{4}$