# How to integrate: $\int \frac{\mathrm dx}{\sin (x)-\sin(a)}$

How to integrate :

$$\int \frac{\mathrm dx}{\sin (x)-\sin(a)}$$

-
Welcome to Math.SE. What methods have you tried? – Nick Peterson Jun 14 '13 at 15:06
Hello, welcome to Math.SE. I have changed the formatting of the title so as to make it take up less vertical space -- this is a policy to ensure that the scarce space on the main page is distributed evenly over the questions. See here for more information. Please take this into consideration for future questions. Thanks in advance. – Lord_Farin Jun 14 '13 at 15:22

Using Weierstrass substitution, $$\tan \frac x2=u$$

$$\implies \sin x=\frac{2u}{1+u^2}\text{ and } x=2\arctan u,dx=\frac{2du}{1+u^2}$$

$$I=\int\frac{dx}{\sin x-\sin \alpha} =\int\frac1{\frac{2u}{1+u^2}-\sin\alpha}\cdot\frac{2du}{1+u^2} =\int\frac{2du}{2u-(1+u^2)\sin\alpha}$$

Now, $$2u-(1+u^2)\sin\alpha=-\sin\alpha (1+u^2-2u\csc\alpha)=-\sin\alpha \left((u-\csc\alpha)^2-(\cot\alpha)^2\right)$$

Using $\frac{dx}{x^2-a^2}=\frac1{2a}\ln \left|\frac{x-a}{x+a}\right|+C$

$$I=-\frac1{\sin\alpha}\frac1{\cot\alpha}\ln\left|\frac{u-\csc\alpha-\cot\alpha}{u-\csc\alpha+\cot\alpha}\right|+C$$ where $C$ is an arbitrary constant for indefinite integral

Using $\csc\alpha+\cot\alpha=\frac{1+\cos\alpha}{\sin\alpha}=\frac{2\cos^\frac\alpha2}{2\sin\frac\alpha2\cos\frac\alpha2}=\cot\frac\alpha2$ and similarly, $\csc\alpha-\cot\alpha=\tan\frac\alpha2$ (as $\sin2A=2\sin A\cos A,\cos2A=2\cos^2A-1$)

$$I=-\frac1{\cos\alpha}\ln\left|\frac{\tan\frac x2-\cot\frac \alpha2}{\tan\frac x2-\tan\frac\alpha2}\right|+C$$

Again, $$\ln\left|\frac{\tan\frac x2-\cot\frac \alpha2}{\tan\frac x2-\tan\frac\alpha2}\right|$$

$$=\ln\left|\frac{\cos\frac \alpha2\cos\frac x2\left(\sin\frac x2\sin \frac \alpha2-\cos\frac \alpha2\cos\frac x2\right)}{\sin\frac \alpha2\cos\frac x2\left(\sin\frac x2\cos\frac\alpha2-\sin\frac\alpha2\cos\frac x2\right)}\right|=\ln\left|-\cot\frac\alpha2\right|+\ln\left|\frac{\cos\frac{x+\alpha}2}{\sin\frac{x-\alpha}2}\right|$$

Clearly, $\ln\left|-\cot\frac\alpha2\right|$ is independent of $x,$ hence constant

-

$$\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)$.

-