Integral of $\frac{1}{\sin^2(x)\cos^2(x)}$ $$ I = \int\frac{1}{\sin^2(x)\cos^2(x)}$$ 
I have tried the following:
$$\sin^2x = \sin x \cdot \sin x = \frac{1}{2}(1 - \cos2x)$$
$$\cos^2x = \cos x \cdot \cos x = \frac{1}{2}(1 + \cos2x)$$
The integral becomes:
$$I = 4\int\frac{1}{1 - \cos^2(2x)} = 4\int\frac{1}{\sin^2(2x)}$$
Substitute $u = 2x \implies du = 2dx$
$$I = 2\int\frac{1}{\sin^2u} =  -2\cot(u)$$
Plugging back x I get:
$$I = -2\cot(2x)$$
I tried plugging in the integral into an integral-calculator and the answer was: $\tan(x) - \cot(x)$. Can you help me identify what I did wrong?

Your result is correct. Here's another approach:
$$\sin2x=2\sin x\cos x\implies \sin^2x\cos^2x=\frac14\sin^22x$$
and since $\;(\cot x)'=-\csc^2x=-\frac1{\sin^2x}\;$ , we get
$$\int\frac{dx}{\sin^2x\cos^2x}=\frac42\int\frac{d(2x)}{\sin^22x}=-2\cot 2x+C$$
