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 $$

$$\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)$$
