2. Gợi ý:
Ta có
$\frac{x+\left ( x+\sin x\right ).\sin x}{\left ( 1+\sin x \right ).\sin^{2}x }= \frac{\sin^2x+\left ( 1+\sin x\right ).x}{\left ( 1+\sin x \right ).\sin^{2}x }=\frac{1}{1+\sin x}+\frac{x}{\sin^2 x}$
Suy ra
$\int \frac{x+\left ( x+\sin x\right ).\sin x}{\left ( 1+\sin x \right ).\sin^{2}x }dx= I_1+I_2$. Trong đó
$\bullet \quad I_1=\int \frac{1}{1+\sin x}dx=\int 2\frac{\left ( \sin \frac{x}{2} +\cos \frac{x}{2} \right )\left ( \sin \frac{x}{2} \right )'-\sin \frac{x}{2} .\left ( \sin \frac{x}{2} +\cos \frac{x}{2} \right )'}{\left ( \sin \frac{x}{2} +\cos \frac{x}{2} \right )^2}dx$
$= \frac{2\sin \frac{x}{2}}{\left ( \sin \frac{x}{2} +\cos \frac{x}{2} \right )^2}+C$
$\bullet \quad I_2=\int \frac{x}{\sin^2 x}dx=\int xd\left ( \tan x \right )=x\tan x- \int \tan x dx = x\tan x- \int \frac{\sin x}{\cos x}dx =x\tan x+ \int \frac{d(\cos x)}{\cos x} =x\tan x+ \ln|\cos x| +C.$
Đến đây bạn tự thay cận và tính nốt.