There are really three various methods for doing such integral.
Method 1:
This method uses a trig formula as,
∫sin(x) cos(x) dx = ½ ∫sin(2x) dx = -(1/4) cos(2x) + c
Method 2:
This method uses the substitution as,
u = cos(x) du = - sin(x)dx
∫sin(x) cos(x) dx = -∫ u du = -½ u2 + c2 = -(1/2) cos2(x) + c2
Method 3:
Now there is another substitution which could be done here as,
u = sin (x) du = cos (x)dx
∫sin(x) cos(x) dx = ∫ u du = ½ u2 + c3 = (1/2) sin2(x) + c3
Therefore, we've found three various answer each with a different constant of integration. Though, as per the fact above these three answers must only be different by a constant because they all have similar derivative.
Actually they do only be different by a constant. We will require the following trig formulas to prove that.
cos (2x) = cos2(x) - sin2(x) cos2(x) + sin2(x) = 1
Start with the solution from the first method and utilize the double angle formula as above.
-(1/4) (cos2(x) - sin2(x)) + c1
Here, from the second identity above we contain,
-(1/4) (cos2(x) - (1 - cos2(x))) + c1 = -(1/4) (2cos2(x) - 1) + c1
= -(1/2) cos2(x) + (¼) + c1
It is then answer we found from the second method along with a slightly differ constant. Though,
c2 = ¼ + c1
We can do a same manipulation to find the answer from the third method as given. Again, starting with the solution from the first method utilize the double angle formula and after that substitute in for the cosine in place of the sine using,
cos2(x) = 1 - sin2(x)
Doing this provides,
-(1/4)( 1 - sin2(x)) - sin2(x) + c1 = -(1/4)(1 - 2 sin2(x)) + c1
= (1/2) sin2(x) - (¼) + c1
it is the answer from the third method along with a different constant and again we can associate the two constants with,
c3 =- (¼) + c1
Therefore, what have we learned here? Hopefully we have seen that constants of integration are significant and we cannot forget about them. We frequently don't work with them in a Calculus I course, until now without a good understanding of them we would be hard pressed to know how integration methods differ and apparently make different answers.