A contradictory integral: $\int \sin x \cos x \, \mathrm dx$

Solution 1:

The only thing that you’re doing wrong is forgetting the constant of integration: your two antiderivatives differ by a constant, so of course they are antiderivatives of the same function.

$$\frac12\sin^2x=-\frac12\cos^2x+\frac12$$