Evaluate: $ \int \frac{\sin x}{\sin x - \cos x} dx $ Consider
$$ \int \frac{\sin x}{\sin x - \cos x} dx $$
Well I tried taking integrand as $ \frac{\sin x - \cos x + \cos x}{\sin x - \cos x} $ so that it becomes,
$$ 1 + \frac{\cos x}{\sin x - \cos x} $$
But does not helps.
I want different techniques usable here.

Take$$I=\int\mathrm dx\,\frac {\sin x}{\sin x-\cos x}$$$$J=\int\mathrm dx\,\frac {\cos x}{\sin x-\cos x}$$Subtracting gives$$I-J=\int\mathrm dx\,=x$$Adding gives$$I+J=\int\mathrm dx\,\frac {\sin x+\cos x}{\sin x-\cos x}=\log(\sin x-\cos x)$$Take the average of the two to see that$$\int\mathrm dx\,\frac {\sin x}{\sin x-\cos x}\color{blue}{=\frac 12x+\frac 12\log(\sin x-\cos x)+C}$$
