<s>[INST] Evaluation of $I=\int \frac{1}{\sin (x-a) \sin(x-b) \sin(x-c)}.dx$ Evaluate the given integral:
$$I=\int \frac{1}{\sin (x-a) \sin(x-b) \sin(x-c)}.dx$$
When it was $I=\int \frac{1}{\sin (x-a) \sin(x-b)}.dx$, I solved it by multiplying and dividing by $\sin (b-a)$. But I am not getting how to proceed here..
Could someone help me with this?
 [/INST] I looked at the partial feaction decomposition method. It is not particularly elegant, but it reduces the calculus problem to a linear algebra one. It is likely a more efficient method for this integral exists, but I am not sure what it would be.
$$\int\frac{dx}{\sin(x-a)\sin(x-b)\sin(x-c)}$$
$$=\int\left(\frac{A}{\sin(x-a)}+\frac{B}{\sin(x-b)}+\frac{C}{\sin(x-c)}\right)dx$$
If $A$, $B$, and $C$ are constants, we can use the identity $\int\csc x\ dx=\ln\left(\tan\frac x2\right)+k.$
$$=A\ln\left(\tan\frac{x-a}2\right)+B\ln\left(\tan\frac{x-b}2\right)+C\ln\left(\tan\frac{x-c}2\right)+k$$
In order to find these constants, we can rewrite $\sin(x-a)=\sin x\cos a-\sin a\cos x.$ 
$$=\int\frac{\begin{array}A(\sin x\cos b-\sin b\cos x)(\sin x\cos c-\sin c\cos x)\\+B(\sin x\cos a-\sin a\cos x)(\sin x\cos c-\sin c\cos x)\\+C(\sin x\cos b-\sin b\cos x)(\sin x\cos c-\sin c\cos x)\end{array}}{(\sin x\cos a-\sin a\cos x)(\sin x\cos b-\sin b\cos x)(\sin x\cos c-\sin c\cos x)}dx$$
Rearranging, and rewiring some sines using the sum identity:
$$=\int\frac{\begin{array}(A\cos b\cos c+B\cos a\cos c+C\cos a\cos\ b)\sin^2x\\-(A\sin(b+c)+B\sin(a+c)+C\sin(a+b))\sin x\cos x\\+(A\sin b\sin c+B\sin a\sin c+C\sin a\sin b)\cos^2x\end{array}}{(\sin x\cos a-\sin a\cos x)(\sin x\cos b-\sin b\cos x)(\sin x\cos c-\sin c\cos x)}dx$$
The double angle identity can be used to show that $$\alpha\sin^2x+\beta\sin x\cos x+\gamma\cos^2x=\frac12(\alpha+\gamma)+\frac12(-\alpha+\gamma)\cos 2x+\beta\sin 2x,$$ which is equal to $1$ for all $x$ if and only if $\alpha=1,\beta=0,\gamma=1$. This gives a linear system of equations.
$$A\cos b\cos c+B\cos a\cos c+C\cos a\cos b=1$$
$$A\sin b\sin c+B\sin a\sin c+C\sin a\sin b=1$$
$$A\sin(b+c)+B\sin(a+c)+C\sin(a+b)=0$$
Rewriting as a matrix:
$$\begin{bmatrix}\cos b\cos c & \cos a\cos c & \cos a\cos b\\
\sin b\sin c & \sin a\sin c & \sin a\sin b\\
\sin(b+c) & \sin(a+c) & \sin(a+b)\\\end{bmatrix}\begin{bmatrix}A\\B\\C\\\end{bmatrix}=\begin{bmatrix}1\\1\\0\\\end{bmatrix}$$
For specific values of $a$, $b$, and $c$, this equation above can be solved by row reduction. Technically, the inverse of the $3\times3$ matrix above can be computed to find the general solution, but it would be a rather cumbersome process.
</s>