If you were to integrate (cotx)^2, as you asked, you encounter a problem when correcting the coefficient.
By this I mean, if you were to integrate, say, cos 2x ======> 1/2 sin 2x
You write a '1/2' in front to correct the coefficient (because if you were to differentiate sin 2x you get 2 cos 2x; so multiplying this by 1/2 removes the 2 effectively)
If you tried the same thing with (cot x)^2, writing this as (ln| sin x |)^2 would not be appropriate, because if you were to differentiate this, you get 2cos x / sin x.
You have an unwanted cos x, for which you cannot 'correct' - you can only correct for integers.
Hope this helps!