Evaluate $\displaystyle \int \limits_{0}^{\frac{\pi}{2}} \dfrac{\sin^2 x}{\left(1 + \cos x\right)^2} \; dx$
$\begin{aligned} \text{Let } I & = \int \limits_{0}^{\frac{\pi}{2}} \dfrac{\sin^2 x}{\left(1 + \cos x\right)^2} \; dx \\\\ & = \int \limits_{0}^{\frac{\pi}{2}} \dfrac{\left(1 - \cos^2 x\right) \; dx}{\left(1 + \cos x\right)^2} \\\\ & = \int \limits_{0}^{\frac{\pi}{2}} \dfrac{\left(1 + \cos x\right) \left(1 - \cos x\right) \; dx}{\left(1 + \cos x\right)^2} \\\\ & = \int \limits_{0}^{\frac{\pi}{2}} \dfrac{\left(1 - \cos x\right) \; dx}{1 + \cos x} \\\\ & = \int \limits_{0}^{\frac{\pi}{2}} \dfrac{2 \sin^2 \left(\dfrac{x}{2}\right)}{2 \cos^2 \left(\dfrac{x}{2}\right)} \; dx \\\\ & = \int \limits_{0}^{\frac{\pi}{2}} \tan^2 \left(\dfrac{x}{2}\right) \; dx \\\\ & = \int \limits_{0}^{\frac{\pi}{2}} \left[\sec^2 \left(\dfrac{x}{2}\right) - 1\right] \; dx \\\\ & = \int \limits_{0}^{\frac{\pi}{2}} \sec^2 \left(\dfrac{x}{2}\right) \; dx - \int \limits_{0}^{\frac{\pi}{2}} dx \\\\ & = 2 \left[\tan \left(\dfrac{x}{2}\right)\right]_{0}^{\pi / 2} - \left[x\right]_{0}^{\pi / 2} \\\\ & = 2 \left[\tan \left(\dfrac{\pi}{4}\right) - \tan \left(0\right)\right] - \left(\dfrac{\pi}{2} - 0\right) \\\\ & = 2 \left(1 - 0\right) - \dfrac{\pi}{2} = 2 - \dfrac{\pi}{2} \end{aligned}$