TITLE: How to integrate: $\int \frac{\mathrm dx}{\sin (x)-\sin(a)}$
QUESTION [5 upvotes]: How to integrate :
$$\int \frac{\mathrm dx}{\sin (x)-\sin(a)}$$

REPLY [2 votes]: $$\int \dfrac{1}{\sin (x)-\sin(a)}=\int \dfrac{\sin(x)+\sin(a)}{\sin^2 (x)-\sin^2(a)}=\int \dfrac{\sin(x)}{\sin^2 (x)-\sin^2(a)}+\int \dfrac{\sin(a)}{\sin^2 (x)-\sin^2(a)}$$
$$\int \dfrac{\sin(x)}{\sin^2 (x)-\sin^2(a)}=\int \dfrac{\sin(x)}{1-\cos^2 (x)-\sin^2(a)}$$
can be calculated with the substitution $u=\cos(x)$,
$$\int \dfrac{\sin(a)}{\sin^2 (x)-\sin^2(a)}=\sin(a)\int \dfrac{\csc^2(x)}{1-\csc^2(x)\sin^2(a)}=\sin(a)\int \dfrac{\csc^2(x)}{1-\cot^2(x)\sin^2(a)-\sin^2(a)}$$
can be calculated with the substitution $u=\cot(x)$.