Integral of cosec squared ($\operatorname{cosec}^2x$, $\csc^2x$)

According to my sheet of standard integrals,

$\int \csc^2x \, dx = -\cot x + C$.

I am interested in a proof for the integral of $\operatorname{cosec}^2x$ that does not require differentiating $\cot x$. (I already know how to prove it using differentiation, but am interested in how one would calculate it without differentiation.)


If you want to be that perverse. I learned a way to integrate a power of sine, so why not apply it to the $-2$ power? Keep one factor of sine, convert all others to cosine, substitute $u=\cos x$. If we do that here, we get $$ \int\frac{dx}{\sin^2 x} = \int \frac{\sin x dx}{\sin^3 x} =\int\frac{\sin x dx}{(1-\cos^2 x)^{3/2}} =\int\frac{-du}{(1-u^2)^{3/2}} . $$ Then we can evaluate this integral (somehow, maybe even a trig substitution) to get $$ \int\frac{-du}{(1-u^2)^{3/2}} = \frac{-u}{\sqrt{1-u^2}} + C = \frac{- \cos x}{\sin x} + C $$


Alright, we could attempt a Weierstrass substitution if that's the sort of thing you want. Let $t=\tan(\frac{x}{2})$. Thus $\csc(x)=\frac{1+t^{2}}{2t}$ and $dx=\frac{2dt}{1+t^{2}}$. Therefore we have the following:
$$\int \csc^{2}(x)dx=\int \frac{1+t^{2}}{2t}\cdot\frac{1+t^{2}}{2t}\cdot\frac{2dt}{1+t^{2}}=\int\frac{1+t^{2}}{2t^{2}}dt=\frac{1}{2}\int (t^{-2}+1) dt$$ $$=\frac{1}{2} \left[ \frac{-1}{t}+t\right]+C=\frac{t^{2}-1}{2t}+C=\frac{\tan^{2}(x/2)-1}{2\tan(x/2)}+C$$
Which leads to the given result by application of the double angle formula.

Letting $u=\tan(x)$ works too. We get $\csc^{2}(x)=1+\frac{1}{u^{2}}=\frac{1+u^{2}}{u^{2}}$, and $\frac{du}{1+u^{2}}=dx$. Therefore the integral is $$\int \csc^{2}(x)=\int \frac{1+u^{-2}}{1+u^{2}}du=\int \frac{1}{u^{2}}du=\frac{-1}{\tan(x)}+C=-\cot(x)+C$$