How to take the integral $\int\frac{dx}{\sin^3x}$ There's
$$\int\frac{\mathrm dx}{\sin^3x}.$$
I tried to write it like
$$\int\frac{(\sin^2x+\cos^2x)}{\sin^3x}\,\mathrm dx,$$
and then made partial fractions from it, but it didn't help much, the answer is still incorrect.

$$
\begin{aligned}
\int \frac{1}{\sin^3x}dx 
& = \int \frac{\left(t^2+1\right)^2}{4t^3}dt 
\\& =\frac{1}{4}\int \:\frac{1}{t^3}+t+\frac{2}{t}dt
\\& = \color{red}{\frac{1}{4}\left(\frac{1}{2}\tan ^2\left(\frac{x}{2}\right)-\frac{1}{2}\cot ^2\left(\frac{x}{2}\right)+2\ln \left|\tan \left(\frac{x}{2}\right)\right|\right)+C}
\end{aligned}
$$
Solved by substitution $\color{blue}{t=\tan \left(\frac{x}{2}\right)}$
