Integrate $\int \sin (2x) \cos (2x)\,dx$ I have

$$\int \sin(2x) \cos (2x)\,dx = \frac12 \int \sin(4x)\,dx = -\frac18 \cos(4x),$$

but I also have

$$\int \sin(2x) \cos (2x)\,dx = \frac12 \int \sin 2x \cdot 2 \cos 2x \, dx = \frac14 \sin^2(2x).$$

Which one is correct, and why is the other method wrong?
They are differing by an integration constant, because of $\cos(2 y) = \cos^2(y) - \sin^2(y) = 1 - 2 \sin^2(y)$, and hence are the same as indefinite integration produces an anti-derivative up to a constant
In second method lost step it is not

$$\int \sin(2x) \cos (2x)\,dx = \frac12 \int \sin 2x \cdot 2 \cos 2x \, dx = \frac14 \sin^2(2x).$$

It has to be
(since 2sin(2x). cos(2x)=sin(4x)) 

$$\int \sin(2x) \cos (2x)\,dx = \frac12 \int \sin 2x \cdot 2 \cos 2x \,dx = \frac12 \int \sin(4x) dx=-\frac18\cos(4x)$$
(Since $$\int \sin(4x)dx=-\frac14 \cos(4x).$$)