This is just a question on indefinite integration, and if your two answer hase a difference of a constant, they are both possible answers.
But i found that your two answers are not in that case, taht means you at least made a mistake in one of them.
And i got you have made mistake in the second method.
$\begin{aligned}&=\int sin(x)cos(x)dx\\&=\int \frac{2sin(x)cos(x)}{2}dx\\&=\int\frac{sin(2x)}{2}dx\\&=\int\frac{sin(2x)}{4}2dx\\&=\int\frac{sin(2x)}{4}d2x\\&=-\frac{cos(2x)}{4}+c\end{aligned}$
And i think your first answer is right.
So i will check if they really have a difference as a constant.
$\begin{aligned}differnce&=\frac{sin^2(x)}{2}-[-\frac{cos(2x)}{4}]\\&=\frac{sin^2(x)}{2}+\frac{cos(2x)}{4}\\&=\frac{sin^2(x)}{2}+\frac{1-2sin^2(x)}{4}\\&=\frac{1}{4}\end{aligned}$
I hope it will help.