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 $u=x-\frac\pi4$, then
$$
\begin{align}
\int\frac{\sin(2x)}{\sin(x)-\cos(x)}\,\mathrm{d}x
&=\int\frac{\sin\left(2u+\frac\pi2\right)}{\sqrt2\sin(u)}\,\mathrm{d}u\\
&=\frac1{\sqrt2}\int\frac{\cos\left(2u\right)}{\sin(u)}\,\mathrm{d}u\\
&=\frac1{\sqrt2}\int\frac{1-2\sin^2(u)}{\sin(u)}\,\mathrm{d}u\\
&=\frac1{\sqrt2}\int\frac{\sin(u)}{1-\cos^2(u)}\,\mathrm{d}u-\sqrt2\int\sin(u)\,\mathrm{d}u\\
&=\sqrt2\cos(u)-\frac1{2\sqrt2}\int\left(\frac1{1-\cos(u)}+\frac1{1+\cos(u)}\right)\,\mathrm{d}\cos(u)\\
&=\sqrt2\cos(u)+\frac1{2\sqrt2}\log\left(\frac{1-\cos(u)}{1+\cos(u)}\right)+C\\
&=\sqrt2\cos(u)+\frac1{\sqrt2}\log(\tan(u/2))+C
\end{align}
$$
