Proof. We need to use a handy twist, where we multiply \csc(x) with the fraction \frac{\csc(x) + \cot(x)}{\csc(x) + \cot(x)}. So we need to calculate the next integral:
\begin{align*} \int \csc(x) dx = \int \frac{\csc(x)(\csc(x) + \cot(x))}{\csc(x) + \cot(x)} dx. \end{align*}
\begin{align*} \frac{du}{dx} = -\csc(x)\cot(x) - \csc^2(x) \iff du = -(\csc(x)\cot(x) + \csc^2(x))dx. \end{align*}
\begin{align*} \int \csc(x) dx &= \int \frac{\csc(x)(\csc(x) + \cot(x))}{\csc(x) + \cot(x)} dx \\ &= \int \frac{\csc(x)\cot(x) + \csc^2(x)}{\csc(x) + \cot(x)} dx \\ &= \int \frac{-1}{u} du \\ &= -\int \frac{1}{u} du \\ &= -\ln \lvert u \rvert + C \\ &= -\ln \lvert \csc(x) + \cot(x) \rvert + C. \end{align*}