<s>[INST] Integration Example How can i find the integration of this example
$$\int \frac{\sin x}{\sin x - \cos x } dx$$
I tried first add cos and then substracting cos but then what about $$\int \frac{\cos x}{\sin x - \cos x } dx\ ?$$ 
 [/INST] Now let 
$$ I = \int \frac{\cos x}{\cos x + \sin x} \, \mathrm{d}x \quad \text{and} \quad J = \int \frac{\sin x}{\cos x + \sin x} \, \mathrm{d}x$$
Notice that 
\begin{align*}
I + J & = \int \frac{\cos x + \sin x}{\cos x + \sin x} \, \mathrm{d}x = x + \mathcal{C} \\
I - J & = \int \frac{(\sin x + \cos x)'}{\cos x + \sin x} \, \mathrm{d}x = \ln\bigl( \cos x + \sin x \bigr) + \mathcal{C}
\end{align*}
Solving the system yields
$$I = \frac{1}{2}x + \frac{1}{2}\ln\bigl( \cos x + \sin x \bigr) + \mathcal{C}$$
and
$$J = \frac{1}{2}x - \frac{1}{2}\ln\bigl( \cos x + \sin x \bigr) + \mathcal{C}$$
as wanted. 
</s>