$\int \frac{dx}{\sin x-\cos x}$
Write $$\sin{x}-\cos{x}=\sqrt2\left(\frac1{\sqrt2}\sin{x}-\frac1{\sqrt2}\cos{x}\right)=\sqrt2\sin\left(x-\frac{\pi}4\right).$$
Hint Using an angle sum formula gives $$\sin x - \cos x = \sqrt{2} \sin \left(x - \frac{\pi}{4}\right) .$$
Multiply and divide the denominator by $\frac{\sqrt{2}}{2}$ which is equal to $\sin(\frac{\pi}{4})=\cos(\frac{\pi}{4})$
Now use the fact that $\sin(u-v)=\sin(u)\cos(v)-\cos(u)\sin(v)$.