Partial Integration $ \int \frac{x\cos x}{\sin^3x}dx $ The problem:
$$ \int \frac{x\cos x}{\sin^3x}dx $$
Can someone give me a hint on how to solve this without using cosecant?
The solution provided is:
$$ -\frac{1}{2}\left(\frac{x}{\sin^2x}+\cot x\right)\:+\:C $$
 A: HINT:
$$\int x\cdot\frac{\cos x}{\sin^3x}dx=x\int\frac{\cos x}{\sin^3x}dx-\int\left(\frac{dx}{dx}\int\frac{\cos x}{\sin^3x}dx\right)dx$$
For $\int\dfrac{\cos x}{\sin^3x}dx$  write $\sin x=u$
A: $\newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack}
 \newcommand{\dd}{{\rm d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\dsc}[1]{\displaystyle{\color{red}{#1}}}
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{{\rm i}}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\Li}[1]{\,{\rm Li}_{#1}}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,}
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$
\begin{align}&\color{#66f}{\large\int\frac{x\cos\pars{x}}{\sin^{3}\pars{x}}\,\dd x}
=-\,\half\int x\,\dd\bracks{\frac{1}{\sin^{2}\pars{x}}}
=-\,\half\,\frac{x}{\sin^{2}\pars{x}}
+ \half\, \overbrace{\int\frac{\dd x}{\sin^{2}\pars{x}}}^{\dsc{-\cot\pars{x}}}
\\[5mm]&=\color{#66f}{\large-\,\half\bracks{x\csc^{2}\pars{x} + \cot\pars{x}}} + \mbox{a constant}
\end{align}
A: $$\begin{gathered}
  I = \int {\frac{{x\cos x}}
{{{{\sin }^3}x}}dx}  = \int {\frac{{x\cos x}}
{{\sin x}}.\frac{1}
{{{{\sin }^2}x}}dx}  =  - \int {\frac{{x\cos x}}
{{\sin x}}.d\left( {\cot x} \right)}  \hfill \\
   =  - \frac{{x\cos x}}
{{\sin x}}.\cot x + \int {\cot xd\left( {\frac{{x\cos x}}
{{\sin x}}} \right)}  \hfill \\
   =  - \frac{{x{{\cos }^2}x}}
{{{{\sin }^2}x}} + \int {\cot x.\frac{{\left( {\cos x - x\sin x} \right)\sin x - \left( {x\cos x} \right)\cos x}}
{{{{\sin }^2}x}}dx}  \hfill \\
   =  - x{\cot ^2}x + \int {\cot x.\frac{{\sin x\cos x - x}}
{{{{\sin }^2}x}}dx}  \hfill \\
   =  - x{\cot ^2}x + \int {\frac{{\cos x}}
{{\sin x}}.\left( {\frac{{\cos x}}
{{\sin x}} - \frac{x}
{{{{\sin }^2}x}}} \right)dx}  \hfill \\
   =  - x{\cot ^2}x + \int {{{\cot }^2}xdx}  - I \hfill \\ 
\end{gathered} $$
So,
$$2I =  - x{\cot ^2}x + \int {{{\cot }^2}xdx}  \Rightarrow I = \frac{1}
{2}\left( { - x{{\cot }^2}x + \int {{{\cot }^2}xdx} } \right).$$
But
$$\int {{{\cot }^2}xdx}  = \int {\left( {\frac{1}
{{{{\sin }^2}x}} - 1} \right)dx}  =  - \cot x - x + C.$$
So,
$$I = \frac{1}{2}\left( { - x{{\cot }^2}x - \cot x - x + C} \right).$$
Finally,
$$I = \frac{1}
{2}\left[ { - x\left( {1 + {{\cot }^2}x} \right) - \cot x + C} \right] =  - \frac{1}
{2}\left[ {x\left( {1 + {{\cot }^2}x} \right) + \cot x - C} \right] =  - \frac{1}
{2}\left( {\frac{x}
{{{{\sin }^2}x}} + \cot x - C} \right)$$
