Đặt: $t=1+\cos x \Rightarrow dt=-\sin xdx$
Ta có:
$\int\limits_0^{\frac{\pi}{2}}\dfrac{\sin2x\cos x}{1+\cos x}dx$
$=2\int\limits_0^{\frac{\pi}{2}}\dfrac{\sin x\cos^2x}{1+\cos x}dx$
$=-2\int\limits_2^1\dfrac{(t-1)^2}{t}dt$
$=2\int\limits_1^2\dfrac{(t-1)^2}{t}dt$
$=2\int\limits_1^2\left(t-2+\dfrac{1}{t}\right)dt$
$=2\left(\dfrac{t^2}{2}-2t+\ln t\right)\left|\begin{array}{l}2\\1\end{array}\right.$
$=2\ln2-1$