Here is the question: $\displaystyle \int \(csc ^{2}2x\cot 2x dx $ Find this integral by inspection.

Getting the answer they expect is simple enough, consider the derivative of $\displaystyle (\cot 2x)^{2} $ which is $\displaystyle -4\csc ^{2}2x\cot 2x $ and then adjust by a factor of $\displaystyle -\frac{1}{4}$

This gives an answer of $\displaystyle -\frac{1}{4}\cot ^{2}2x + C $

However if you adjust the first integral they give you by factoring out $\displaystyle \csc 2x $ and then apply the same technique with $\displaystyle (\csc 2x)^{2} $ instead the answer turns out to be -$\displaystyle \frac{1}{4}\csc ^{2}2x + C $. Both differentiate to be the same thing, (unless I'm making an obvious mistake so are they both correct?

Please feel free to correct my thinking or maths if it's flawed