Evaluating the indefinite integral: $\int\sin^2(\sin(x))\cot(x)dx$

WolframAlpha gives me the solution that the integral $$\int \sin^2(\sin(x)) \cot(x) \, dx = \frac12 \log(\sin(x)) - \frac12\text{Ci}(2\sin x)$$ plus a constant, where $$\text{Ci}(y) = - \int_{y}^{\infty} \frac{\cos(t)}{t} \, dt.$$ It doesn't give me any sort of derivation though so I'd appreciate any formal proof showing this equivalence.

• Try substitution; sin(x)=t. Feb 4 at 23:37

\begin{align*} \int\sin^{2}(\sin(x))\cot(x)\mathrm{d}x & = \int\frac{\sin^{2}(\sin(x))}{\sin(x)}\mathrm{d}(\sin(x))\\\\ & = \int\frac{\sin^{2}(u)}{u}\mathrm{d}u\\\\ & = \int\frac{1 - \cos(2u)}{2u}\mathrm{d}u\\\\ & = \int\frac{\mathrm{d}u}{2u} - \int\frac{\cos(2u)}{2u}\mathrm{d}u \end{align*}