Originally Posted by

**ninjaku** Ok after your suggestion. I did the problem two ways.

The first way I did using:

$\displaystyle u=sinx$

$\displaystyle du=cosx$

and got the answer to be $\displaystyle \frac{sin^2x}{2} + c.$

However when I checked it in my calculator, it said the answer was instead, $\displaystyle -\frac{cos^2x}{2} +c.$

Which I found to be the answer when I set :

$\displaystyle u=cosx$

$\displaystyle du=-sinx$

I would just like to know if both of those are correct, or only one.

And if only one of them is correct, how would I know which term I should pick to use for the substitution?