Integration of trigonometric function $\int\frac{\sin(2x)}{\sin(x)-\cos(x)}dx$ 
$$\int\frac{\sin(2x)}{\sin(x)-\cos(x)}dx$$

My attempt: Firstly, $\sin(2x)=2\sin(x)\cos(x)$.
After that, eliminate the $\cos(x)$ seen in both the numerator and denominator to get
$$2\int\frac{\sin(x)}{\tan(x)-1}\ dx.$$
From here onwards, should I convert $\sin(x)$, $\tan(x)$ to half-angles and use $\tan(x/2)=t$?
But this would be a time consuming method. Any suggestions?

Let $$I = \int\frac{\sin 2x}{\sin x-\cos x}dx = \frac{1}{\sqrt{2}}\int\frac{\sin 2x}{\sin \left(x-\frac{\pi}{4}\right)}dx$$
Now Put $\displaystyle x- \frac{\pi}{4} = t\;,$ Then $dx = dt$
So $$I = \frac{1}{\sqrt{2}}\int\frac{\cos 2t}{\sin t}dt = \frac{1}{\sqrt{2}}\int \frac{1-2\sin^2 t}{\sin t}dt$$
So $$I = \frac{1}{\sqrt{2}}\int \csc t dt-\sqrt{2}\int \sin t dt$$
So $$I = \frac{1}{\sqrt{2}}\ln \left|\tan \frac{t}{2}\right|+\sqrt{2}\cos t+\mathcal{C}$$
So $$I = \frac{1}{\sqrt{2}}\ln \left|\tan \left(\frac{x-\frac{\pi}{4}}{2}\right)\right|+\sqrt{2}\cos \left(x-\frac{\pi}{4}\right)+\mathcal{C}$$
