$$\sin 2x = 2\sin x \cos x \quad\text{ and }\quad -2\sin2x = -4\sin x \cos x.$$
However, when I integrate each with respect to $x$: $$\int (-2\sin 2x)dx=\cos 2x$$ and $$\int( -4\sin x\cos x)dx=2\cos^2x$$
Clearly $$\cos 2x ≠ 2\cos^2x.$$
Why is this the case when $$-2\sin 2x = -4\sin x\cos x?$$
Which one am I suppose to use when integrating?