<s>[INST] Integral $\int\csc^3{x} \ dx$ I found these step which explain how to integrate $\csc^3{x} \ dx$. I understand everything, except the step I highlighted below.
How did we go from:
$$\int\frac{\csc^2 x - \csc x \cot x}{\csc x - \cot x}\,dx%$$
to 
$$\int \frac{d(-\cot x + \csc x)}{-\cot x + \csc x} \quad?$$
Thank you for your time!
$$
\int \csc^3 x\,dx = \int\csc^2x \csc x\,dx$$
To integrate by parts, let $dv = \csc^2x$ and $u=\csc x$. Then $v=-\cot x$ and $du = -\cot x \csc x \,dx$.
Integrating by parts, we have:
$$\begin{align*}
\int\csc^2 x \csc x \,dx &= -\cot x \csc x - \int(-\cot x)(-\cot x\csc x\,dx)\\
&= -\cot x \csc x - \int \cot^2 x \csc x\,dx\\
&= -\cot x\csc x - \int(\csc^2x - 1)\csc x\,dx &\text{(since }\cot^2 x = \csc^2-1\text{)}\\
&= -\cot x \csc x - \int(\csc^3 x - \csc x)\,dx\\
&= -\cot x\csc x - \int\csc^3 x\,dx + \int \csc x\,dx
\end{align*}$$
From
$$\int \csc^3 x\,dx = -\cot x\csc x - \int\csc^3 x\,dx + \int \csc x\,dx$$
we obtain
$$\begin{align*}
\int\csc^3x\,dx + \int\csc^3 x\,dx &= -\cot x \csc x + \int\csc x\,dx\\
2\int\csc^3 x\,dx &= -\cot x\csc x + \int\csc x\,dx\\
\int\csc^3x\,dx &= -\frac{1}{2}\cot x\csc x + \frac{1}{2}\int\csc x\,dx\\
&=-\frac{1}{2}\cot x\csc x + \frac{1}{2}\int\frac{\csc x(\csc x - \cot x)}{\csc x - \cot x}\,dx\\
&= -\frac{1}{2}\cot x \csc x + \frac{1}{2}\int\frac{\csc^2 x - \csc x\cot x}{\csc x - \cot x}\,dx\\
&= -\frac{1}{2}\cot x \csc x + \frac{1}{2}\int\frac{d(-\cot x+\csc x)}{-\cot x +\csc x}\\
&= -\frac{1}{2}\cot x\csc x + \frac{1}{2}\ln|\csc x - \cot x|+ C
\end{align*}$$
 [/INST] The question seems to be why the following are equal:
$$(\csc^2 x - \csc x \cot x)\,dx = d(-\cot x + \csc x)$$
The answer is that
$$
\frac{d}{dx} \cot x = -\csc^2 x\quad \text{ and }\quad\frac{d}{dx} \csc x = -\csc x \cot x.
$$
The quotient rule for derivatives can establish both of these identities if you know how to differentiate the sine and cosine and some simple trigonometric identities.
$$
\begin{align}
\frac{d}{dx} \cot x & = \frac{d}{dx} \frac{\cos x}{\sin x} = \frac{(\sin x)\frac{d}{dx}\cos x - (\cos x) \frac{d}{dx} \sin x}{\sin^2 x} \\  \\  \\
& = \frac{(\sin x)(-\sin x) - (\cos x)(\cos x)}{\sin^2 x} = \frac{-(\sin^2 x + \cos^2 x)}{\sin^2 x} = \frac{-1}{\sin^2 x} = -\csc^2 x.
\end{align}
$$
And similarly,
$$
\frac{d}{dx} \csc x = \frac{d}{dx} \frac{1}{\sin x} = \frac{- \frac{d}{dx} \sin x}{\sin^2 x} = \frac{-\cos x}{\sin^2 x} = -\;\frac{1}{\sin x}\frac{\cos x}{\sin x} = -\csc x \cot x.
$$
</s>