<s>[INST] Solution of integral $\int \frac{\sin (x)}{\sin (5x) \sin (3x)}\,\mathrm dx.$ Find the following integral:

$$\int \frac{\sin (x)}{\sin (5x) \sin (3x)}\,\mathrm dx.$$

I don't know how to deal with the $\sin (x)$ in the numerator. If it had been $\sin (2x)$ then we could have used $\sin (2x)= \sin (5x-3x)$. How to deal given integral? Could someone help me with this?
 [/INST] I think it's a little easier if you leave in in terms of Chebyshev polynomials of the second kind, $U_n(\cos x)=\frac{\sin(n+1)x}{\sin x}$. Then the integral looks like
$$\begin{align}\int\frac{\sin x}{\sin5x\sin3x}dx&=\int\frac{\sin x}{\sin^2xU_4(\cos x)U_2(\cos x)}dx\\
&=\int\frac{-dv}{(1-v^2)U_4(v)U_2(v)}\end{align}$$
Where we have made the substitution $v=\cos x$. Then you can use $\sin(n+1)x=2\sin nx\cos x-\sin(n-1)x$ to run these out far enough:
$$\begin{array}{rl}\sin2x&=2\sin x\cos x\\
\sin3x&=4\sin x\cos^2x-\sin x\\
\sin4x&=8\sin x\cos^3x-4\sin x\cos x\\
\sin5x&=16\sin x\cos^4x-12\sin x\cos^2x+\sin x\end{array}$$
So now we are up to
$$\int\frac{\sin x}{\sin5x\sin3x}dx=\int\frac{dv}{64\left(v^2-1\right)\left(v^2-\frac14\right)\left(v^4-\frac34v^2+\frac1{16}\right)}$$
The roots of that last factor are given by $\sin\left(5\cos^{-1}v\right)=0=\sin n\pi$, so $v=\cos\frac{n\pi}5$, or $$v\in\left\{\frac{\phi}2,\frac1{2\phi},-\frac1{2\phi},-\frac{\phi}2\right\}$$
Where $\phi=\frac{\sqrt5+1}2$, just like @Jack D'Aurizio said. So we have
$$\begin{align}&\frac1{64\left(v^2-1\right)\left(v^2-\frac14\right)\left(v^4-\frac34v^2+\frac1{16}\right)}\\
&=\frac1{64(v-1)(v+1)(v-\frac12)(v+\frac12)(v-\frac{\phi}2)(v-\frac1{2\phi})(v+\frac1{2\phi})(v+\frac{\phi}2)}\\
&=\frac A{v-1}+\frac B{v+1}+\frac C{v-\frac12}+\frac D{v+\frac12}+\frac E{v-\frac{\phi}2}+\frac F{v-\frac1{2\phi}}+\frac G{v+\frac1{2\phi}}+\frac H{v+\frac{\phi}2}\end{align}$$
We can knock these partial fractions out pretty quick with L'Hopital's rule. For example
$$\begin{align}\lim_{v\rightarrow\frac{\phi}2}\frac{v-\frac{\phi}2}{64\left(v^2-1\right)\left(v^2-\frac14\right)\left(v^4-\frac34v^2+\frac1{16}\right)}&=\frac1{64\left(\frac{\phi^2}4-1\right)\left(\frac{\phi^2}4-\frac14\right)\left(4\frac{\phi^3}{8}-\frac34(2)\frac{\phi}2\right)}\\
&=-\frac1{5\phi}=\lim_{v\rightarrow\frac{\phi}2}\frac{E(v-\frac{\phi}2)}{v-\frac{\phi}2}=E\end{align}$$
The symmetries mean that we only need one of a pair of algebraic conjugates or additive inverses, so really only a total of $3$ numerators need be separately computed. Eventually after getting the other coefficients and integrating and expressing in terms of $x$, we get
$$\begin{align}\int\frac{\sin x}{\sin5x\sin3x}dx&=-\frac1{5\phi}\ln\left|\frac{\cos x-\frac{\phi}2}{\cos x+\frac{\phi}2}\right|+\frac{\phi}5\ln\left|\frac{\cos x+\frac1{2\phi}}{\cos x-\frac1{2\phi}}\right|\\
&+\frac13\ln\left|\frac{\cos x-\frac12}{\cos x+\frac12}\right|+\frac1{30}\ln\left|\frac{\cos x-1}{\cos x+1}\right|+C\end{align}$$
I checked it by comparison with numeric quadrature, so the only errors left are the typos. The use of Chebyshev polynomials of the second kind left the denominator in a nicer factored form.
</s>