Question:
$\frac{\cos 2 x}{(\cos x+\sin x)^{2}}$
Solution:
$\frac{\cos 2 x}{(\cos x+\sin x)^{2}}=\frac{\cos 2 x}{\cos ^{2} x+\sin ^{2} x+2 \sin x \cos x}=\frac{\cos 2 x}{1+\sin 2 x}$
$\therefore \int \frac{\cos 2 x}{(\cos x+\sin x)^{2}} d x=\int \frac{\cos 2 x}{(1+\sin 2 x)} d x$
Let $1+\sin 2 x=t$
$\Rightarrow 2 \cos 2 x d x=d t$
$\therefore \int \frac{\cos 2 x}{(\cos x+\sin x)^{2}} d x$$=\frac{1}{2}$$\int_{t}^{1} \frac{1}{d t}$
$=\frac{1}{2} \log |t|+\mathrm{C}$
$=\frac{1}{2} \log |1+\sin 2 x|+\mathrm{C}$
$=\frac{1}{2} \log \left|(\sin x+\cos x)^{2}\right|+\mathrm{C}$
$=\log |\sin x+\cos x|+\mathrm{C}$