Question:
Evaluate the following integrals:
$\int \frac{\cos x-\sin x}{1+\sin 2 x} d x$
Solution:
We know $\cos ^{2} x+\sin ^{2} x=1,2 \sin x \cos x=\sin 2 x$
$\therefore$ Denominator can be written as
$\cos ^{2} x+\sin ^{2} x+2 \sin x \cos x=(\sin x+\cos x)^{2}$
$\therefore$ Now the given equation becomes
$\Rightarrow \int \frac{\cos x-\sin x}{(\sin x+\cos x)^{2}} d x$
Assume $\cos x+\sin x=t$
$\therefore \mathrm{d}(\cos x+\sin x)=\mathrm{dt}$
$=\cos x-\sin x$
$\therefore d t=\cos x-\sin x$
$\Rightarrow \int \frac{\mathrm{dt}}{\mathrm{t}^{2}}$
$\Rightarrow \int \frac{1}{\mathrm{t}^{2}} \mathrm{dt}$
$\Rightarrow \int \mathrm{t}^{-2} \cdot \mathrm{dt}$
$\Rightarrow \frac{\mathrm{t}^{-1}}{-1}+\mathrm{c}$
But $t=\cos x+\sin x$
$\Rightarrow \frac{-1}{\cos x+\sin x}+c$