I attempted to integrate $\cot x$ by parts by taking $u$ as $\csc x$ and $\dfrac{dv}{dx}$ as $\sin x$.
Then: $$\int \cot x\,dx = \int \csc x \cos x\,dx \\ = \sin x \csc x - \int- \sin x \csc x \cot x \, dx \\ = \frac{\sin x}{\sin x} + \int \frac{\sin x}{\sin x}\cot x$$
$$\int \cot x \,dx = 1 + \int \cot x\\ 0 = 1$$
I'm fairly sure that the last line isn't true, so where is the mistake?
It's not all that unusual that two different methods of antidifferentiating a function lead to this: \begin{align} \int\cdots\cdots & = \text{something} \\[10pt] \int\cdots\cdots & = \text{something} + 1 \end{align}
If the difference is constant (as $1$ is) then this doesn't mean anything was done wrong, since in either case you should have \begin{align} \int\cdots\cdots & = \text{something} + \text{constant} \\[10pt] \int\cdots\cdots & = \text{something} + 1 + \text{constant} \end{align} and those both say the same thing.