Don't doubt yourself! Your original answer is correct. The answer obtained by the second method is correct as well. So what conclusion must you draw? The two functions you obtained,

and

must therefore have the same derivative. And indeed they only differ by a constant. According to maple, after simplifying and using trigonometric identities:

I hope you can see the beauty of math is this example, using integration, you effectively proved that the two functions must differ by some constant. If you are interested you could show directly using trigonometric identities that the two antiderivatives differ by a constant, for full appreciation of this situation.